Created
October 31, 2013 10:19
-
-
Save jlecour/7247390 to your computer and use it in GitHub Desktop.
Git Hooks (must be executable)
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 | |
if [[ `git symbolic-ref HEAD` == "refs/heads/master" ]] | |
then | |
echo "You cannot commit in master!" | |
exit 1 | |
fi | |
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 | |
set -e | |
.git/hooks/_no_commit_on_master | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment