为什么我必须一遍又一遍地解决同一个冲突? [英] Why do I have to resolve the same conflict over and over?
问题描述
当我在 branch1-local
中执行 git rebase branch1
时,发生冲突。我解决冲突,做 git add< conflicted-add>
,然后做 git add
, git rebase --continue
,然后再重复一遍,直到我完成为每次提交重新设置这一点重复此操作。
为什么rebase让我重复使用相同的冲突解决方案?
When I do git rebase branch1
in my branch1-local
I get conflicts. I solve the conflict, do git add <conflicted-add>
and then do git rebase --continue
as git asks me to do. After that a new commit is applied. A new conflict shows up. But is the same conflict again! the same file!. I do it again, git add
, the git rebase --continue
, and then it all repeats again until I do repeat this for each commit being rebased on.
Why rebase is having me redo the same conflict resolution over and over again?
What you want is git rerere
which records conflict resolutions for you. The best introduction to this I have seen is now part of the Git Book, Tools chapter. In practice when you perform a rebase, you will end up stopping as before but you only have to check the merge conflict remains resolved then git add
it and continue.
这篇关于为什么我必须一遍又一遍地解决同一个冲突?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!