Skip to content

Instantly share code, notes, and snippets.

@Createdd
Created September 15, 2018 14:28
Show Gist options
  • Select an option

  • Save Createdd/7f6e620d9204f18e8e3c6ec7e9eb09dc to your computer and use it in GitHub Desktop.

Select an option

Save Createdd/7f6e620d9204f18e8e3c6ec7e9eb09dc to your computer and use it in GitHub Desktop.
#!/bin/sh
echo "Running pre-push hook"
./exampleScrit.sh
# $? stores exit value of the last command
if [ $? -ne 0 ]; then
echo "Tests must pass before commit!"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment