Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,54 @@ This is a repo to help you practice diffing!
Fill in what each of the elements of the diff mean (if you are not sure just guess!):
**①**:
> Insert your explanation here
Answer:
diff --git a/README.md b/README.md ①
This format shows difference/changes between the files, whereas it is a same file "README.md"
- a/README.md - Before the changes
+ b/README.md - After the changes
git show "commitID" - will show the differences between files by
the lines which have '-' sign denotes the a (README.md) file
the lines which have '+' sign dentotes the b (README.md) file

**②**:
> Insert your answer here
Answer:
index 7f35690..14cf26a 100644 ②
Index is the bin file which shows the changes between the 7f35690..14cf26a and 100644 is the file format

**③**:
> Insert your explanation here
Answer:
--- a/README.md ③
Denotes the first/previous occurence of README.md file

**④**:
> Insert your answer here
Answer:
@@ -8,9 +8,12 @@ ④
The original file had 9 lines at line no 8 and the updated file has 12 lines at line no 8


**⑤**:
> Insert your answer here
Answer
1. Fork this repo ⑤
Fork this repo means taking a personal copy in your account without affecting the original repository

**⑥**:
> Insert your explanation here
Answer:
-2. Clone your forked repo ⑥ - was in the original file
+2. Clone your forked repo: - updated this line with this content

**⑦**:
> Insert your answer here

-Follow these instructions c.a.r.e.f.u.l.l.y. ⑦
+Follow these instructions carefully.

First line (-) was updated as the second line (+)


Notice that the diff above only showed different **lines** in the file. Including whitespaces. We can also highlight changes at the word level with the --word-diff option:

Expand Down