Use this alias (git lg
) to print a nice compact overview of all commits, branches, tags, etc:
git config --global alias.lg "log --all --color --graph --date-order --pretty=format:'%C(auto)%h %d %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'"
For git version < v.1.7.10:
git config --global alias.lg "log --all --color --graph --date-order --pretty=format:'%C(red)%h%C(reset) %C(yellow)%d%C(reset) %s %C(green)(%cr) %C(bold blue)<%an>%Creset'"
See https://git-scm.com/docs/pretty-formats for how it works