Recover from (nearly) anything, using Git
Ever faced a disaster with git rebase or reset --hard? Don't panic! Today, you'll learn how to undo most mistakes and recover from nearly anything. Perfect for any developer!Turn Git nightmares into success stories!
For some reason, you were sure your rebase
had gone right, and you pushed to origin. Or perhaps you reset --hard
, but on the wrong commit. Then pushed -f
to origin
.
But you were wrong. And since you were the only dev on the project, everything you did in the last 4 weeks is now gone.
Absurd, I know. It shouldn't be possible. I agree. But now that we've said that, what should we do? Fixing the process won't recover those weeks of work.
Well, fret not, because your cause might just not be lost. How do I know? I've been there myself. Ten minutes ago.