Skip to content

Instantly share code, notes, and snippets.

@amomin
Created September 22, 2015 15:45
Show Gist options
  • Save amomin/d5d10449b043b0f574d6 to your computer and use it in GitHub Desktop.
Save amomin/d5d10449b043b0f574d6 to your computer and use it in GitHub Desktop.
Git log pretty

Git log alias

This short but sweet post shows how to create a simple command to create an alias to a suped-up git log.

It's just a one-liner

$ 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"

I didn't know how to alias commands in git before, so I might find this useful.

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