Skip to content

Instantly share code, notes, and snippets.

@TheLandolorien
Last active September 10, 2021 19:00
Show Gist options
  • Save TheLandolorien/f3938ef5e75903eeb781e40bcce8b607 to your computer and use it in GitHub Desktop.
Save TheLandolorien/f3938ef5e75903eeb781e40bcce8b607 to your computer and use it in GitHub Desktop.
Configure git to pretty print logs
git config --global alias.commits "log --abbrev-commit --pretty=format:'%C(red)%h%Creset -%C(yellow)%d%Creset %s %C(green)%cd (%cr)%Creset %C(bold blue)<%an>%Creset' --date=format:'%a %b %d, %Y %H:%M %p'"
@TheLandolorien
Copy link
Author

TheLandolorien commented Aug 29, 2018

Run git commits after running the above content to show the newly configured format.

You can use a different git alias if you change alias.commits to alias.<SUBCOMMAND> where <SUBCOMMAND> is the git sub-command you would like to use instead.

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