Reputation: 11254
When calling git branch -vv
showing the mapping of local to remote branches, the remote branches are colored blue (which is hard to read when working on the command line). How to change the color of the remote branches to e.g. yellow?
I also found this Stack Overflow question which is unanswered.
Upvotes: 7
Views: 2039
Reputation: 290
git config --global color.branch.upstream "yellow"
From the man page of git config
:
https://git-scm.com/docs/git-config/#Documentation/git-config.txt-colorbranchltslotgt
color.branch.<slot>
Use customized color for branch coloration.
<slot>
is one of current (the current branch), local (a local branch), remote (a remote-tracking branch in refs/remotes/), upstream (upstream tracking branch), plain (other refs).
You may wish to do the same for color.branch.remote
(for the output of git branch -a
, for example.)
Upvotes: 7
Reputation: 3018
You can edit the .gitconfig
file and write things like this:
[color "branch"]
current = yellow
local = yellow
remote = yellow
This can be achieved as well with commands like:
git config --global color.branch ...
For more info on those: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration
Upvotes: 6