MrJobs (4) [Avatar] Offline
Consider "Listing 6.5. git diff (between working area and staging area)" from the book.

diff --git a/ b/
index 964c002..5bb7f63 100644
--- a/
+++ b/
@@ -1,4 +1,3 @@
# Comment
-echo $a

Does the following explain this line "@@ -1,4 +1,3 @@" correctly/roughly ?

The line starting with @@ is roughly saying take the original file/file in staging (a/ starting at the line 1 & going for 4 lines (-1,4). Then, apply the contents of the new file/file in working directory (b/ starting at line 1 & going for 3 lines (+1,3).
rickumali (130) [Avatar] Offline
Hi MrJobs!

Yes, your description of the "@@" line looks accurate. I'm no expert on the hunk format, and when I considered your question, I found myself looking carefully at these resources:


Check these out. The second link is written by the author of Python!