1

I've been working with github for a couple of weeks now. Using my version control for my homework since I now work on campus with a laptop and at home with my desktop.

Below is a picture of one of the commits for reference. One commit

And here is another just for comparison. Another

This is probably a dumb question but I've been googling for about 12mins trying to get some sort of definition to what the @@-5,3 +5,18@@ & @@-12,22 +12,51@@ actually mean.

I feel like it has to do with number of lines. But I haven't found anything that directly explains what it is.

Can anyone explain? Or maybe point me to a refference?

Callat
  • 2,928
  • 5
  • 30
  • 47

1 Answers1

0

This is the unified diff (also called unidiff) format. You can interpret @@ -A,B +C,D @@ as:

  • At line number A in the first file, for a bloc of B lines,
  • at line number C in the second file, for a bloc of D lines

...then...

  • the lines starting with (space) are common to both files,
  • the lines starting with - are only in the first file,
  • and the lines starting with + are only in the second file.
gawi
  • 13,940
  • 7
  • 42
  • 78