Testing #1

Merged
LukeGus merged 9 commits from testing into main 2024-11-28 04:52:52 +00:00
Showing only changes of commit 80c49d1510 - Show all commits

View File

@@ -10,6 +10,9 @@ fi
COMMIT_MESSAGE=$1
BRANCH_NAME=$2
# Ensure Git is using the credential helper for HTTPS
git config --global credential.helper store
# Check if the branch exists
BRANCH_EXISTS=$(git branch --list "$BRANCH_NAME")
@@ -51,6 +54,8 @@ if [ $? -ne 0 ]; then
fi
echo "Pushing changes forcefully to branch: $BRANCH_NAME"
# Set GIT_ASKPASS to bypass the password prompt using the stored credentials
export GIT_ASKPASS=echo
git push -f origin "$BRANCH_NAME"
if [ $? -ne 0 ]; then
echo "Push failed."