Skip to content

Instantly share code, notes, and snippets.

@apricot13
Last active July 13, 2016 19:31
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 apricot13/10640838 to your computer and use it in GitHub Desktop.
Save apricot13/10640838 to your computer and use it in GitHub Desktop.
Nicely formatted git

git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

alias

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"

And every time you need to see your log, just type in git lg

Or, if you want to see the lines that changed git lg -p

add -n 10 to only show the last 10 git lg -n 10

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