Last Updated: February 25, 2016
·
2.24K
· edestler

Pretty git commit graph

git log --graph --date-order -C -M --pretty=format:'<%h> %ad [%an] %Cgreen%d%Creset %s' --all --date=short

4 Responses
Add your response

I had to use single quotes but works great:

git log --graph --date-order -C -M --pretty=format:'<%h> %ad [%an] %Cgreen%d%Creset %s' --all --date=short
over 1 year ago ·

@bashir thanks, updated the tip. I use it as an alias in .gitconfig and double quotes worked there.

[alias]
    graph = log --graph --date-order....
</code></pre>
over 1 year ago ·

In my git config I have one for compact as well

[pretty]
    compact = "%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset"

Which looks something like this:

| * 6a6b662 - My Commit Message (4 hours ago) <Brombomb>

which can then be used with the

--pretty=compact

flag

over 1 year ago ·

Have a look at another pretty print protip http://coderwall.com/p/euwpig

over 1 year ago ·