How to get git diff with full context?

前端 未结 6 890
暗喜
暗喜 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:16

    This seems to work pretty nicely:

    git diff --no-prefix -U1000
    

    With the caveat:

    The -U flag specifies lines of context. You might need to increase this if there are more than 1000 lines between your changes.

提交回复
热议问题