MODULE 2 · Working safely
Reading · 15 min
Reviewing diffs
Reviewing diffs
A diff is a compact explanation of the difference between two versions. Reading it before committing catches accidental edits and makes collaboration kinder.
Learning objectives
- Inspect unstaged and staged changes
- Recognize accidental edits
Inspect what changed before asking others to review it. Focus on explaining each decision in your own words before relying on a pattern or shortcut.
Example
git diff
git diff --stagedSummary
KEY TAKEAWAYS
- Diff review is a quality check.
- Staged and unstaged changes are different sets.
Reading material
Reviewing diffs practice prompt
Use the exercise in this lesson to check your understanding.
Your progress is saved on this device. Sign in to keep it across devices.
