Three commit references when merging submodules

喜夏-厌秋 提交于 2019-12-07 03:16:26
VonC

It simply means the submodule gitlink (the special entry in the index of the parent repo) was changed both in source and destination.
(See git diff man page)

++ means one line that was added does not appear in either branch1 or branch2

From Git Tools - Advanced Merging:

You have three SHA1 because in a conflict, Git stores all of these versions in the index under “stages” which each have numbers associated with them.

  • Stage 1 is the common ancestor,
  • stage 2 is your version and
  • stage 3 is from the MERGE_HEAD, the version you’re merging in (“theirs”).

The combined diff format section has all the details:

When shown by git diff-files -c (combined diff of merged files), it compares the two unresolved merge parents with the working tree file

I.e.

  • file1 is stage 2 aka "our version",
  • file2 is stage 3 aka "their version".

A - character in the column N means that the line appears in fileN but it does not appear in the result.
A + character in the column N means that the line appears in the result, and fileN does not have that line".

In your case:

  • A - in the first column means file1, meaning stage 2, meaning "ours" version.
  • A - in the second column mean file2, meaning stage 3, meaning "theirs".
  • A '++' means an addition which was not in file1 or 2 (each time when compared with the common ancestor from stage 1)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!