Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git merge repeating conflicts

Tags:

git

merge

I have a branch master and a branch feature which was checked out from master.

master gets commits pushed into it from other developers and I regularly merge master back into feature, 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?

Thanks!

like image 501
borfast Avatar asked Sep 17 '12 10:09

borfast


1 Answers

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

NAME

  git-rerere - Reuse recorded resolution of conflicted merges

DESCRIPTION

  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)
like image 123
ouah Avatar answered Nov 12 '22 09:11

ouah