Skip to content

Instantly share code, notes, and snippets.

@mark-dizon
Created January 25, 2013 11:24
Show Gist options
  • Save mark-dizon/4633658 to your computer and use it in GitHub Desktop.
Save mark-dizon/4633658 to your computer and use it in GitHub Desktop.
Remind user to run test suite before pushing code. Untested idea.
function checkpush(){
echo "Did you run the test suite?"
select yn in "Yes" "No"; do
case $yn in
Yes ) git push; break;;
No ) echo "Better run the tests first." exit;;
esac
done
}
export -f checkpush
alias 'git push' = `checkpush`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment