How to get git diff with full context?

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

    Note: git1.8.1rc1 announce (December 8th, 2012) includes:

    A new configuration variable "diff.context" can be used to give the default number of context lines in the patch output, to override the hardcoded default of 3 lines.

    so that could help, here, generate a more complete context.

提交回复
热议问题