diff --git a/scripts/git-commit-push.sh b/scripts/git-commit-push.sh index 01ccb4a..fea0760 100755 --- a/scripts/git-commit-push.sh +++ b/scripts/git-commit-push.sh @@ -12,6 +12,10 @@ git commit -m "$COMMIT_MSG" BRANCH=$(git name-rev --name-only HEAD) gum confirm "Push?" && git push origin $BRANCH +if [ "$BRANCH" = "main" || "$BRANCH" == "master" ]; then + exit 0 +fi + CREATE_PR=$(gum confirm "Create PR?") if [[ "${!#}" == "-pr" && CREATE_PR -eq 0 ]]; then