This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# prevent commit to local master branch | |
branch=`git symbolic-ref HEAD` | |
if [ "$branch" = "refs/heads/master" ]; then | |
echo "pre-commit hook: Can not commit to the local master branch." | |
exit 1 | |
fi | |
exit 0 |