Skip to content

Instantly share code, notes, and snippets.

@johanmeiring
Created June 27, 2012 08:32
Show Gist options
  • Save johanmeiring/3002458 to your computer and use it in GitHub Desktop.
Save johanmeiring/3002458 to your computer and use it in GitHub Desktop.
"git lg" alias for pretty git log
# From http://garmoncheg.blogspot.com/2012/06/pretty-git-log.html
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
@talktosalvador
Copy link

muchas gracias crack!

@FacundoEG
Copy link

un capo total

@annluky
Copy link

annluky commented Oct 31, 2023

nice, thank you

@ocramz
Copy link

ocramz commented May 10, 2024

You can also change -%C(yellow)%d%Creset to -%C(auto)%d%Creset if you want your branches to be different colors

for posterity:

git config --global alias.lg "log --graph --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --decorate=full"

@grazianobolla
Copy link

gracias de nuevo capo

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