Setting up Git colors in the terminal

I am adding this here so I won’t have to try to remember once again which colors I’m used to use with Git. If you already didn’t know, it is possible to set up git so that it colorizes the statuses, logs and so on when working via a terminal, which is much better than the plain old monochromatic scheme.

Add the following to your file ~/.gitconfig:

[color]
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

Now, when you use a command like git status, it will use colors to differentiate the information.

One thought on “Setting up Git colors in the terminal

Leave a Reply

Your email address will not be published. Required fields are marked *

*


7 * = twenty one

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>