[英]change no of lines after and before in git diff output
I want to increase the number of lines displayed before and after changes in git diff
output.我想增加
git diff
输出更改前后显示的行数。
Analogous to grep -A3 -B5 ...
类似于
grep -A3 -B5 ...
According to git diff --help
, git diff
supports the same arguments as the standard diff
command w/r/t context:根据
git diff --help
, git diff
支持与 w/r/t 上下文的标准diff
命令相同的参数:
-U<n>, --unified=<n>
Generate diffs with <n> lines of context instead of the usual three. Implies
-p.
您可以使用-U
开关来控制差异周围的上下文行数:
$ git diff -U5
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.