Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 617 Bytes

git_colorize.md

File metadata and controls

41 lines (31 loc) · 617 Bytes

~/.gitconfig 中添加以下段落

[color]
  diff = auto
  status = auto
  branch = auto
  interactive = auto
  ui = true
  pager = true

也可以控制特定颜色

[color "status"]
  added = green
  changed = red bold
  untracked = magenta bold

[color "branch"]
  remote = yellow

或者使用:

git config --global color.ui auto

或者

git config --global color.ui auto
git config --global color.branch auto
git config --global color.status auto

参考