Search code examples
gitgit-branchgit-rebase

git branch is behind master for too many commits -- most efficient way to rebase?


when I do git rebase master, I have to resolve conflicts against every single commit I was behind of. it's a pain.

Is there a way to do it the SVN style -- I only compare against the latest snapshot, then resolve the conflict once and for good.


Solution

  • The maybe easiest approach would be to simply merge master into the branch in question. This will obviously only ask once for conflict resolution.

    Alternativly if you always have to handle the same conflicts over and over, you can take a look at git rerere (reuse recorded resolution); as the name suggests it records the resolutions you apply to a conflict and will resolve such conflicts automatically in the future.