The Prompt BakeryTemplates and prompts

Fix · GitHub and Git

I lost my work after a reset or a bad command

Blocks your work

What you may see

  • My commits disappeared after reset, rebase or switching branch
  • Files are gone and I never pushed

Most likely cause

Git almost never deletes saved commits at once; they stay in a hidden log (the reflog) for weeks.

Check first (about two minutes)

  1. Stop. Do not run more commands that change files.
  2. Run git reflog and look for the line from before the mistake.

The fix prompt

What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.

Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.

Prompt language

Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.

After you tried it, did it work?

Steps

  1. Do not change anything yet. Run git reflog -30 and git status and show me.
  2. Help me find the entry from just before the mistake, and show what commit it points to (git show --stat <hash>).
  3. Create a branch there: git branch rescued <hash>. It changes nothing else.
  4. Compare rescued with my current branch and help me bring back only what I need.

Do not do this

  • Do not delete the .git folder or reinstall Git.
  • Do not keep working in the broken state: it makes recovery harder.
  • Do not run git gc or git prune.

Related

Try another entry

How can we help?

What do you need?
Your email, so we can reply (optional)Only enter your own email. We reply there.