有没有办法着色git add --interactive模式?

Kos*_*tas 2 git command-line-interface

我正在使用git add --patch很多,我正在寻找一种方法来使其输出着色(如in git diff --color).

那里有什么东西还是我应该尝试写一个包装器?

Raf*_*ler 12

在你的.gitconfig:

[color]
    interactive = true
Run Code Online (Sandbox Code Playgroud)

我不知道究竟该如何获得彩色的,但是这是内置选项.

  • @vrinek如果你想要所有颜色,你可以添加`ui = true`到那个部分,IIRC.我建议你看一下[git-config手册页]的"变量"部分(http://kernel.org/pub/software/scm/git/docs/git-config.html),有很多很酷的东西你可能不知道 (3认同)