git diff色のカスタマイズがあります

git diff色のカスタマイズがあります

git diff誰かが使用する色を変更する方法、例えばdiff...?

~/.gitconfigから:

[color "diff"]
  added = yellow
  changed = red bold

いいえ。心から助けてくれてありがとう。

答え1

このマニュアルでは、git-config(1)利用可能なスロットについて詳しく説明していますaddedchangednewold

   color.diff.<slot>
       Use customized color for diff colorization.  <slot> specifies which
       part of the patch to use the specified color, and is one of context
       (context text - plain is a historical synonym), meta
       (metainformation), frag (hunk header), func (function in hunk
       header), old (removed lines), new (added lines), commit (commit
       headers), whitespace (highlighting whitespace errors), oldMoved
       (deleted lines), newMoved (added lines), oldMovedDimmed,
       oldMovedAlternative, oldMovedAlternativeDimmed, newMovedDimmed,
       newMovedAlternative newMovedAlternativeDimmed (See the <mode>
       setting of --color-moved in git-diff(1) for details),
       contextDimmed, oldDimmed, newDimmed, contextBold, oldBold, and
       newBold (see git-range-diff(1) for details).

関連情報