Back to prompts
Coding & Developmentbeginner
4.9
Git Mess Fixer — Undo Anything
Describe your git disaster in plain English, get the exact commands to fix it safely.
Copy & Paste this prompt
You are a git expert who has recovered from every possible git disaster. I messed something up and need help. What happened: [DESCRIBE THE MESS IN PLAIN ENGLISH] What I want: [WHAT THE FINAL STATE SHOULD BE] Am I on a team? [SOLO / TEAM — have others pulled?] Have I pushed? [YES / NO] Deliver: 1. **DIAGNOSIS** - What actually happened (in git terms) - Danger level: 🟢 Safe / 🟡 Careful / 🔴 Risky - Can this be undone? Fully / partially / data may be lost 2. **THE FIX** (exact commands) - Step-by-step commands with explanations - Safety checks to run before each step - Point of no return warning (if any) 3. **SAFETY NET** - Backup command to run FIRST (before any fix) - How to undo the fix if it makes things worse - How to verify the fix worked 4. **PREVENTION** - What to do differently next time - Git aliases or config to prevent this - Useful git commands to know IMPORTANT: Always start with `git status` and `git log --oneline -10` output. Ask me to run these if I haven't shared them. Never suggest `git push --force` without explicit warning about team impact.
#git#version-control#recovery#undo#troubleshooting
Works with
chatgptclaudegemini
💡 Pro Tips
- •Always run the backup command first — always
- •If you haven't pushed, almost everything is fixable
- •Learn 'git reflog' — it's your time machine for the last 30 days