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
There is no git buit-in way to do that. Git just prints errors to STDERR and doesn’t care about the fatality of the error or anything. What you can do is color STDERR red. How to do this has been asked on on ServerFault: https://serverfault.com/questions/59262/bash-print-stderr-in-red-color
There are three basic options:
Run your command like this:
*git-command* 2> >(while read line; do echo -e "\e[01;31m$line\e[0m" >&2; done)
Use a wrapper script (See ServeFault for those), and run commands like
mywrapper *git-command*
Install stderred. This will allow you to make the effect permanent, without modifying your command line. Not sure whether this will work on windows, though.