Pretty git commit graph
git log --graph --date-order -C -M --pretty=format:'<%h> %ad [%an] %Cgreen%d%Creset %s' --all --date=short
Written by Sergey Morozov
Related protips
4 Responses
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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#