git log commit limiting "show commits with >1 child" possible?
- From
- David <bouncingcats@gmail.com>
- Date
- Dec 28, 2012, 03:12 UTC
- Message-ID
- <CAMPXz=rQxh3niOKiASZE3qqbYUEKXN6TscPsjPPoZjZLnCRpFA@mail.gmail.com>
My branches are very long so for years I have been doing a lot of scrolling when using gitk. I have just now discovered how to see a simplified history.
For this example history where commits were added in alphabetical order:
A--B--C--D--H
\
E--F--G--I
\
JI do this:
$ git log --graph --branches --simplify-by-decoration --source --oneline * 00a27e0 J | * 160d232 I |/ | * daa5b69 H |/ * 734db0c A
and similar in gitk using the View > Edit View > Simple History = 1 This is a great step forward for me! I am very happy with it.
Is there any way to ask git log to additionally display all commits with more than one child, to show where each branch diverges?
So I hope to see:
* 00a27e0 J | * 160d232 I |/ * b981ea0 G | * daa5b69 H |/ * 546ae44 C * 734db0c A
I have read man git-log but I do not understand it all. If there is a way to achieve this then I am not seeing it.
I notice that there is commit limiting by --merges and --no-merges. If --merges means "show only commits with more than one parent", and --no-merges means "show only commits with only one parent", what I want is "show also commits with more than one child".
Or perhaps "show only commits with more than one parent or child".
Is there a way to do this? It will be nice if it also works in gitk. Presently I have git version 1.7.2.3