diff --git a/gitea_repo_controller.sh b/gitea_repo_controller.sh index 8e43ba3..e410e58 100644 --- a/gitea_repo_controller.sh +++ b/gitea_repo_controller.sh @@ -72,11 +72,8 @@ checkout_branch() { git pull "${AUTH_URL}" main echo "🌿 Checking out target branch: ${BRANCH_NAME}" - if git show-ref --verify --quiet "refs/heads/${BRANCH_NAME}"; then - git checkout "${BRANCH_NAME}" - else - git checkout -b "${BRANCH_NAME}" "origin/${BRANCH_NAME}" - fi + + git checkout "${BRANCH_NAME}" echo "⬆️ Rebasing '${BRANCH_NAME}' onto latest main..." git rebase main