Skip to content

Instantly share code, notes, and snippets.

@evgv
Last active July 4, 2018 08:34
Show Gist options
  • Save evgv/e51783498f3ee2969f8c9bcb3361ab30 to your computer and use it in GitHub Desktop.
Save evgv/e51783498f3ee2969f8c9bcb3361ab30 to your computer and use it in GitHub Desktop.

How to colorize output of git

Auto

    git config --global color.ui auto

Manual

You can create a section [color] in your ~/.gitconfig with e.g. the following content

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

You can also fine control what you want to have coloured in what way, e.g.

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

[color "branch"]
  remote = yellow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment