From 57ca443386ba1253bbbcb289293f59e0f3edad8c Mon Sep 17 00:00:00 2001 From: bookworm Date: Mon, 27 Apr 2026 22:19:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0Bookworm.bat=20git=20p?= =?UTF-8?q?ull=20=E5=89=8D=20stash=20=E6=9C=AC=E5=9C=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit settings.json 由 template 渲染后与仓库版本不同, 导致 git pull --rebase 报 unstaged changes 失败。 pull 前 stash、pull 后 pop 恢复。 Co-Authored-By: Claude Opus 4.6 (1M context) --- 更新Bookworm.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/更新Bookworm.bat b/更新Bookworm.bat index 7e6fcaa..bfd27a3 100644 --- a/更新Bookworm.bat +++ b/更新Bookworm.bat @@ -22,11 +22,13 @@ if %errorlevel% neq 0 ( :: 同步 ~/.claude 配置仓库 (Skill/hook/agents) echo. echo [2/2] 同步 Claude 配置 (.claude/)... +git -C "%USERPROFILE%\.claude" stash -q 2>nul git -C "%USERPROFILE%\.claude" pull --rebase 2>&1 if %errorlevel% neq 0 ( echo [!] .claude git pull 失败 ^(不影响启动 lnk^) set HAS_FAIL=1 ) +git -C "%USERPROFILE%\.claude" stash pop -q 2>nul echo. echo ============================================