gpt4 book ai didi

git - git pull/push 是否支持颜色

转载 作者:太空狗 更新时间:2023-10-29 14:32:14 26 4
gpt4 key购买 nike

<分区>

当我执行 git status 时,我会在显示器上看到漂亮的颜色。

然而 git push/pull/fetch 只是单色的无聊

我有:git config color.ui always 设置为 on 但似乎除了状态之外我没有得到任何颜色。

我错过了什么吗?

如果某件事被拒绝,我很乐意看到一条红色消息 pop 。也许有一种方法可以将 git 输出包装在颜色处理器中?

https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration好像没有讲push/pull

即我想在这里将我的错误行涂成红色:

To ssh://<REPO ADDRESS>
! [rejected] develop -> develop (fetch first)
error: failed to push some refs to 'ssh://<REPO ADDRESS>'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

我想有可能以某种方式将它包装在一个脚本中,如果一行有 error: 它将使其变为红色?我知道有一个颜色 maven“东西”可以对 maven 输出做一些事情。

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