在源代码树中,合并差异中哪个是 "mine",哪个是 "theirs"?

In source tree, which is "mine" and which is "theirs" in merge diff?

我正在合并两个分支。我假设我现在在 HEAD 分支上。当我只想选择文件的一个分支版本时。想挑哪个看内容,不看树枝。

例如在下图中我想选择第二行:

但是第二行是从哪一行来的呢?我不太明白这里程序的输出。

分支名称就在冲突标记旁边。您上次结帐时使用的是 "ours",您在 git merge 命令中提到的是他们的。

事实上,我只能引用 git help merge:

   By default, Git uses the same style as the one used by the "merge" program from the RCS suite to present such a
   conflicted hunk, like this:

       Here are lines that are either unchanged from the common
       ancestor, or cleanly resolved because only one side changed.
       <<<<<<< yours:sample.txt
       Conflict resolution is hard;
       let´s go shopping.
       =======
       Git makes conflict resolution easy.
       >>>>>>> theirs:sample.txt
       And here is another line that is cleanly resolved or unmodified.

   The area where a pair of conflicting changes happened is marked with markers <<<<<<<, =======, and >>>>>>>. The part
   before the ======= is typically your side, and the part afterwards is typically their side.

我用 Sourcetree(4.1.0,2021 年 3 月 24 日)做了一个小测试,至少澄清了这个用例

branch mineA, text "a"
branch mineB, text "b"
current branch: mineB
merge mineA into mineB
resolve conflict using 'mine'
text: "b"