Last active
April 21, 2018 14:11
-
-
Save raynimmo/a329cf6df58c9f1d7f4bd1b4b1636178 to your computer and use it in GitHub Desktop.
Git log formatting
This file contains hidden or 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
| // for placeholders, see https://git-scm.com/docs/pretty-formats | |
| // short format, coloured | |
| git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
| // display files changes in each commit | |
| git log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat | |
| // oneline commit showing dates | |
| git log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short | |
| // dated entries showing files changed | |
| git log --graph --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --numstat | |
| // entries falling within specific period for specific user | |
| git log --author='Ray Nimmo' --since='1 month ago' --until='now' --format='%Cgreen%ci%Creset %s%Creset' --no-merges | |
| git log --author='Ray Nimmo' --since='40 day ago' --until='now' --format='%Cgreen%ci%Creset %s%Creset' --no-merges | |
| // pretty formatdisplays /hash/name/email/date/commit | |
| git log --pretty=format:'%h|%C(green)%aN%C(reset)|%C(yellow)%ae%C(reset)|%C(cyan)%ad%C(reset)|%s' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment