Git merge recurring conflicts

I have a master branch and a feature branch that has been extracted from master .

master receives commits entered into it from other developers, and I regularly merge master back into feature so that it does not lag behind new developments from other branches.

However, I still get the same conflicts in the same files every time I do git merge master , although I resolved the conflict before that and made the changes.

Any ideas on what could be causing this and how to prevent it?

Thanks!

+6
source share
1 answer

First, consider not combining integration branches into function branches.

Secondly, look at git rerere 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) 
+4
source

Source: https://habr.com/ru/post/925562/


All Articles