I\'m curious if there is a way to show branch hierarchy on the command line? For instance if I use git branch
, instead of seeing output like this:
*
That's not how branches work from git's point of view. If I make some commits to branch a
, create branch b
from it, work there, and then do other work back on a
:
A -- B -- D <-- a
\
\
C <-- b
That's indistinguishable if you did it the other way around:
A -- B -- C <-- b
\
\
D <-- a
The only way I can think of to find out from which branch certain branch originated is the reflog, but that's unreliable (entries older than 90 days are usually deleted).