Skip to content

Instantly share code, notes, and snippets.

@joscha
Created January 1, 2016 06:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joscha/689f1a8b1381175713a3 to your computer and use it in GitHub Desktop.
Save joscha/689f1a8b1381175713a3 to your computer and use it in GitHub Desktop.
Automated bisect for node projects

Script to run an automated git bisect in a node project.

This script assumes a standard location of node_modules and a defined test script.

$ git bisect bad # mark current revision as bad
$ git bisect good origin/master # mark origin/master as good
$ git bisect run ./test.sh # run automated bisection
$ git bisect reset # reset the bisect
#!/bin/sh
set -e
rm -rf ./node_modules || exit 125
npm install || exit 125
npm test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment