Search code examples
gitgit-log

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.


Solution

  • 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"