如何挑选/重组/解决冲突的最终结果 [英] How to cherry-pick/rebase/etc the end result of conflict resolve
问题描述
考虑以下情况:
我们有以下分支:
现在,我们需要修改和重新绑定D.
上的某些提交,因为rebase使用提交本身(而不是解析的最终结果),它看起来像我们必须再次解决冲突。
有没有办法(重新)工作在提交的D,而不需要解决相同的冲突?
我认为你正在寻找 git rebase --preserve-merges
。如果没有这个选项,它会忽略原始的合并提交,只是提交非合并提交,让你解决一些已经完成的合并冲突。
参考: git的rebase --preserve-merges究竟是什么?做(为什么?)
Consider the following situation: We have the following branches:
- A Which is our old baseline
- B Which is our new baseline
- C Which has new changes developed on top of A
- D Which is developed merging B and C, and conflicts are resolved here
Now, we need to modify and rebase some commits on D. But, because rebase uses the commits per se (and not the end result of the resolve), it looks like we have to resolve the conflicts again.
Is there any way to (re)work on commits of D without need to solve the same conflicts?
I think you're looking for git rebase --preserve-merges
. Without this option, it ignores the original merge commits and just commits the non-merge commits, leaving you to resolve some merge conflicts that were already done.
Reference: What exactly does git's "rebase --preserve-merges" do (and why?)
这篇关于如何挑选/重组/解决冲突的最终结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!