Example 1 — Find and undo the commit that broke scoring
Show the steps and the answer
Read the commit messages for anything about scoring: c3 changed the coin value from 10 to 1.
Clear messages let you find a behaviour change without opening every file.
Confirm with a diff of c2 against c3: the line coin_value = 10 became coin_value = 1.
The diff shows exactly which lines changed, so the bug came from c3 and not from the pause menu in c4.
Revert c3: Git adds a new commit, c5, that changes coin_value = 1 back to coin_value = 10.
A revert adds an undo commit instead of deleting history, so c4's pause menu stays and the record shows what happened.
Play and collect 3 coins: the score is 30.
3 × 10 = 30 confirms the intended value is back.
Answer: Revert c3. The new commit c5 restores coin_value = 10, the pause menu from c4 stays, and 3 coins score 30.
Takeaway: Small commits with clear messages turn 'what broke?' into reading the history and undoing one commit.