Gitflow
🩺Bisect a RegressionHard+700 XP
Workshop
Scenario reference

Bisect a Regression: the situation, step by step

The situation

Login was working 3 weeks ago. Now it's broken. 87 commits landed since then. Binary search through them.

git bisect halves the commit range each step. Mark good/bad until you find the culprit.

Hard · 4 steps · +700 XP

What you will practice

This scenario walks through 4 steps, in order:

  1. 01Start bisect
  2. 02Mark current as bad
  3. 03Mark the old known-good commit
  4. 04End bisect after finding it
Reveal the step-by-step commands

Try the terminal first — you learn more by doing. When you want to check yourself, here is the command for each step.

  1. 1. Start bisect
    git bisect start
  2. 2. Mark current as bad
    git bisect bad
  3. 3. Mark the old known-good commit
    git bisect good bi00001
  4. 4. End bisect after finding it
    git bisect reset

Key takeaway

log2(87) ≈ 7 steps. Bisect turns hours into minutes.