Today I learnt about `git apply --reject`, which applies as much of a patch as it can, and leaves the remaining conflicting changes in foo.rej files: https://web.archive.org/web/20130706020737/http://devblog.4teamwork.ch/blog/2013/06/05/git-partially-applying-a-patch/