-
Star
(199)
You must be signed in to star a gist -
Fork
(45)
You must be signed in to fork a gist
-
-
Save johanmeiring/3002458 to your computer and use it in GitHub Desktop.
| # 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 --" |
gracias bro
que bien
nice men
graciela mostro
Thank you!
good
You might also want to:
- Remove "forced"
--color(e.g. piping) tformatinstead offormat(tl;dr: newline at the end of the command)
git config --global alias.lg "log --graph --pretty=tformat:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --decorate=full"
You can also change -%C(yellow)%d%Creset to -%C(auto)%d%Creset if you want your branches to be different colors
Thanks
muchas gracias crack!
un capo total
nice, thank you
You can also change
-%C(yellow)%d%Cresetto-%C(auto)%d%Cresetif 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"gracias de nuevo capo
Thanks for the snippets
I prefer to set up an alias in ~/.bashrc, so that I can simply execute the gl command directly,
alias gl="git log --abbrev-commit --graph --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ci) %Cblue%an <%ae>%Creset'"
thanks a lot. Putting it as an alias in ~/.bashrc is even more elegant. Could do the same for "git push" or "git pull" maybe ...?
tipazo
Спасибо
I just wanna let you know that I've been using this for more than 10 years
I just wanna let you know that I've been using this for more than 10 years
metoo
Tip: Remove the last
--to be able to set flags when using the alias.For example, to view all branches (regardless of whether they are merged into the current one) you could then do
git lg --all. This works for any flags that work with the originalgit logcommand.