我似乎无法得到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