git - 标题不被接受 : How to set the color for error messages

标签 git

我当前的git push输出如下:

enter image description here

错误信息几乎看不到。以上是尽管有以下设置:

[color "interactive"]
  error = red bold

错误信息应该怎么设置?

最佳答案

这似乎是远程边带输出,这意味着您需要:

  • Git 2.19+
  • git config color.remote.error "red bold"
  • git config color.remote always

这将为 Remote 正在生成的内容着色。

但在您的情况下,如果错误消息不是由 Remote 生成,则颜色将由 color.interactive.<slot> 管理:

git config color.interactive.error "red bold"

(错误“failed to push to remote...”很可能由您的本地 Git 实例产生,而不是由远程边带输出产生)

或者,正如 OP 评论的那样: color.push.error :

git config color.push.error "red bold"

在这两种情况下,这是一个本地颜色设置,而不是远程颜色设置。

关于git - 标题不被接受 : How to set the color for error messages,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54955196/

相关文章:

linux - 可以使 shell 与 --command 选项一起交互式运行

java - 为什么 Gradle 在另一个 git 分支中创建文件?

git - 我如何告诉 git 使用哪个 vim?

Github - merge 被阻止 - 基础分支要求对所有提交进行签名

node.js - npm install 无法在具有 git 依赖项的 Windows 上运行

git - git 中的上游/主题/集成之间的 merge 方向是否有重要意义?

git 在压缩对象时卡住

git - sbt-ghpages 致命 : Not a git repository (or any of the parent directories): . git

windows - 如何获取 git 存储库中每个修订版的文件 list ?

git - Subversion 中遗漏版本的可能性(研究环境)