Git - diff3 Conflict Style - Temporary merge branch

六月ゝ 毕业季﹏ 提交于 2019-11-28 09:43:33

What you have here (with the Temporary merge branch 1 and same with 2) is due to git's "recursive merge" method:

            o->branch1 = "Temporary merge branch 1";
            o->branch2 = "Temporary merge branch 2";
            merge_recursive(o, merged_common_ancestors, iter->item,
                            NULL, &merged_common_ancestors);

(merge-recursive.c, around line 1940). Git will do a recursive merge when the commit graph has multiple candidates for the merge-base (see this blog post for more). To (over?)simplify a bit, git has done an internal, recursive merge that produced a merge conflict, then done the outer merge and hit another merge conflict. What you see is the outer merge conflict (ours vs theirs) with the inner conflict shown as the "base" version.

You may find that you get better results by choosing some other merge strategy, or using an alternative diff algorithm (the patience, minimal, and histogram algorithms vs the default myers). Or, you might want to disable diff3 style for a bit, so that you simply don't see the inner merge.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!