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

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.

  • 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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