Concept

Unified diff patch

Hunks describe old and new line ranges; space indicates context, minus removal and plus addition. File headers are not changed content.

Formal Syntax & Structure

git syntaxgit
@@ -oldStart,oldCount +newStart,newCount @@

Working Example

Example Snippetgit
git diff HEAD~2 HEAD~1 -- notes.txt
Git Reference