2026年10月10日5 MIN访问统计加载中只读检查里的 git status 会改写索引文件,加 --no-optional-locks 解决git status 发现文件修改时间变了,会顺手刷新并写回 .git/index,写的时候还要占用 index.lock。只读的后台检查这样做会改动用户的仓库,也可能让用户同时执行的 git add 失败。给这类调用加上 git --no-optional-locks 即可。postmortemGit