Skip to content

Instantly share code, notes, and snippets.

@johnjohndoe
Created January 3, 2011 18:04
Show Gist options
  • Save johnjohndoe/763735 to your computer and use it in GitHub Desktop.
Save johnjohndoe/763735 to your computer and use it in GitHub Desktop.
A git log alias with colors, date and owner.
# A git log alias.
# Shows the brief log describtion in one line.
# Adds colors, a relative date and the owner.
# File name: .gitconfig
[alias]
look = log --graph --pretty=format:'%Cred %h : %Creset%s %Cgreen(%cr) %C(blue)<%an>%C(yellow)%d %Creset' --date=relative
@ADTC
Copy link

ADTC commented Sep 11, 2014

The placeholders %h and %d look nicer with %C(auto) :)

Also, %cr is already relative committer date, so --date=relative (or any other --date= option) will not have any effect. For the --date= option to be effective, you should use %cd (or %ad for author date) which will respect the option.

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