简体   繁体   English

更改“ git reflog”的颜色

[英]Change colour for “git reflog”

Is it possible to change the colour of the hash in git reflog ? 是否可以在git reflog更改哈希的颜色? The one it's using right now is hard to read. 现在正在使用的那个很难阅读。 I tried the following in my .gitconfig file: 我在.gitconfig文件中尝试了以下操作:

[color "reflog"]
hash = red

I also tried ref and reference . 我也尝试了refreference I am using git 2.5.1 on Ubuntu. 我在Ubuntu上使用git 2.5.1。

You may use --pretty to customize the output. 您可以使用--pretty定制输出。 To change the hash to red: 要将哈希更改为红色:

git reflog --pretty='format:%C(red)%h%Creset %gD %gs'

or to include branch names, relative date of change and author 或包括分支机构名称,相对变更日期和作者

git reflog --pretty='format:%C(red)%h%Creset %gD: %gs %C(yellow)%d%Creset %Cgreen(%ar) %C(bold blue)<%an>%Creset'

see git help log for more format options. 有关更多格式选项,请参见git help log

此处没有很好的答案,但是似乎无法配置git-reflog的颜色

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM