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)" | |
# get computer name to append in Chime message | |
username=$USER | |
# a branch name where you want to prevent git push. In this case, it's "master" | |
if [ "$branch" = "master" ]; then | |
echo "You can't commit directly to '"${branch}"' branch" # webstorm or intellij will show this as popup |