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 {