Skip to content

Instantly share code, notes, and snippets.

@keithjgrant
Created March 9, 2016 14:36
Show Gist options
  • Save keithjgrant/704aec982346a8bf78fa to your computer and use it in GitHub Desktop.
Save keithjgrant/704aec982346a8bf78fa to your computer and use it in GitHub Desktop.
Git "log-pretty" alias
[alias]
log-pretty = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(black)%cn%Creset' --abbrev-commit --date=relative
@keithjgrant
Copy link
Author

The bit at the end of the format (%C(black)%cn%Creset) prints the name of the author in black—i.e. invisible. This keeps it from cluttering things up too much since I don't usually need it, but you can highlight the text in your terminal to see who the author is.

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