mirror of
https://git.openapi.site/https://github.com/desirecore/agent-desirecore.git
synced 2026-12-05 13:09:37 +08:00
- schedules/f8f451d6.json:被 .git/info/exclude 排除、此前从未入库,git add -f 显式纳入,让修复随仓库分发给用户 - memory/lessons/2026-11-08:git status 干净≠已入库 - .gitignore:/inbox/ 不入库不分发(收件箱含用户私有工作记录)
1.5 KiB
1.5 KiB
id, type, pinned, created_at, topics
| id | type | pinned | created_at | topics | |||||
|---|---|---|---|---|---|---|---|---|---|
| mem_2026-11-08-git-status-clean-not-tracked | lesson | false | 2026-11-08T11:05:00+08:00 |
|
L0
"git status 干净"≠"文件已入库"——被 .git/info/exclude 忽略的文件不显示;断言已提交必须 git ls-files 验证。
L1
事件(2026-11-07→08)
我说"调度文件已被后端自动提交进 git(git status 干净)"——错。
实测:agents/desirecore/schedules/ 被 .git/info/exclude: /schedules/ 排除,
头像自动化修复文件从未入库。git status 干净只是"无追踪变更+无未跟踪提示"
(被 ignore 的文件两样都不显示)。照现状推送,GitHub 仓库里根本没有修复。
规则
- 断言"某文件已提交/已入库"前,必须
git ls-files --error-unmatch <file>或git ls-files <dir>验证——status 干净、文件在目录里,都不证明它在库里。 - 分发审计双查(推送/打包/交付前逐项核):
- 要发的文件必须在
git ls-tree里命中(本例 schedules 修复缺席) - 不该发的文件必须不在(本例 inbox/ 42 个收件箱被 auto-commit 入库,含 用户 UUID 路径与项目名,公开仓库必须剔除)
- 要发的文件必须在
- 平台运行时目录可能被
.git/info/exclude本地排除(如 /schedules/)—— 需要随仓库分发的资产要git add -f显式入库,并回读 git ls-tree 验证。 - 同族教训再加一条:回报说了≠磁盘有了;status 干净≠已入库。