Hacker News new | ask | show | jobs
by dr_win 3664 days ago
This is what I added to my ~/.gitconfig. Achieved similar results.

[format] pretty = format:%<(10)%C(yellow)%h%Creset %<(100,trunc)%s %<(30)%Cblue%ad%Creset %C(magenta)%ae%Creset

2 comments

I initially went with a similar approach. But then I locally worked on a few repos locally where I am the author of all commits, so I can strip off name and email for those repos. I know per-repository gitconfigs can exist, but I decided a small wrapper would be more efficient.

Version 0.2.0 is just a minimal functional version, but I am planning to add configuration options where you can turn off, reorder columns, change date format, do anything with a simple single line commands.

I tried it, yours is a bit different, if your columns are smaller than the size you declared it leaves that extra white space, while yolog autofits columns.

I like refs better than email. Thanks for informing, i cannot understand this syntax, can you provide a link to understand ?

You can see pretty formats in git log's documentation:

https://git-scm.com/docs/pretty-formats