我最近尝试在 git 中使用分支,但是无论我做什么它们都可以正常工作,但我无法显示我的分支和 merge 的图表。我试过 Giggle for ubuntu 和 gitk -all 但它们都没有像本 nettuts+ 教程中所示那样工作 http://net.tutsplus.com/tutorials/other/easy-version-control-with-git/
我输入那个
$ git log --graph #Sorry my sreenshot is missing h at the end
但不是这个...
...我明白了...
如果能得到快速回复,我会非常高兴...
这是“$ gitk --all”的输出
最佳答案
你可能正在寻找 git log --graph --all
,与 gitk
一样,我的 shell 中有一个别名:
alias gk='gitk --all'
就是为了那个目的。
来自 git 帮助日志
--all
Pretend as if all the refs in refs/ are listed on the command line as <commit>.
所以如果你有分支 a
、b
和 c
,就好像你告诉 git 在这显示日志和图表方式:
git log --graph a b c
本质上,git log
允许您列出您可以在您想要查看日志的内容中引用的任何对象。您甚至可以在一个文件或多个文件文件上使用它....
$ git log --oneline python-taboot.spec
c96d546 Straighten out the Makefile. Hey -- make rpm works now! Update a lot of docs. Fixes #34 - Taboot 'edit' mode should hint at the file type and give instructi
ea0d60b Version bumpskies to 0.4.0-1beta
a95cfbf Automatic commit of package [python-taboot] release [0.3.2-1].
d9e3ca6 Make python-argparse a Requires for el6 as well
ea7ed54 Automatic commit of package [python-taboot] release [0.3.1-1].
69eaea9 Add conditional Requires on python-argparse. Update README and release notes.
...
等等……
关于linux - 为什么 "$ git log --graph "不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9402246/