从主分支的原始分支点开始,在git分支中显示所有提交 [英] Show all commits in a git branch since original branching point from master
问题描述
我正在寻找一种方法来查看自分支点(包括它)以来的活动分支上的所有提交,并希望自从master分支之后。
例如情况如下:
pre $ code ABCD(master)
\
EF(分支A)
我想获得提交F,E和B,而F是头。
和
ABCD(master)
\\ \\
EF(分行B)
\
G(分行C)
在G是当前HEAD的情况下,我想获得提交G,F,E,B。用--graph选项显示这些信息也是很好的。
现在我已经拿出了
git log master ^ .. HEAD
但似乎是显示太多信息(如来自其他分支的提交)。
感谢您的帮助!
从如何运行Git Log来查看仅针对特定分支的更改?,这应该是足够的:
git log - 边界大师..
#或
git log --boundary --no-merges master ..
更简洁的表示形式:
git log - 边界 - 无合并--pretty ='%C(黄色)%h%d%Creset%an%Cgreen %ar:%Creset%s'--graph master ..
(add - 边界
,如 torek comments ,以包括什么' B
'commit否则会是ex包含在git log结果中)
I'm looking for a way to view all commits on active branch since branching point (and including it) and hopefully since branching from master.
For example situation like:
A-B-C-D (master)
\
E-F (branch A)
I want to get commits F, E and B while F is the HEAD.
And for
A-B-C-D (master)
\
E-F (branch B)
\
G (branch C)
I want to get commits G, F, E, B in case G is current HEAD. Displaying this information with --graph option would be also great.
For now I have come up with
git log master^..HEAD
But it seems to be displaying too much information (like commits from other branches). Thanks for your help!
From "How Do I run Git Log to see changes only for a specific branch?", this should be enough:
git log --boundary master..
# or
git log --boundary --no-merges master..
More concise representation:
git log --boundary --no-merges --pretty='%C(yellow)%h%d %Creset%an %Cgreen%ar:%Creset %s' --graph master..
(add --boundary
, as torek comments, in order to include what 'B
' commit which would otherwise be excluded from the git log result)
这篇关于从主分支的原始分支点开始,在git分支中显示所有提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!