Created
September 9, 2015 15:04
-
-
Save oh-sky/2c3b6cdfa8b941f585e1 to your computer and use it in GitHub Desktop.
masterブランチへのコミットを禁止するgit-hook
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 | |
BRANCH=`git rev-parse --abbrev-ref HEAD` | |
if test $BRANCH = 'master'; then | |
echo 'Commiting to master is forbidden.' | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment