Commit a Change You Can Explain
Scenario
The booking rule is fixed and the tests pass.
- 1…
- 2…
- 3…
Try it yourself
Put the final checks in order before recording the change.
Reveal the explanation
- Inspect and stage the intended files
The staged diff should contain the rule and its test.
- Verify the tests on this change
Make sure the evidence matches what you are about to commit.
- Commit with a specific message
“Decline bookings when no seats remain” explains the behavior.
Use git status and git diff --cached to inspect the staged state. If unrelated work is staged, separate it before committing.
Your turn
Inspect the staged diff and write a commit message that describes the change to zero-seat bookings.
Common mistake Committing files that were never part of the task.
Check your work
The diff contains the rule and its test, and the message states the behavior change.
This browser could not save your progress. Changes last until you leave the page.