哪些环境变量设置了Git Color.UI? [英] What Environmental Variable Sets Git Color.UI?
问题描述
是否存在一个指示 color.ui
config选项的Git环境变量?如果有的话,它似乎不在文档中.
不幸的是,与某些其他设置不同,没有环境变量可让您覆盖 color.ui
配置选项.>
唯一的方法当然是使用命令行: git config --global color.ui true
您还可以直接编辑〜/.gitconfig
文件,然后添加所有这些颜色选项.所有这些信息都可以在此处找到.将颜色添加到您的〜/.gitconfig
文件中:
<代码> [颜色]ui =自动[颜色分支"]电流=黄色反向本地=黄色远程=绿色[颜色差异"]meta =黄色粗体碎片=洋红色粗体旧=红色粗体新=绿色加粗[颜色状态"]添加=黄色已更改=绿色未追踪=青色
差异中突出显示空白
<代码> [颜色]ui =真[颜色差异"]空格=红色反转[核]空格=固定,缩进,不带制表符,尾部空格,cr-at-eol
Is there a Git environmental variable that dictates the color.ui
config option? It does not seem to be in the documentation, if there is one.
Unfortunately, unlike some other settings, there is no environmental variable that allows you to override the color.ui
config option.
The only way is to of course use the command line: git config --global color.ui true
You can also edit the ~/.gitconfig
file directly and add all of these color options. All of this info can be found here. Add colors to your ~/.gitconfig
file:
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
Highlight whitespace in diffs
[color]
ui = true
[color "diff"]
whitespace = red reverse
[core]
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
这篇关于哪些环境变量设置了Git Color.UI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!