How to colorify git errors, warnings and fatal messages?

前端 未结 4 1927
傲寒
傲寒 2020-12-01 13:59

When troubleshooting git issues of users, I keep running into people not noticing error/warning messages from git, and then burning their fingers. Is there any way to colori

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-01 14:43

    You can use the color config section of git.

    For more information and examples see http://git-scm.com/book/en/Customizing-Git-Git-Configuration#Colors-in-Git or the second part of http://blog.philippmetzler.com/?p=15

    example: (add to your .gitconfig)

    [color]
         interactive = always
    [color "interactive"]
         error = red bold
    

提交回复
热议问题