Skip to content

Instantly share code, notes, and snippets.

@unsetbit
Created January 13, 2013 05:36
Show Gist options
  • Save unsetbit/4522501 to your computer and use it in GitHub Desktop.
Save unsetbit/4522501 to your computer and use it in GitHub Desktop.
Pre-commit hooks for my JS projects
# Put in to .git/hooks/pre-commit
# Redirect output to stderr.
exec 1>&2
# Run unit tests
grunt test
TEST_STATUS=$?
if [ $TEST_STATUS != 0 ]; then
exit $TEST_STATUS
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment