启用默认的颜色设置可以使用如下命令

git config --global color.ui true

如果不喜欢花花绿绿的颜色,可以将其关闭:

git config --global color.ui false

可以针对具体的内容进行设置如:

color.branch
color.diff
color.interactive
color.status

例如:

git config --global color.diff.meta "blue black bold"

这样会将diff的输出以蓝色字体,黑色背景,粗体显示。

颜色可用值有:

normal
black
red
green
yellow
blue
magenta
cyan
white

字体可选值有:

bold
dim
ul
blink
reverse

(完)

相关文章:

  • 2021-10-30
  • 2022-01-20
  • 2021-10-27
  • 2021-08-01
  • 2022-01-07
  • 2021-07-18
猜你喜欢
  • 2021-11-08
  • 2022-12-23
  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
相关资源
相似解决方案