Last active
September 10, 2021 19:00
-
-
Save TheLandolorien/f3938ef5e75903eeb781e40bcce8b607 to your computer and use it in GitHub Desktop.
Configure git to pretty print logs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run
git commits
after running the above content to show the newly configured format.You can use a different
git
alias if you changealias.commits
toalias.<SUBCOMMAND>
where <SUBCOMMAND> is thegit
sub-command you would like to use instead.