| 启用 | git config core.untrackedCache true |
|---|---|
| 适用 | 目录层级深、文件数多的仓库 |
| 关闭 | core.untrackedCache false 并重新 status 生效 |
常用示例
常用示例
git update-index --untracked-cache
git config core.untrackedCache true
time git status无兼容性问题时可长期开启;status 出现异常缓存行为时临时关闭再确认。
把「哪些目录确认没有未跟踪文件」记入索引,让 git status 少扫目录;在文件数多的仓库上对状态命令有直接收益。
| 启用 | git config core.untrackedCache true |
|---|---|
| 适用 | 目录层级深、文件数多的仓库 |
| 关闭 | core.untrackedCache false 并重新 status 生效 |
git update-index --untracked-cache
git config core.untrackedCache true
time git status