在 git community book 中,它说
Another interesting thing you can do is visualize the commit graph with the '--graph' option, like so:
$ git log --pretty=format:'%h : %s' --graph * 2d3acf9 : ignore errors from SIGCHLD on trap * 5e3ee11 : Merge branch 'master' of git://github.com/dustin/grit |\ | * 420eac9 : Added a method for getting the current branch. * | 30e367c : timeout code and tests * | 5a09431 : add timeout protection to grit * | e1193f8 : support for heads with slashes in them |/ * d6016bc : require time for xmlschema
It will give a pretty nice ASCII representation of the commit history lines.
我应该如何阅读这张图? 420eac9
与其他部分有何不同?
最佳答案
星号表示提交的地方:
e1193f8
、5a09431
和 30e367c
被提交到左分支(在右分支上产生 |
) 而 420eac9
被提交到右分支(在左分支上产生一个 |
)。 那就是 420eac9
与其他分支的不同之处:它是对正确分支的唯一提交。
为了完整起见:
d6016bc
是分支点5e3ee11
是 merge 提交2d3acf9
是 merge 后的第一次提交
关于git - 如何阅读 git 日志图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5382255/