diff --git a/install_linux.sh b/install_linux.sh index fce0637..8ccf653 100755 --- a/install_linux.sh +++ b/install_linux.sh @@ -18,9 +18,9 @@ fi DEPLOY_BRANCH="${DEPLOY_BRANCH:-main}" echo ">>> 拉取最新代码(分支: $DEPLOY_BRANCH,强制覆盖本地修改)..." -git fetch origin -git checkout "$DEPLOY_BRANCH" -git reset --hard "origin/$DEPLOY_BRANCH" +git fetch origin "$DEPLOY_BRANCH" +git checkout -B "$DEPLOY_BRANCH" FETCH_HEAD +echo ">>> 当前 commit: $(git rev-parse --short HEAD) $(git log -1 --format=%s)" echo ">>> 安装前端依赖并构建..." cd frontend