Git log in colors.
git log --pretty='format:%Cblue%h%Creset %ad %Cred%<(8,trunc)%an%Creset%Cgreen%d%Creset %s' --date=short
Shows how to use pretty format in Git with colors and fixed with columns (trunc) :
- %Cblue … %Creset
- begin and end a colored sequence (here in blue, also possible : red and green)
- %h
- hash short format
- %ad
- author date (short version with the - date=short git argument)
- %<(8,trunc)
- the next item will take 8 positions with spaces at right if necessary and truncated if longer
- %an
- author name
- %d
- ref names (branch, tag, …)
- %s
- subject (ie the commit comment)