如何在Ubuntu的颜色的Git控制台?

前端之家收集整理的这篇文章主要介绍了如何在Ubuntu的颜色的Git控制台?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我最近看到,Windows中的Git控制台是彩色的,例如。绿色的补充,红色的删除等。我该如何着色我的Ubuntu Git控制台?

要安装它,我使用命令:$ sudo apt-get install git-core

作为 noted通过 @VonC,color.ui默认情况下自动git 1.8.4。不是太快了;)

从Unix& Linux Stackexchange问​​题How to colorize output of git?answer by @Evgeny

git config --global color.ui auto

The color.ui is a Meta configuration that includes all the varIoUs color.* configurations available with git commands. This is explained in-depth in git help config.

所以基本上比分别设置不同的颜色*设置更容易和更好的未来证明。

深入解释从git config documentation

color.ui: This variable determines the default value for variables such as color.diff and color.grep that control the use of color per command family. Its scope will expand as more commands learn configuration to set a default for the --color option. Set it to always if you want all output not intended for machine consumption to use color,to true or auto if you want such output to use color when written to the terminal,or to false or never if you prefer git commands not to use color unless enabled explicitly with some other configuration or the --color option.

原文链接:https://www.f2er.com/ubuntu/354357.html

猜你在找的Ubuntu相关文章