Git Colors

April 29, 2008

Apparently Git is capable of producing color output. This tip from the Git cheat sheet makes Git’s status, branch, and diff commands much more readable. Just add the following to ~/.gitconfig:

  branch = auto
  diff = auto
  status = auto

[color "branch"]
  current = yellow reverse
  local = yellow
  remote = green

[color "diff"]
  meta = yellow bold
  frag = magenta bold
  old = red bold
  new = green bold

[color "status"]
  added = yellow
  changed = green
  untracked = cyan