要安装它,我使用命令:$ sudo apt-get install git-core
从Unix& Linux Stackexchange问题How to colorize output of git?和answer by @Evgeny:
git config --global color.ui auto
The
@H_403_22@color.ui
is a Meta configuration that includes all the varIoUscolor.*
configurations available withgit
commands. This is explained in-depth ingit help config
.所以基本上比分别设置不同的颜色*设置更容易和更好的未来证明。
深入解释从
git config
documentation:@H_403_22@
color.ui
: This variable determines the default value for variables such ascolor.diff
andcolor.grep
that control the use of color per command family. Its scope will expand as more commands learn configuration to set a default for the--color
option. Set it toalways
if you want all output not intended for machine consumption to use color,totrue
orauto
if you want such output to use color when written to the terminal,or tofalse
ornever
if you prefer git commands not to use color unless enabled explicitly with some other configuration or the--color
option.