Colors in git output?

10

3

I have seen some examples on people getting colors in git output. I tried the following guide http://scie.nti.st/2007/5/2/colors-in-git but unfortunately it didn't succeeded.

Is there anything else that needs to be done to get colored output? I'm using .oh-my-zsh together with regular Ubuntu and color works in the term.

Edit: I'm looking for colors like from this example (while doing a clone): http://calip.so/quickstart-install-calipso.html

grm

Posted 2011-05-24T05:35:05.043

Reputation: 2 164

Answers

15

You can try this.

git config --global --add color.ui true

Or you can create a simple ~/.gitconfig to start with. something like.

[gui]
    recentrepo = /Users/name/Workspace/repo/src/stable
[user]
    name = name
    email = name@domain.com
[apply]
    whitespace = nowarn
[core]
    editor = vim
[color]
    diff = auto
    status = auto
    branch = auto

CantGetANick

Posted 2011-05-24T05:35:05.043

Reputation: 265

Thanks. As I wrote, I have tried this, but still no color. Well, no color is not exactly true. I get colored +'s and -'s while doing fast-forward. I'm looking for more colors like in the link I now posted. – grm – 2011-05-24T06:20:57.943

So this too does not work for you? That's strange. Which version, platform you are on. – CantGetANick – 2011-05-24T06:39:46.793

lol totally misunderstood your question. – CantGetANick – 2011-05-25T11:29:44.173

3

The example you posted is not supposed to be coloured; it is only because the blogging engine used by http://calip.so/ mistreats preformated text as code blocks, and highlights tokens as if it were program source.

For example, //github.com/cliftonc/calipso.git is coloured differently because // marks the start of a comment in many programming languages, and in/var/done/using are reserved keywords.

user1686

Posted 2011-05-24T05:35:05.043

Reputation: 283 655