Macos – getting git colors in OSX terminal

gitmacosterminal

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

Best Answer

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.

Related Question