5 ms·
My favorite line in my .gitconfig is an alias that prints out the commit history as a tidy graph. (The default `git log --graph` uses 6 whole lines per commit!)
by CodeIsTheEnd 3y ago
My favorite line in my .gitconfig is an alias that prints out the commit history as a tidy graph. (The default `git log --graph` uses 6 whole lines per commit!)
[alias]
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all -n 15
Which I took from this Stack Overflow post:
https://stackoverflow.com/questions/1057564/pretty-git-branch-graphs https://stackoverflow.com/questions/1057564/pretty-git-branc...
- divbzero 3y agoI like how --all reveals forgotten refs.
- mprime1 3y agoSimplified version I can type from memory (I.e. on a system where I don’t have my gitconfig aliases): -—graph -—oneline -—color
- szszrk 3y agoYou just gave me a lesson "why one should not just paste things he found online into his terminal". Your parameters have Em dash instead of a hyphen... I reinstalled git from dedicated official repositories before I realized my git is not old... the param is indeed incorrect.
- mprime1 3y agoI'm sorry. I should have had a copy-paste warning -- typing from a phone... I knew it was coming.
- deleted 3y ago[deleted]
- ComputerGuru 3y agoIn case you didn't know about it, `tig` does just that by default (and a whole lot more).