Skip to content

Instantly share code, notes, and snippets.

@xhlwill
Last active August 22, 2019 06:41
Show Gist options
  • Save xhlwill/b8cb0733c82e5806ffefa2ea3ef3c005 to your computer and use it in GitHub Desktop.
Save xhlwill/b8cb0733c82e5806ffefa2ea3ef3c005 to your computer and use it in GitHub Desktop.
pretty git log output https://ruby-china.org/topics/939
# pretty git log history
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %an'
# add it to alias
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %an'"
# now we can use <git-lg>
git lg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment