Git Bisect: Find the Exact Commit That Introduced a Bug
How to use git bisect to binary-search through commits and find exactly which commit introduced a bug. With automated bisect.
Manual Bisect
git bisect start\ngit bisect bad // current commit is broken\ngit bisect good v1.0.0 // this version was working\n// Git checks out a middle commit. Test it, then:\ngit bisect good // or: git bisect bad\n// Repeat until Git finds the exact commit\ngit bisect reset // doneAutomated Bisect
git bisect start HEAD v1.0.0\ngit bisect run npm test // runs tests automatically
Try It Free
Use our free online tool — 100% client-side, no data leaves your browser.
Open .gitignore Generator