0

What does the folowing output of git diff mean?

diff --git a/README.md b/README.md
index 24aa464..49c20f4 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,2 @@
 LINE1
-LINE2
 LINE3

I think I understand that the "-" new LINE2 means that the version on have in workspace does not have the LINE2 that is in staging, but what does @@ -1,3 +1,2 @@ mean??

Wouter J
  • 41,455
  • 15
  • 107
  • 112
techsjs2013
  • 2,607
  • 5
  • 20
  • 25

1 Answers1

2

It is the line ranges that the diff is concerned with for that hunk, meaning lines 1 to 3 in a/README.md and lines 1 to 2 in b/README.md.

Øsse
  • 171
  • 4
  • sorry I dont get it.. if the 2nd line was remove then ? – techsjs2013 Feb 15 '13 at 14:22
  • 1
    Whether or not a line was removed isn't relevant. The line `@@ -1,3 +1,2 @@` means "lines 1 to 3 in the original file and lines 1 to 2 in the resulting file are affected by the following changes". If you had only changed the text "LINE2" to "LINE2 new stuff", it would look like `@@ -1,3 +1,3 @@`. – Øsse Feb 15 '13 at 16:16