Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have just installed XCode and GitHub for Mac. I have successfully run "GitHub->Install Command Line Utility". I can connect to repositories with both apps and I can use the git command in the terminal.

However the git command does not use any colors (as I am used to just like in the below screenshot).

What can I do to get colors (preferably directly in OSX termianl, but an extra console would do too).

git in colored console

share|improve this question
up vote 13 down vote accepted
git config --global color.branch auto
git config --global color.diff auto
git config --global color.status auto
git config --global color.ui auto

The global configuration is saved to ~/.gitconfig, which you can also edit directly with a text editor.

Refer to the manual of git-config for more options.

share|improve this answer
    
Strange, on Windows I did not have to do this. – bitbonk Sep 11 '11 at 13:24
1  
@bitbonk: The msysGit package comes with a system-wide configuration file which enables colors automatically. – grawity Sep 11 '11 at 14:02
    
How can I find out where I got git from? I guess it can only be the GitHub app or XCode – bitbonk Sep 11 '11 at 23:42
2  
XCode 4 supports git natively: developer.apple.com/technologies/tools/… – bitbonk Sep 12 '11 at 9:35
1  
I only bothered with the last line (color.ui auto) and it colors everything for me now. I don't think you need the rest. – Tyler Collier Feb 9 '13 at 4:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .