如何创建具有完整上下文的补丁?
我尝试了 --unified=2000
,它给出了 2000 行上下文:
git diff --unified=2000 branch master --no-prefix > patch
如何在不指定最大行数的情况下包含文件中的所有行?
最佳答案
This似乎工作得很好:
git diff --no-prefix -U1000
注意事项:
The
-U
flag specifies lines of context. You might need to increase this if there are more than 1000 lines between your changes.
关于git - 如何获得具有完整上下文的 git diff?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13627598/