All fixes

Help, I don't know which commit broke the app

Let Git find the guilty commit with a binary search: a handful of tests, even across hundreds of commits.

The fix

  1. git bisect start

    Starts the search.

  2. git bisect bad

    The commit you are on is broken.

  3. git bisect good v1.0

    This one still worked. Git checks out a commit halfway in between.

  4. Test the app, then answer git bisect good or git bisect bad. Repeat until Git names the first bad commit.

  5. git bisect reset

    Ends the search and takes you back to where you started.

v1.0 is an example. Replace it with your own.

Why this works

bisect halves the suspect range with every answer. Between a good and a bad commit 100 commits apart, you test about seven times. It works with any test you can run: open the app, run a script. git bisect run npm test even does the testing for you.