Skip to content

Instantly share code, notes, and snippets.

@hSATAC
Created December 16, 2011 07:24
Show Gist options
  • Save hSATAC/1484954 to your computer and use it in GitHub Desktop.
Save hSATAC/1484954 to your computer and use it in GitHub Desktop.
#!/bin/sh
branch=$(git rev-parse --abbrev-ref HEAD)
if [ "$branch" == "master" ] || [ "$branch" == "qa" ] || [ "$branch" == "staging" ]
then
echo "You shouldn't commit to [$branch] directly."
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment