如何使用其更改解决樱桃选择冲突? [英] How do I resolve cherry-pick conflicts using their changes?
问题描述
我的 git cherry-pick FOO
产生冲突。
我可以浏览冲突的文件并删除<<<<<<<<< c $ c>和< code> =======< / code >和冲突标记本身,但我希望有一个更简单的方法。
I could go through the conflicting files and delete the lines between <<<<<<<
and =======
, and the conflict markers themselves, but I'm hoping there's an easier way.
我认为 svn
相当于选择 theirs-conflict
来解决。
I think the svn
equivalent was choosing theirs-conflict
to resolve.
我如何在 git中执行此操作?
我不希望 git checkout - 他们的< file>
因为这似乎产生与 git checkout foo< file>
相同的结果,而不是仅仅获得 git diff FOO〜..FOO< file> apply。
I don't want git checkout --theirs <file>
as that seems to produce the same result as git checkout foo <file>
instead of just getting git diff FOO~..FOO <file>
applied.
推荐答案
首先,您应该撤消樱桃选择,尝试运行
First you should undo your cherry-pick, try to run this
git cherry-pick --abort
其次,尝试挑选樱桃,但是在这段时间内,你的变化不是你的,所以做到这一点: p>
Second, try to make cherry-pick, but in this time you get their changes not yours, so make this:
git cherry-pick --strategy=recursive -X theirs {Imported_Commit}
这篇关于如何使用其更改解决樱桃选择冲突?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!