Seeing Changes with git diff
git diff shows exactly what changed since the last git add. Lines starting with + were added and lines starting with - were removed. Add --staged to see what is about to be committed.
After staging, plain git diff shows nothing, because the change is now in the staging area. git diff --staged shows it.
Quick check
Which command shows changes that are staged for the next commit?
Your turn: write the code
list.txt is committed for you, then changed. Print only the line of git diff that mentions pears.
Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.
Tip: use the left and right arrow keys to move between lessons.