# 警告：检测到时钟偏差。您的构建可能不完整。

- **ID:** `git/warning-large-filesystem-time-skew`
- **领域:** git
- **类别:** runtime_error
- **验证级别:** ai_generated
- **修复率:** 90%

## 根因

运行 git 的机器系统时钟与工作树中文件的时间戳存在显著差异，导致 git 误判文件修改时间，可能跳过重建或产生过时的输出。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| git 2.20.0 | active | — | — |
| git 2.38.0 | active | — | — |
| git 2.45.0 | active | — | — |

## 解决方案

1. ```
   sudo ntpdate -s time.nist.gov  # Sync system clock with an NTP server to eliminate the skew
   ```
2. ```
   git add -A && git commit --allow-empty -m 'reset timestamps'  # Force a commit to reset internal timestamps, but this is a temporary fix
   ```

## 无效尝试

- **** — Running git clean -fd to remove untracked files does not fix the clock skew issue; it only deletes files without addressing the root cause. (95% 失败率)
- **** — Manually touching all files with touch * can temporarily mask the issue but the skew will reappear on subsequent operations if clock is not fixed. (70% 失败率)
