Commit deac4306 authored by wenwen.tang's avatar wenwen.tang 😕

docs: 补记 pull 未生效的根因(fetch 带分支名只更新 FETCH_HEAD)

parent 51c66dbf
Pipeline #839 canceled with stages
...@@ -88,12 +88,16 @@ ...@@ -88,12 +88,16 @@
不再依赖未入库的 `deploy/wecom/x/` 不再依赖未入库的 `deploy/wecom/x/`
- 新增 `.dockerignore`(上下文变成仓库根后必须裁剪 `.git` / `data` / `output` / `samples` 等) - 新增 `.dockerignore`(上下文变成仓库根后必须裁剪 `.git` / `data` / `output` / `samples` 等)
### 两个构建坑(都已修) ### 三个坑(都已修)
1. Dockerfile 在 `deploy/` 下,必须 `-f` 指定,否则报 1. Dockerfile 在 `deploy/` 下,必须 `-f` 指定,否则报
`failed to read dockerfile: open Dockerfile: no such file or directory` `failed to read dockerfile: open Dockerfile: no such file or directory`
2. **`docker build … | tail` 的退出码来自 tail**,会把构建失败**吞掉** —— 症状是 2. **`docker build … | tail` 的退出码来自 tail**,会把构建失败**吞掉** —— 症状是
"构建明明报错,脚本却继续用旧镜像重启容器"。改为重定向日志 → 取真实 rc → 回显尾部 "构建明明报错,脚本却继续用旧镜像重启容器"。改为重定向日志 → 取真实 rc → 回显尾部
3. **`git fetch origin <branch>` 只更新 FETCH_HEAD**,不会更新
`refs/remotes/origin/<branch>` → 随后的 `git reset --hard origin/main` 仍指向旧提交。
症状:sync 表面成功,服务器 repo 却停在旧版本(实测停在 `0f4af2e`,落后远端 3 个提交)。
必须用**不带分支名**的 `git fetch origin`
### 数据迁移(线上) ### 数据迁移(线上)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment