gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 16:28:37 30 4
gpt4 key购买 nike

打电话时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/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com