2012-07-11 60 views
0

目前我使用git log --graph --all想象我的回購歷史Git的圖形歷史輸出

想我的輸出也包含其中的提交上進行分支。我將如何做到這一點?

電流輸出:

* | commit 2da166d419c48555b1ce79784304632bf3f6e98f 
| | Author: TechplexEngineer <[email protected]> 
| | Date: Fri Jul 6 10:53:55 2012 -0400 
| | 
| |  Changed polled and exception mode to use the same logic to decide when t 
| |  do a refresh/poll. 
| | 
* | commit b2b7a99931a917e697da3bc38be1636b33c1c44a 
|/ Author: TechplexEngineer <[email protected]> 
| Date: Thu Jul 5 14:43:38 2012 -0400 
| 
|  Cleaned up comments and removed some old dead code 
| 
| * commit fb6d01eafca28aa3a84e72ed3f057486accd6532 
|/ Author: cparent <[email protected]> 
| Date: Fri Jul 6 10:38:28 2012 -0400 
| 
|  Got multiple reads and writes to happen in both 
|  polled and exception mode 

所需的輸出:

* | commit 2da166d419c48555b1ce79784304632bf3f6e98f on branch Master 
| | Author: TechplexEngineer <[email protected]> 
| | Date: Fri Jul 6 10:53:55 2012 -0400 
| | 
| |  Changed polled and exception mode to use the same logic to decide when t 
| |  do a refresh/poll. 
| | 
* | commit b2b7a99931a917e697da3bc38be1636b33c1c44a on branch Master 
|/ Author: TechplexEngineer <[email protected]> 
| Date: Thu Jul 5 14:43:38 2012 -0400 
| 
|  Cleaned up comments and removed some old dead code 
| 
| * commit fb6d01eafca28aa3a84e72ed3f057486accd6532 on branch chris 
|/ Author: cparent <[email protected]> 
| Date: Fri Jul 6 10:38:28 2012 -0400 
| 
|  Got multiple reads and writes to happen in both 
|  polled and exception mode 

回答

2

因爲原來的分支(如果有的話)在其上的提交製成不被記錄,GIT中這是不可能的。

使用--decorate它將註釋提交,如果它們當前指向一個分支或標記是關於你可以得到的最好的。

+0

謝謝,這個工程:'git log --graph --decorate --all --date = relative' – TechplexEngineer 2012-07-11 16:33:33

0

這是不可能的,因爲分支機構只是指針到一個提交。這樣的承諾可以成爲許多不同分支機構歷史的一部分。最好你可以得到類似於gitk輸出的東西,其中分支或標籤只是一個提交旁邊的標記。