Video: Read the comparison before judging a change
The video plays in YouTube’s player, in privacy-enhanced mode.
- 5 min video
- English narration · English and Arabic captions
- Watch on YouTube
Turn the hero into a runnable static project, then distinguish working, staged and recorded differences. Inspect a separate deterministic image variant without adding an image commit to the continuing course history.
Read the full lesson
The article has every step and command from the video, the practice exercise and the questions.
Video transcript
The narration of the video, cue by cue.
- Read the comparison before judging the change.
- The later hero line is still working content, not a new commit.
- Ordinary and staged diffs compare different snapshots.
- Add the full runnable inputs, keeping the existing supporting-line edit.
- New files can be missing from ordinary diff until they enter the index.
- Stage the declared inputs, not generated build output.
- The layout changes your view, not the compared bytes.
- Follow the surrounding text before interpreting an addition or removal.
- Hiding whitespace is not deleting a whitespace change.
- Run the local formatting check before committing.
- All six input-validation tests pass in this fixture.
- Build output belongs in the ignored directory, not the commit.
- Commit the reviewed runnable project locally.
- Verify two commits and no remaining tracked difference.
- Use a separate copy for image comparison, not the continuing checkpoint.
- The two exact PNG payloads identify the image states.
- Compare the named sides and their actual dimensions.
- Move the divider without changing either file.
- Opacity changes the comparison, not the saved pixels.
- Git's binary summary is not a count of changed pixels.
- An unsupported or oversized file must keep its honest notice.
- Keep the image fixture outside the canonical history.
- Predict which comparison shows a newly staged file.
- Next, select hunks and lines without discarding other work.