我有一个分支 master
和一个从 master
checkout 的分支 feature
。
master
从其他开发者那里得到提交,我会定期将 master
merge 回 feature
,以便它跟上新的发展来自其他分支机构。
但是,每次执行 git merge master
时,我都会在相同的文件中遇到相同的冲突,尽管我之前已经解决了冲突并提交了更改。
关于造成这种情况的原因以及如何预防有什么想法吗?
谢谢!
最佳答案
首先考虑不要将集成分支 merge 到功能分支中。
再看看git rerere命令并使用它:
$ 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)
关于git merge 重复冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12457517/