How to make “git diff” output normal diff format (non-unified, non-context)?

后端 未结 2 1682
陌清茗
陌清茗 2020-12-30 04:55

I want git diff to output normal, plain old diff output (not unified diff, and not context diff).

I want this:

$ diff file1 file2
2c2
&l         


        
2条回答
  •  悲哀的现实
    2020-12-30 05:45

    git difftool --extcmd=diff
    

    or, without prompting:

    git difftool --extcmd=diff --no-prompt
    

    This is git difftool rather than git diff but it is doing what I want.

提交回复
热议问题