[article] Beautiful Git Log

git

30 Jul 2014

If one ever wonders how to view git log in a formatted way, here is the solution.

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"

Then the next time when you try to see the log, simply type

git lg

To see the lines changed,

git lg -p
comments powered by Disqus