FahamLah

Commands

git bisect (start

git bisect (start | good | bad | skip | run | log | reset)

Risk: Careful

What it does

Finds the commit that broke something by halving the history.

When to use it

When it worked before and you don't know which commit broke it.

Example

$ git bisect start HEAD HEAD~9

Bad is HEAD, good is nine commits back. Git checks out the middle.

$ git bisect good

The commit you are testing works.

$ git bisect bad

The commit you are testing is broken.

$ git bisect run sh test.sh

Let a test script judge every step for you.

$ git bisect reset

Finish and go back to your branch.