Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

up vote 12 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.