Last Updated: February 25, 2016
·
1.607K
· mikestreety

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

1 Response
Add your response

For a similar but enhanced log view you may check tig.

main view split

over 1 year ago ·