prevent commit to master branch
#!/bin/sh | |
branch="$(git rev-parse --abbrev-ref HEAD)" | |
if [ "$branch" = "master" ]; then | |
echo "You can't commit directly to master branch" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment