Skip to content

Instantly share code, notes, and snippets.

@ktravis
Created Aug 27, 2015
Embed
What would you like to do?
git hook to run tests pre-commit
#!/bin/bash
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
RET=0
if [ "$CURRENT_BRANCH" != "gh-pages" ]; then
make test
RET=$?
fi
exit $RET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment