Curriculum

Curriculum

Commit a Change You Can Explain

Scenario

The booking rule is fixed and the tests pass.

  1. 1…
  2. 2…
  3. 3…

Try it yourself

Put the final checks in order before recording the change.

Reveal the explanation
  1. Inspect and stage the intended files

    The staged diff should contain the rule and its test.

  2. Verify the tests on this change

    Make sure the evidence matches what you are about to commit.

  3. 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.