mic*_*ael 83 git git-log git-branch
它说,在git社区书中
您可以做的另一个有趣的事情是使用'--graph'选项可视化提交图,如下所示:
Run Code Online (Sandbox Code Playgroud)$ 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它将为提交历史记录行提供非常好的ASCII表示.
我该如何阅读此图表?如何420eac9从剩下的有什么不同?
eck*_*kes 101
星号显示某些内容已发送到的地方:
e1193f8,5a09431并30e367c提交到左支(得到|的分支,在右侧),而420eac9致力于右支(产生|在左分支).而这正是420eac9从其他地方根本不同:它是唯一承诺分支,在右侧.
为了完整起见:
d6016bc 是分支点5e3ee11 是合并提交2d3acf9 是合并后的第一个提交Ilk*_*kka 17
420eac9是在一个不同的分支上,而不是在它下面的3个提交.分支机构分散后d6016bc,它们被合并了5e3ee11.