Skip to content

.tip

· one of the small things

git bisect run finds the bad commit while you make tea

If you've got a command that fails on the broken version and passes on the good one, bisect can drive itself.

git bisect start HEAD v2.3.0
git bisect run pnpm test -- --filter checkout

It checks out the middle commit, runs the command, reads the exit code, and repeats, so two hundred commits take eight runs. The command can be a script that builds, starts the app and curls it, as long as it exits non-zero on the bug.

gitdebugging