I want to increase the number of lines displayed before and after changes in git diff output.
Analogous to grep -A3 -B5 ...
I want to increase the number of lines displayed before and after changes in git diff output.
Analogous to grep -A3 -B5 ...
According to git diff --help, git diff supports the same arguments as the standard diff command w/r/t context:
-U<n>, --unified=<n>
Generate diffs with <n> lines of context instead of the usual three. Implies
-p.
You can use the -U switch to control the number of lines of context around the diff:
$ git diff -U5