From ae9a44a95accc6c22696f6aa84f93e71d996fbda Mon Sep 17 00:00:00 2001 From: wonder Date: Sun, 21 Jun 2026 22:12:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=83=A8=E7=BD=B2=E6=9C=BA=E5=BC=BA?= =?UTF-8?q?=E5=88=B6=E5=90=8C=E6=AD=A5=E8=BF=9C=E7=A8=8B=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8D=E6=9C=AC=E5=9C=B0=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=98=BB=E5=A1=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index d47d602..246c673 100644 --- a/deploy.sh +++ b/deploy.sh @@ -16,7 +16,8 @@ error() { echo -e "${RED}[✗]${NC} $1"; exit 1; } # ========== 1. 更新代码 ========== echo "" info "拉取最新代码..." -git pull --rebase || error "git pull 失败,请检查网络或冲突" +git fetch origin && git reset --hard origin/main || error "拉取代码失败,请检查网络" +info "已同步至最新版本: $(git log --oneline -1)" # ========== 2. 环境检查 ========== echo ""