Skip to content

Instantly share code, notes, and snippets.

@Tetr4
Last active November 12, 2019 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tetr4/52b4032afa5fff36ee4f7fb60b17ab02 to your computer and use it in GitHub Desktop.
Save Tetr4/52b4032afa5fff36ee4f7fb60b17ab02 to your computer and use it in GitHub Desktop.
Pretty git log overview

Pretty git log overview

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment