Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

answered diff questions #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,37 @@ 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
> Insert your explanation here:
diff header: the files being compared are a/readme and b/readme

**②**:
> Insert your answer here
> Insert your answer here:

not sure what the index is.

**③**:
> Insert your explanation here
original file (-)


**④**:
> Insert your answer here
section header - it is comparing the diff of lines 8-9 in the original with lines 8-12 in the new file.


**⑤**:
> Insert your answer here
this is an identical line (unchanged)


**⑥**:
> Insert your explanation here
this line has been removed in the new file from the original and 3 additional lines added in the new file.


**⑦**:
> Insert your answer here
carefully has been changed in the new file to remove the . inbetween.


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 Expand Up @@ -103,6 +115,8 @@ See if you can guess the overall command to produce the above diffs:

```bash
? your guess is as good as mine

git diff --word-diff
```

## Stashing
Expand Down