Skip to content

Instantly share code, notes, and snippets.

@bytespider
Created June 10, 2013 13:31
Show Gist options
  • Save bytespider/5748723 to your computer and use it in GitHub Desktop.
Save bytespider/5748723 to your computer and use it in GitHub Desktop.
Useful git hooks
# stash unstaged changes so they are not included in the tests
git stash -q --keep-index
npm test
RESULT=$?
# put the unstaged changes back
git stash pop -q
[ $RESULT -ne 0 ] && exit 1
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment