| name | git-pull-with-live-file-watchers |
| description | Resolve Git pulls blocked because a running editor, sync client, metadata plugin, formatter, or other file watcher recreates local changes immediately after `git stash`. Use when a pull reports that local changes would be overwritten, a normal stash appears successful, and the same files become dirty again before the pull can run. |
Git Pull With Live File Watchers
Preserve the user's work, temporarily quiesce the verified writer, fast-forward the branch, and reapply the original changes without discarding unrelated stashes.
Diagnose Before Mutating
- Run
git status --short --branch and git diff --name-only --diff-filter=U.
- Run
git fetch --prune, then compare local and upstream paths with git diff --name-status HEAD..@{upstream}.
- Inspect local diffs. Distinguish an unresolved merge from a pull blocked by dirty files.
- Create a named stash containing the affected local work. Do not include unrelated files unless required.
- Immediately check status. If the same files reappear with new timestamps, hashes, workspace state, or formatting, treat a live writer as the cause.
Do not use git reset --hard, git checkout --, or broad cleanup commands to win a race against a watcher.
Identify the Writer Safely
Resolve exact processes from executable paths. Prefer a process listing such as:
ps -axo pid=,comm=
Avoid loose pgrep -f matches: environment variables and command arguments can contain an application path and produce false positives.
Pause a process only when its ownership and relevance are clear and doing so is within the user's requested workflow. Otherwise ask the user to close or pause the application. Never terminate a process merely because its name resembles the writer.