2012-02-22 93 views
0

我最近尝试在git中使用分支,但是当他们工作的都是正常的时候,无论我做什么,我都无法显示我的分支和合并图。我试过咯咯的Ubuntu和gitk - 所有但他们都不在这个NETTUTS +教程http://net.tutsplus.com/tutorials/other/easy-version-control-with-git/

我在工作类型为表明

$ git log --graph #Sorry my sreenshot is missing h at the end 

但不是这个......

enter image description here

...我得到这个...

My output

我会很高兴能与快速回复...

这里是 '$ gitk --all' 输出

enter image description here

+0

你怎么能指望它看?你确定你有一个分支吗? – Andy 2012-02-22 20:19:53

+3

您目前有'BigIdea'签出。也许可以尝试'git log --graph master'来查看'master'的历史(假设你甚至将'BigIdea'合并到'master'中)。 – 2012-02-22 20:25:49

+0

@TimBielawa是的,我有一个分支在这里,因为结账工作,所以合并,但它仍然显示只显示一行中的所有分支。我要添加一个'gitk -all'输出的截图...... – mgoszcz2 2012-02-23 20:19:28

回答

3

你可能会寻找git log --graph --all,同样与gitk,我在我的外壳中有一个别名:

alias gk='gitk --all' 

就是为了这个目的。

git help log

--all 
    Pretend as if all the refs in refs/ are listed on the command line as <commit>. 

所以,如果你有分支机构abc,这是因为如果你告诉混帐,以显示日志和图表以这种方式:

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. 
... 

等等......