Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git colors: How do I set colors for the upstream branch in “git branch -vv”?

I'm able to see my local and remote branches colored differently with the following configuration in my .gitconfig.

[color "branch"]
    current = bold cyan
    local = normal
    remote = bold red

In git branch -vv however, there is an additional upstream branch displayed that has a different color which is unreadable on my screen.

How do I configure this “upstream” color? (movie pun unintended :)

A git help config lists the color parameters for many branch types but I'm not able to find out one for this upstream branch.

like image 616
Debajit Avatar asked Sep 25 '13 18:09

Debajit


1 Answers

Looking at the source code, you want to use upstream as the slot name:

[color "branch"]
    upstream = bold blue

It looks like more up-to-date man pages also have the option listed. The ones you were looking at are probably older than 1.8.3 (which is when the feature first appeared).

like image 170
John Szakmeister Avatar answered Oct 31 '22 16:10

John Szakmeister