Skip to content

Instantly share code, notes, and snippets.

@meetwudi
Created April 16, 2015 07:52
Show Gist options
  • Select an option

  • Save meetwudi/43b68addbddfaa86a281 to your computer and use it in GitHub Desktop.

Select an option

Save meetwudi/43b68addbddfaa86a281 to your computer and use it in GitHub Desktop.
Git pre-commit hook
# Do not push to master
if [ $(git rev-parse --abbrev-ref HEAD) == "master" ]
then
echo 'Hello'
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment