How to make 'git log' decorate by default


I frequently type git log when what I actually want is git log --decorate. How do I make it decorate by default?

I have seen lots of answers of the form "make an alias lg and then type git lg instead of git log". But, I can’t find anywhere how to change the default behaviour of git log itself. alias log does not work.


git config log.decorate auto

For a global setting, add the --global parameter.

So it would be:

git config --global log.decorate auto

The aliases are made with git config alias.lg "log --decorate"

Answered By – Jakub

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published