Pretty git log with graph
This shows your commits in a nicer graph - a nice alternative to the standard git log.
Edit your ~/.gitconfig
and put this at the bottom (if you already have an [alias]
title, then past the log-graph underneath what you already have there.
[alias]
log-graph = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''%C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
Save and exit.
Now type git log-graph
(if you have tab auto-complete on git turned on, you can type git log-[tab]
)
if you want to preview the result before putting into your ~/.gitconfig
, you can simply type:
git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''%C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
Written by Mike Street
Related protips
1 Response

For a similar but enhanced log view you may check tig
.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#