From e4cb0227667aff7487fa1251d6a067b302c13bde Mon Sep 17 00:00:00 2001 From: pvincent Date: Wed, 29 Oct 2025 11:41:48 +0000 Subject: [PATCH] git --set-upstream-to=origin/ --- lib/setup-prod-normal-user.bash | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/setup-prod-normal-user.bash b/lib/setup-prod-normal-user.bash index 22b74ae..7f017b2 100644 --- a/lib/setup-prod-normal-user.bash +++ b/lib/setup-prod-normal-user.bash @@ -36,18 +36,21 @@ function install_mise { function pull_repo { if [[ ! -d .git ]]; then git config --global init.defaultBranch $REPO_BRANCH + git config pull.rebase true git init git remote add origin $REPO_URL fi + git branch --set-upstream-to=origin/$REPO_BRANCH $REPO_BRANCH + if git fetch origin $REPO_BRANCH --dry-run --verbose 2>&1 | grep -q " =.*\-> origin\/$REPO_BRANCH"; then set +Eue $FORCE || exit 100 # means no change set -Eue fi - git config pull.rebase true - git pull origin $REPO_BRANCH + git checkout -q $REPO_BRANCH + git pull --tags } function install_rails {