Restore a deleted file

Restore a deleted file in Git — with the four heights of help laid out: do it now, make it easier for the next person to accept, work out the right move when you are stuck, and learn the pattern so it stops coming back.

4prompt heights
Open it in the interactive atlas →

The four heights

The same task, four distances: today's deadline, the next reviewer, the stuck moment, the pattern.

Execute — do the immediate task

+
I need to restore a deleted helper file lib/helpers/formatDate.js that I accidentally removed and…
I need to restore a deleted helper file lib/helpers/formatDate.js that I accidentally removed and commit the recovery before the release cutoff. Give me the exact commands to recover it from the last commit where it existed, confirm its contents, and produce the commit message text I should use before pushing.

Improve — make it easier to accept

+
Before I restore the deleted file, make the recovery audit-friendly: show how to find when it was…
Before I restore the deleted file, make the recovery audit-friendly: show how to find when it was deleted and by whom, extract that revision of the file, and include a one-line explanation in the commit referencing the original deletion commit hash and why we’re restoring it. Show the exact commands and the note I should add to the PR description.

Decide — diagnose the stuck moment

+
I restored lib/helpers/formatDate.js from an older commit to get the build working, but some tests…

I reverted a deletion and now tests fail because the file version mismatches expectations

I restored lib/helpers/formatDate.js from an older commit to get the build working, but some tests now fail because behavior diverged. I don’t know whether to keep the old version, merge behaviors, or reimplement the new behavior. Recommend how to compare the deleted version to the last removed one, steps to produce a minimal reconciled file, and the pragmatic choice to make under a timebox for the release.

Become — change the pattern

+
Our repo has several restores where someone pulled an old file back and it caused subtle bugs. Help…

We keep restoring deleted files that break assumptions later in QA

Our repo has several restores where someone pulled an old file back and it caused subtle bugs. Help me create a simple restore policy: how to check deletion context before recovery, when to open a ticket instead of restoring, and a short review checklist to follow when reintroducing removed code so QA isn’t surprised.

Next to this one

Other version control work people do in Git.

Every task here came from the work, not from a feature list — which is why the prompts name what you want done and never the button that does it. The tool changes; the work does not.
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.

The rest of the map

Same library, five ways in.