Information Technology Reference
In-Depth Information
starts at line
c
and continues for
d
lines.
The
$ git diff
command allows you to change the number of lines used in the
output. The command:
$ git diff --unified=4
changes the behavior of
$ git diff
in such a way that every change will be sur-
rounded by four unmodified lines, as in:
--- a/some-file-name
+++ b/some-file-name
@@ -a,b +c,d @@
xxx
xxx
xxx
xxx
+yyy
-zzz
qqq
qqq
qqq
qqq
description is surrounded by single lines (they contain the words
three
and
eight
):
@@ -3,6 +3,4 @@ two
three
<- the first surrounding line
-four
-five
-six
-seven
+foo
+bar
eight
<- the last surrounding line
Thanks to
3,6
we know that the first version of the file starts at line
3
and consists
of
6
lines: