Skip to content

Instantly share code, notes, and snippets.

@shovon
Last active December 18, 2015 04:49
Show Gist options
  • Save shovon/5728555 to your computer and use it in GitHub Desktop.
Save shovon/5728555 to your computer and use it in GitHub Desktop.
Pretty print git logs. Better than gitk.
# Create a git alias that will pretty-print your git logs. Much better than
# firing up `gitk`.
#
# From https://coderwall.com/p/euwpig#comment_3248
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
# And then, you should be able to view the logs like so:
git lg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment