0

How can git diff color be changed to one's disposal, or such as for diff ...?

in ~/.gitconfig:

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

not work. Please sincere help appreciated

1 Answer 1

2

The git-config(1) manual details the available slots; your added and changed might work instead as new and old.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.