git - "git branch -vv"改变远程分支的颜色

标签 git

打电话时git branch -vv显示本地到远程分支的映射,远程分支是蓝色的(在命令行上工作时很难阅读)。如何将远程分支的颜色更改为例如黄色?

我还找到了 this Stack Overflow question这是没有答案的。

最佳答案

git config --global color.branch.upstream "yellow"来自 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).


您可能希望对 color.branch.remote 执行相同的操作(例如,对于 git branch -a 的输出。)

关于git - "git branch -vv"改变远程分支的颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57393366/

相关文章:

git - `git submodule init && git submodule update` 和 `git submodule update --init` 之间的区别?

node.js - 将更新的更改 pull 入已部署的 Docker 容器的最佳方法是什么?

git - 使用 Git 将特定提交移动到新分支时出错

git log - 查找指定字符串的添加

git - 版本控制 Laravel。我应该忽略哪些文件?

git - 恢复 git 存储库历史记录并将其添加到现有存储库

ios - 与 Storyboard merge 问题

linux - 使用 ssh 连接时 git clone 失败

git - 使用现有分支,但从当前分支复制最新的到它

git - TFS 服务 GIT,用户在本地看不到我的 "published"分支