You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MESSAGE="You CAN NOT '$PUSH_COMMAND' to '$PROTECTED_BRANCH'. You should 'git fetch && git merge origin $PROTECTED_BRANCH' first, then 'git push' without force option again."
if [[ $PUSH_COMMAND =~ $IS_DESTRUCTIVE ]] && [ $CURRENT_BRANCH = $PROTECTED_BRANCH ]; then
echo >&2 $MESSAGE
exit 1
fi
if [[ $PUSH_COMMAND =~ $IS_DESTRUCTIVE ]] && [[ $PUSH_COMMAND =~ $PROTECTED_BRANCH ]]; then
echo >&2 $MESSAGE
exit 1
fi
if [[ $PUSH_COMMAND =~ $WILL_REMOVE_PROTECTED_BRANCH ]]; then