Created
July 26, 2020 08:55
-
-
Save SimonHoiberg/589d68cface0b21ef2a502a029975f5a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
if [ 'master' = ${current_branch} ] | |
then | |
echo "ERROR: Not allowed to push to master." | |
exit 1; | |
else | |
exit 0; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment