How to use --color-words with git add --patch?

前端 未结 7 1806
梦谈多话
梦谈多话 2020-12-07 17:27

When diffing files, I prefer to use git diff --color-words. Is there a way to make this the default format for diffs when using git add --patch or

7条回答
  •  粉色の甜心
    2020-12-07 18:09

    In your $(HOME)/.gitconfig file add this

    [color]
            diff = auto
            interactive = auto
    

    This should do.

提交回复
热议问题