Created
March 15, 2019 03:59
-
-
Save nyarly/ae0ff51324b36509cb6ba8a5b4d3da25 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
| #!/usr/bin/env bash | |
| if [ "$(git config --get branch.master.foolhardy)" = 'true' ]; then | |
| exit 0 | |
| fi | |
| while read local lsha remote rsha; do | |
| case $remote in | |
| **/master) | |
| echo 'Refusing to push to master!' | |
| echo " If it's that kind of joint:" | |
| echo " 'git config --type bool branch.master.foolhardy true'" | |
| exit 1 ;; | |
| esac | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment