Git feels expensive when a branch is messy and the next command might rewrite work. The fix is not memorizing a heroic recovery spell. The fix is a small sequence you can recall before panic gets involved.
1. Inspect before changing state.
Start with `git status`, `git branch`, `git log --oneline --decorate --graph`, and `git reflog`. These commands tell you where HEAD is, what is uncommitted, what moved recently, and which commits are still reachable.
2. Preserve before undoing.
If there is work you care about, keep it reachable. Commit to a temporary branch, stash intentionally, or save a patch. Recovery gets much easier when you have a named place to return to.
Most Git trouble gets worse when people skip straight to a destructive command without first preserving the current state.
3. Pick the narrowest undo.
`restore`, `reset`, `revert`, `checkout`, and `rebase` do different work. A calm recovery habit asks what should move: a file, the index, HEAD, branch history, or a public commit. The command follows from that decision.
4. Verify before sharing.
After recovery, read the graph again. Check the diff, check the branch, and check the remote. A clean-looking working tree is not the same thing as a safe shared history.
GitDrill exists for these moments: not to make Git clever, but to make the common recovery path familiar before it matters.