> ## Content Index
> Fetch the complete content index at: https://debugly.dev/llms.txt
> Use this file to discover other available public pages before exploring further.

# The git bisect Run That Found the Commit in Nine Steps
- URL: https://debugly.dev/git-bisect-found-the-commit/
- Published: 2026-10-09T16:04:00.000Z
- Updated: 2026-10-17T05:55:56.000Z
- Description: Three hundred commits sat between the working build and the broken one, and the binary search narrowed it to a single change in nine tests instead of three…
- Author: Rohit Bhadani
- Tags: Tooling, Git, Debugging

I started at the ten minutes, because that is where the symptom landed, and walked it backwards link by link until the broke stopped looking innocent.

Strip the binary search through history down and one property makes it the fastest path: the search is logarithmic, so three hundred commits cost nine tests rather than three hundred, and the nine is the difference between the ten minutes and the day.

This was a regression in a web app, and every repository with a testable behaviour behaves the same way.

## Why the reading was hopeless

The three hundred commits were the two weeks, and the two weeks were the team's work, and the work was the unrelated, and the unrelated was the ninety percent, and the ninety percent was the noise, and the noise was the reading's cost, and the cost was the day, and the day was the guess, and the guess was the likely commit, and the likely was the recent, and the recent was the wrong, because the regression was the ten days old and the symptom was the new.

The reading is the linear search, and the linear is the O n, and the n is the three hundred, and the three hundred is the day, and the day is the waste, and the waste is the reason the bisect exists, and the exists is the logarithmic, and the logarithmic is the nine, and the nine is the ten minutes, and the minutes are the tool's value.

The symptom's delay is the reading's trap, because the regression's commit is not the symptom's first appearance, and the not is the gap, and the gap is the config or the data or the traffic, and the three are the trigger, and the trigger is the later, and the later is the misleading, and the misleading is the reason to search the history rather than the recent commits.

## How the bisect works

The bisect needs the two endpoints, and the endpoints are the known good and the known bad, and the two are the bounds, and the bounds are the range, and the range is the three hundred, and the three hundred is the search's space.

The tool checks out the middle, and the middle is the test, and the test is the good or the bad, and the answer is the half's elimination, and the elimination is the logarithmic, and the logarithmic is the nine, and the nine is the commit, and the commit is the answer.

The nine is the log base two of the three hundred, and the log is the binary's power, and the power is the tool's value, and the value is the ten minutes, and the minutes are the discipline, because the bisect is the first move rather than the last.

## How to run it well

**Automate the test.** The bisect run takes the command, and the command is the test, and the test is the automatic good or bad, and the automatic is the unattended, and the unattended is the nine steps in the minutes, and the minutes are the fix, and the fix is the script, and the script is the exit code, and the code is the zero for the good and the non-zero for the bad.

**Make the test fast and deterministic.** The fast is the nine steps' duration, and the duration is the ten minutes, and the deterministic is the answer's trust, and the trust is the fix, and the fix is the flaky's absence, and the absence is the requirement, because the flaky test gives the wrong answer and the wrong answer sends the search the wrong way.

**Mark the skips explicitly.** The unbuildable commit is the skip, and the skip is the tool's information, and the information is the continuation, and the continuation is the fix, and the fix is the bisect skip, and the skip is the honesty, because the guess is the wrong answer, and the wrong answer is the wasted search.

**Verify the endpoints first.** The good is the tested good, and the bad is the tested bad, and the two are the bounds' correctness, and the correctness is the search's validity, and the validity is the fix, and the fix is the two tests before the run, and the run is the ten minutes, and the minutes are the answer.

**Keep the reproduction minimal.** The reproduction is the test, and the test is the fast, and the fast is the nine steps' speed, and the speed is the fix, and the fix is the curl command or the unit test, and the two are the minimal, and the minimal is the discipline from [the curl command that reproduced the bug in four seconds](https://debugly.dev/curl-command-reproduced-the-bug/), same mechanism, different costume.

## What I now do

A regression somewhere in a range of commits is a binary search problem, so git bisect finds it in log2(n) tests rather than n. Automate the test with an exit code, make it fast and deterministic, mark unbuildable commits as skips, and verify both endpoints before starting.

The feature broke and three hundred commits sat between the last known good build and now, and reading them was a day of guessing, while the bisect found the one-line rename in nine automated steps in about ten minutes. Get that property wrong and every layer above it lies to you politely.

---

Published on [debugly.dev](https://debugly.dev/) by [Rohit Bhadani](https://debugly.dev/about/) | Founder of [Krova Cloud](https://krova.cloud/?ref=debugly.dev)