Created
          May 1, 2016 04:14 
        
      - 
      
 - 
        
Save mozillazg/b26a74f716ed5e786fe186fe64b8360c to your computer and use it in GitHub Desktop.  
Revisions
- 
        
mozillazg created this gist
May 1, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ protect_branch() { protected_name=$1 current_name=$(git symbolic-ref HEAD | sed -e "s/^refs\/heads\///") if [ "$current_name" = "$protected_name" ]; then echo "!!! OH NO! you are trying to change the **$protected_name** branch!!!" exit 1 fi } protect_branch master