I say “branch” in quotes because I mean branch in the data-structure, graph topology sense, not a git branch which is something like a handle to a particular commit.
I am on master, I created a new branch with a commit which I made from editing an earlier commit: (Alphabet order = chronological order, basically I found the bug was first introduced in commit C)
A -- B -- C -- D <-- master
\
E <-- bugfix_branch
I am on the master branch and I look at the little tree diagram in gitk and it does not show me commit E. Similarly if I checkout bugfix_branch branch and look there it shows me in the list only the commits A, B, and E (so I don’t see C or D).
I’d like to view a more complete view of my entire git history without having to first push to bitbucket or github to try to look at the graphs there. Is there some kind of way to view all the commits and see which commits are children of which?
Here’s what I use to get a pretty printed tree in my terminal with all the nodes.
You can add this to your
.gitconfigfile, I have this in “~/.gitconfig”:Which lets me do:
(Disclaimer I modified the code from some other source, but I can’t remember where…)