You just edited a file, but `git status` says `nothing to commit, working tree clean`.
AdvancedTroubleshootingConfig, Line Endings, Files and Platform Quirks
Answer
Likely causes → A file system monitor (core.fsmonitor, builtin daemon or Watchman) missed the change and returned a stale answer, common after sleep/resume, editing through a network mount or Docker, or when the daemon crashed. Less often the file is marked assume-unchanged or skip-worktree.
Diagnose →
git config --show-origin core.fsmonitor
git -c core.fsmonitor=false status # if the file appears now, fsmonitor is stale
git ls-files -v | grep -E '^[a-zS] ' # lowercase = assume-unchanged, S = skip-worktree
Fix → Restart the monitor and refresh:
git fsmonitor--daemon stop # builtin; it restarts on the next command
# Watchman: watchman watch-del "$(pwd)" && watchman watch-project "$(pwd)"
git update-index --really-refresh
For flagged files: git update-index --no-assume-unchanged <file> or --no-skip-worktree <file>.
Prevent → Do not enable fsmonitor on network or container mounts, and avoid assume-unchanged as a way to "ignore" tracked config files.
More on Config, Line Endings, Files and Platform Quirks
`warning: in the working copy of 'app.sh', LF will be replaced by CRLF the next time Git touches it`Beginner`git diff` shows `old mode 100755` / `new mode 100644` for hundreds of files with no content change.BeginnerCloning on Windows fails with `error: unable to create file src/very/deep/.../component.test.ts: Filename too long`.BeginnerYou renamed `header.tsx` to `Header.tsx` on macOS. Locally everything builds, but Linux CI fails with `Module not found: Can't resolve './components/Header'`.IntermediateCheckout on Windows fails with `error: invalid path 'logs/2024-01-01T10:00:00.log'` (or `'docs/aux.md'`) and `fatal: unable to checkout working tree`.IntermediateClone prints `warning: the following paths have collided (e.g. case-sensitive paths on a case-insensitive filesystem) and only one from the same colliding group is in the working tree:`Intermediate