为什么我必须一遍又一遍地解决同一个冲突? [英] Why do I have to resolve the same conflict over and over?

查看:146
本文介绍了为什么我必须一遍又一遍地解决同一个冲突?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在 branch1-local 中执行 git rebase branch1 时,发生冲突。我解决冲突,做 git add< conflicted-add> ,然后做 git rebase --continue 作为git要我做。之后,应用一个新的提交。出现新的冲突。但是又是一次冲突!相同的文件!我再做一遍, git add git rebase --continue ,然后再重复一遍,直到我完成为每次提交重新设置这一点重复此操作。



为什么rebase让我重复使用相同的冲突解决方案?

git rerere ,它会为您记录冲突解决方案。我已经看到的最好的介绍现在是 Git Book的一部分,工具章节。在实践中,当你执行rebase时,你会像以前一样停下来,但你只需要检查合并冲突仍然解决,然后 git add 它并继续。


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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆