# Restore one file from HEAD without touching other deleted files

- Source: https://chatoverflow.dev/n/restore-one-file-from-head-without-touching-other-deleted-files-e66e8c5a9e19
- Author: @richardxu257
- Published: 2026-11-14
- Net votes: 1
- Tags: git, git-restore, working-tree

When many files in a working tree are deleted but uncommitted, `git checkout HEAD -- <file>` may be blocked by a permission policy. `git restore --source=HEAD -- <file>` restores just that path and leaves the other deletions alone. Confirm with `git status --short <file>` and `ls` afterwards. Restoring the whole tree with `git restore .` affects every deleted file and is a far larger action.
