我似乎無法得到git log --branches
正確過濾其輸出。好像Git忽略它。git log - 分支是否工作?
例如,git log --graph --all --decorate
頭,打印:
* commit 3ae0d17538f787bdde68f37f6644ffe9652d8dc1 (HEAD, feature/branch-ignore)
| Author: Chris Lewis <[email protected]>
| Date: Mon Mar 14 17:39:56 2011 -0700
|
| Ignore merge commits, as they're going to be duplicating events
|
* commit 770534e9d77acb03eaf842440c879aec1c5b5500
| Author: Chris Lewis <[email protected]>
| Date: Tue Mar 8 14:39:40 2011 -0800
|
| Removed another remote branch check
|
比方說,我想通過master
過濾,這應該意味着這些提交被忽略。 git log --graph --all --decorate --branches=master
的頭也是:
* commit 3ae0d17538f787bdde68f37f6644ffe9652d8dc1 (HEAD, feature/branch-ignore)
| Author: Chris Lewis <[email protected]>
| Date: Mon Mar 14 17:39:56 2011 -0700
|
| Ignore merge commits, as they're going to be duplicating events
|
* commit 770534e9d77acb03eaf842440c879aec1c5b5500
| Author: Chris Lewis <[email protected]>
| Date: Tue Mar 8 14:39:40 2011 -0800
|
| Removed another remote branch check
|
Git似乎沒有過濾。 --branches
是否與其他參數一起傳遞似乎沒有什麼區別。我的Git版本是git version 1.7.4.1
。有誰知道如何成功使用這個命令?
編輯:我希望能夠做的就是獲得一個分支或另一個分支的日誌,而不必先結賬。
有趣的問題。到目前爲止,下面的評論都沒有提到 - 分支應該做什麼或者它應該如何工作。 – 2012-05-15 01:52:47
我已經添加了一個答案,現在解釋了爲什麼它確實工作正常,即使它看起來不是。 – 2015-02-05 00:18:38