The git log is a powerful command which shows commit history.

$ git log
git log

However since I am a more visual thinking person I need some visually appealing form to see my commits.


Here is the solution for my need:

$ git log --oneline --decorate --graph --all

which will give the format like below:

git log

Absolutely easier to grasp what is going on with the history.

Tree with date and author

If you also want to see date and author use this:

$ git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --all

The output:

git log


It will be beneficial to use aliases for them:

alias glt='git log --oneline --decorate --graph --all'
alias glta='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --all'

All done!


  • 2022-03-15 : Fix single quotation mark typo on pretty flag for log command