LESSON 1.19 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Git bisect
Watch git bisect halve the suspect commits until one bad commit is left.
Needs1.18 Merge vs rebase
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 1.19 · BISECT BAY15 SUSPECTS · 0 TESTS
01
Stage 1 of 6 · Mark the ends
v1.0 passes the test, and main fails it. The 15 commits after v1.0 are suspects.
Explain it simply
Your code worked at the tag v1.0, but it's broken on main. A test shows it: add of 2 and 2 should give 4. Each commit is a saved snapshot of the code. One of the 15 commits after v1.0 brought the bug in, so all 15 are suspects, the teal dots.
16 commits in a row, c0 to c15. c0 is tagged v1.0 and passes. c15 is main and fails. 15 commits are suspects.
suspect commitHEAD, the commit under testgood commitbad commitfirst bad commit, test count
Toy: a real git repository · 8, 16 or 32 commits in a line · real hashes · one test
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
N counts the commits after the good one, up to the bad one.
PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
- 5 more stages and 3 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.