最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

linux - Black output from git is unreadable in my terminal - how to change colors? - Stack Overflow

programmeradmin2浏览0评论

I cannot easily read black letters displayed on my bright-white (foreground) on dark-ish blue (background) terminal window. I want to change all the black output from a colorized git diff to some other color. How best to do this without capitulating and changing the fg/bg colors I use in my terminal window itself? If I turn off git colorization entirely, I can read the output, but I lose the benefits of colorized output.

One way is to guess at all git attributes which use black and adjust each one independently in ~/.gitconfig. E.g.

[color "diff"]
  meta = brightwhite

Or maybe read through the git source code looking for references to "black". Any better alternatives?

More generally, some programs have "dark" and "light" modes by which the user can select the scheme which displays best on his terminal. It appears that git doesn't have these modes. Any thoughts on what fg/bg terminal color assumptions the git developers might have used as the basis for the colors they chose?

发布评论

评论列表(0)

  1. 暂无评论