ASCII-art git bash revision graph

834 Views Asked by At

Anyone knows how to get in git bash ASCII - art graph like RevisionGraph from tortoiseGit?

(no listing of commits, just branch tree graph - which branch derives from which)

TortoiseGit Revision Graph

I quickly look at git commands but it's look like there is no dedicated method and it's only achieveable with some bash script or combination of different git commands?

2

There are 2 best solutions below

0
On

I've also been looking for this, and for me, the --simplify-by-decoration option of git log works pretty well as a substitute.

I regulary use something like

git log --all --decorate --oneline --graph --simplify-by-decoration

which I have stored as a git alias, so I can use it like git revisions.

1
On

No there's no such command, TortoiseGit does a thing of its own to make it.

You can derive part of its information with other commands, but not all at once, as far as I can tell.

By the way, if you wanted to find out which branch derives from which keep in mind that even TortoiseGit doesn't make a perfect work with that, in some situation it's actually impossible to know.