File size: 264 Bytes
558414b
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
BRANCH=$(git rev-parse --abbrev-ref HEAD)

if [[ $BRANCH =~ (master|main|develop) ]]; then
    echo "You are on branch $BRANCH. Are you sure you want to commit to this branch?"
    echo "If so, commit with -n to bypass this pre-commit hook."
    exit 1
fi

exit 0