2011-03-19 97 views

回答

53

你可以嘗試以下方法:

gitk --all 

你可以告訴使用任何git rev-list understands顯示gitk什麼,所以如果你只是想幾個分支,你可以這樣做:

gitk master origin/master origin/experiment 

。 ..或更奇特的東西,如:

gitk --simplify-by-decoration --all 
201

如果你碰巧不是h AVE可用的圖形界面,您還可以打印出命令行提交圖表:

git log --oneline --graph --decorate --all 

如果此命令無效選項--oneline抱怨,用途:

git log --pretty=oneline --graph --decorate --all 
+28

這就是真正的美麗。圖形用戶界面是懦夫;-) – Johnsyweb 2011-03-19 11:21:00

+4

誰需要gitk,當我們有gitl!別名gitl ='git log --oneline --graph --decorate --all' – 2013-02-05 01:30:03

+7

'alias gl ='git log --oneline --graph --decorate --all''。爲什麼輸入比需要更多;) – 2013-11-18 21:03:09

82
  1. 當我在我工作的地方與終端而已,我用:

    git log --oneline --graph --color --all --decorate

    enter image description here

  2. 當OS支持GUI,我使用:

    gitk --all

    enter image description here

  3. 當我在我家的Windows PC的時候,我用我自己的GitVersionTree

    enter image description here

12

對於同一個問題,有一個very good answer
添加以下行 「〜/的.gitconfig」:

[alias] 
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all 
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''   %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all 
lg = !"git lg1"