码迷,mamicode.com
首页 > 系统相关 > 详细

PowerShell 中 Git status 输出文字颜色的修改

时间:2018-07-29 15:12:46      阅读:604      评论:0      收藏:0      [点我收藏+]

标签:rac   oba   settings   OLE   记录   config   rem   file   normal   

在PowerShell中使用Git,遇到一个问题,输出的文字里有暗红色的,实在太难辨认了。今天忍不了,查了一下解决办法,记录如下。

首先是Git的设置:

git config –global color.status.changed “yellow normal bold”
git config –global color.status.untracked “yellow normal bold”
git config –global color.branch.remote “yellow normal bold”

然后对PowerShell的设置:

用命令

$profile

查看需要修改的文件,在文件末尾添加

$global:GitPromptSettings.WorkingForegroundColor    = [ConsoleColor]::Yellow
$global:GitPromptSettings.UntrackedForegroundColor  = [ConsoleColor]::Yellow

我在使用中发现第二行不必要,反而会报错,注释掉即可。

PowerShell 中 Git status 输出文字颜色的修改

标签:rac   oba   settings   OLE   记录   config   rem   file   normal   

原文地址:https://www.cnblogs.com/archerC/p/9385215.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!