Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why don't git colors show up in iTerm2

Tags:

git

bash

iterm

So I have my gitconfig setup to do colors. In Terminal it works great, looks fine.

In iTerm2, however, the colors don't appear for my gitconfig at all unless I set the reverse property for git. Then they appear but who likes reversed colors anyways?

Why does this happen and how can I fix it?

like image 881
Robert Ross Avatar asked Sep 14 '11 23:09

Robert Ross


People also ask

How do you add colors to iTerm2?

Clicking on any of the color wells opens a color picker that lets you change the setting for the selected color. iTerm2 has a custom color picker. If you don't like it you can revert to the system color picker by clicking the rectangular icon to the right of the eyedropper.


1 Answers

You should check that iTerm is setting the TERM variable correctly. On my system, I see:

echo $TERM xterm-256color 

And have working colours in git. This is set according to the 'Report Terminal Type' property in iTerm's preferences.

here's a screenshot of iTerm 2's preferences

You should also check the Colors tab, and ensure the contrast slider isn't all the way to the right.

like image 127
Matt Avatar answered Sep 28 '22 11:09

Matt