Git could-not-restore-untracked-files-from-stash Stash application failed while copying the stash's untracked files back out.
Reviewed for reference consistency: August 11, 2026
Code is Safe
SECUREGit has paused the operation to protect your code. No data has been lost or corrupted.
What To Know
Where Did It Fail?
Commands That Trigger This
Technical Background
Untracked restoration runs as a separate phase after the tracked changes apply. Because the phase uses a temporary index and writes files Git does not otherwise manage, a collision at any path fails the whole phase while the tracked half may already be applied.
The stash entry itself is not destroyed by this failure — the untracked content remains stored in the entry's third tree. Removing the obstructing path, or the newly tracked file that took it over, lets a repeated apply place the content.
Underlying Causes
Frequently Asked Questions
Yes. They live inside the stash entry until it is dropped; showing the stash with untracked content reveals them.
The stash snapshot remembers paths, not their tracked status; if the same path gained a tracked version meanwhile, the two claims conflict on apply.
Related Git States
Git prevented a branch switch because it would overwrite unsaved changes in your working directory.
Git aborted the merge because it would overwrite untracked files in your working directory.
Reapplying a stash hit conflicts, and the stash entry was deliberately kept.