git diff 색상 사용자 정의가 있습니다

git diff 색상 사용자 정의가 있습니다

git diff누군가가 사용할 색상을 변경하는 방법 , 예를 들어 diff...?

~/.gitconfig에서:

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

아니요. 진심으로 도와주시면 감사하겠습니다

답변1

설명서에는 git-config(1)사용 가능한 슬롯이 자세히 설명 added되어 있습니다 .changednewold

   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).

관련 정보