Last Updated: February 25, 2016
·
3.42K
· limptwiglet

Better git log

Picture

Make your git log look like the above just by adding an alias:

git config alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"

Now running git lg will show you a nicer log output

3 Responses
Add your response

great looking log. I had to wrap it in double quotes:

git config alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
over 1 year ago ·

If you wanted this to work for all of your git repos, make it a global alias with --global:

git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
over 1 year ago ·