查看影响合并冲突的每个分支的最后一次提交日期
View date of last commit from each branch affecting merge conflict
当我遇到像这样的合并冲突时:
<<<<<<< HEAD
some code
=======
other code
>>>>>>> branch-name
有没有办法查看影响 some code
的最后一次提交的日期和最后一次影响 other code
的其他提交的日期?
是的,运行 git blame
在您要合并的两个分支上。
如果冲突发生在 some.txt 上,并且您要将 A 合并到 B 中,您会 运行 git blame A -- some.txt
和 git blame B -- some.txt
。这将告诉您最后一次更改行的提交 ID、作者和日期。
当我遇到像这样的合并冲突时:
<<<<<<< HEAD
some code
=======
other code
>>>>>>> branch-name
有没有办法查看影响 some code
的最后一次提交的日期和最后一次影响 other code
的其他提交的日期?
是的,运行 git blame
在您要合并的两个分支上。
如果冲突发生在 some.txt 上,并且您要将 A 合并到 B 中,您会 运行 git blame A -- some.txt
和 git blame B -- some.txt
。这将告诉您最后一次更改行的提交 ID、作者和日期。