How do you recover work when a laptop dies mid-feature?
IntermediateProductionRecovery and incident handling
Answer
The answer is made before the failure: push WIP branches regularly (git push origin HEAD:wip/me/feature), enable auto-save through frequent commits, and keep work in a devcontainer or cloud dev environment. Afterwards, git fetch and continue; unpushed work is gone unless the disk can be read.
More on Recovery and incident handling
Someone force-pushed over main and 12 commits vanished. How do you recover?IntermediateAfter recovery, what do you change so a force-push to main cannot happen again?AdvancedA bad migration commit was deployed. Walk through your response in the first 15 minutes.IntermediateHow do you recover a deleted repository or branch on GitHub?IntermediateHow do you find who or what pushed a specific commit to a protected branch?AdvancedCI is red on main after a merge. What is your policy?Intermediate