borfast borfast - 1 year ago 110
Git Question

git merge repeating conflicts

I have a branch

and a branch
which was checked out from

gets commits pushed into it from other developers and I regularly merge
back into
, so that it keeps up with new developments from other branches.

However, I keep getting the same conflicts in the same files every time I do a
git merge master
, although I resolved the conflict before and committed the changes.

Any ideas on what could be the cause for this and how to prevent it?


Answer Source

First consider not merging integration branches into feature branches.

Second have a look to git rerere command and use it:

$ git config --global rerere.enabled true


  git-rerere - Reuse recorded resolution of conflicted merges


  In a workflow employing relatively long lived topic branches,
  the developer sometimes needs to resolve the same conflicts
  over and over again until the topic branches are done (either
  merged to the "release" branch, or sent out and accepted upstream)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download