| 启用 | git config core.fsmonitor true |
|---|---|
| 平台 | 内置监控守护(Git 2.37+,Windows/macOS 支持) |
| 验证 | 对比启用前后 git status 的耗时 |
常用示例
常用示例
git config core.fsmonitor true
git status
time git status --porcelain | wc -l监控守护异常退出时 Git 会回退到扫描方式,性能「时好时坏」时检查守护状态与版本。
文件系统监控让 git status 不再全量扫描工作区:新版 Git 内置 FSMonitor(core.fsmonitor=true),在 Windows/macOS 上对大工作区收益明显。
| 启用 | git config core.fsmonitor true |
|---|---|
| 平台 | 内置监控守护(Git 2.37+,Windows/macOS 支持) |
| 验证 | 对比启用前后 git status 的耗时 |
git config core.fsmonitor true
git status
time git status --porcelain | wc -l