2012-07-11 61 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输出的东西,其中分支或标签只是一个提交旁边的标记。