How to configure Mac OS X term so that git has color?

yinglcs picture yinglcs · Jul 20, 2009 · Viewed 68.7k times · Source

I've seen a Mac OS X git demo online in which it's configured to have multiple colors.

For example, his prompt is amber, his ls directory is purple and his git diff output has ~ 4 colors (pink, light green, red, pale yellow).

Can you tell me how can I configure Mac OS X terminal to achieve that? It's definitely Mac OS X Terminal.app, not iTerm.

Answer

phloopy picture phloopy · Jul 15, 2011

William Purcell's answer only enables color for the 'git diff' command. Do this to enable colors for all git commands:

$ git config --global color.ui true