How to get git diff with full context?

前端 未结 6 753
暗喜
暗喜 2021-01-30 07:48

How to create patch suitable for reviewing in crucible?

git diff branch master --no-prefix > patch

This generates only 3 lines of context. S

6条回答
  •  再見小時候
    2021-01-30 08:37

    This worked for me on macOS:

    git diff -U$(wc -l main.htm | xargs)
    

    see "How to trim whitespace from a Bash variable?"

提交回复
热议问题