Fortunately, git has a mechanism for dealing with exactly this problem called git rerere
– essentially, if you have git rerere
enabled, then each time your resolve a conflict the fact that you resolved that exact conflict in a particular way is remembered. If the same conflict comes up again, the same resolution is automatically used. There are some helpful articles below:
- http://scottchacon.com/2010/03/08/rerere.html (blog post)
- http://git-scm.com/docs/git-rerere.html (manual entry)
- Are there any downsides to enabling git rerere? (question in stackoverflow)
- http://progit.org/2010/03/08/rerere.html (original answer link: seems broken)
… but essentially you can just do:
git config --global rerere.enabled 1
… and forget about it, while enjoying easier rebasing / merging 🙂