Skip to content

Instantly share code, notes, and snippets.

@HammerSpb
Last active March 14, 2018 19:11
Show Gist options
  • Save HammerSpb/07d11da8df44d590eb91202fe7e5a475 to your computer and use it in GitHub Desktop.
Save HammerSpb/07d11da8df44d590eb91202fe7e5a475 to your computer and use it in GitHub Desktop.
git log custom output aliases

Git custom config

Log

Option 1

image text

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"

To use it: git lg

Option 2

image

git config --global alias.hist "log --pretty=format:'%Cred%h %Cgreen(%ad)%Creset - %s%d %C(bold blue)[%an]%Creset' --graph --date=short"

To use it: git hist

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