问题描述
我可以在我的.gitconfig中看到我的本地和远程分支的颜色不同。
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
在 git branch -vv
然而,有一个额外的上游分支显示有不同的颜色,在我的屏幕上是不可读的。
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
列出了许多分支类型的颜色参数,不能找到一个这个上游分支。
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.
推荐答案
查看源代码,您要使用 upstream
广告位名称:
Looking at the source code, you want to use upstream
as the slot name:
[color "branch"]
upstream = bold blue
看起来更新的手册页也有列出的选项。你正在查看的可能是比1.8.3(这是功能首次出现)。
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).
这篇关于Git颜色:如何在“git branch -vv”中设置上游分支的颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!