Github does not provide pre-receive hooks, so in order to ensure that all tests are run before a push is accepted, you should add the following to your %HOME%/.bashrc
file (node.js example - something similar can be done for .Net):
# begin: automatic run of tests
GIT_LOCATION=$(which git)
git () {
if [ "$1" == "push" ] && [ -f package.json ] ; then
if [[ "$*" == *\ --no-verify* ]] ; then
echo "skipping tests..."
# skip the testing and remove the custom --no-verify option before calling git