# Git Bisect Regression

> Find the commit that introduced a regression automatically with git bisect run.

- Skill: `alexngai/git-bisect-regression` (Agent Skill)
- Install (CLI): `npx skillmds@latest add alexngai/git-bisect-regression`
- Raw SKILL.md: https://api.skillmd.com/api/skills/alexngai/git-bisect-regression/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: alexngai (https://skillmd.com/u/alexngai)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/alexngai/git-bisect-regression

---


# Find a Regression with git bisect

1. `git bisect start`, then `git bisect bad` (now) and `git bisect good <known-good-sha>`.
2. Write a script that exits `0` when the code is good and non-zero when it's broken.
3. `git bisect run ./check.sh` — git binary-searches history and prints the first bad commit.
4. `git bisect reset` when done to return to your branch.

