git bisect

Use binary search to quickly find the commit that introduced a bug

Syntax

git bisect <subcommand> [<options>]

Parameters

ParametersDescriptionExamplesLevel
start Common
bad [<rev>] Common
good [<rev>] Common
reset , Common
run <script> , Common

Examples

: bug, v1.0.0

git bisect start
git bisect bad HEAD
git bisect good v1.0.0
Bisecting: 12 revisions left to test

git bisect good

git bisect bad

,

git bisect reset

git bisect run npm test

Tips

Related Commands