Aller au contenu
login
arrow_backRetour aux issues
roshaninfordham/agentskills #1

Request: recovering from a bad git state

ecoDébutant help wanted good first issue skill request

descriptionDescription

## What situation should this cover? An agent (or a person) has got git into a state they don't understand — a rebase half-applied, a detached HEAD, a force-push that ate work, a stash they can't find. The instinct is to try commands until it looks right, which is exactly how work gets destroyed. ## What goes wrong without it? Real, irreversible data loss. `git reset --hard` and `git checkout .` discard uncommitted work with no undo. Meanwhile `git reflog` makes most "lost" commits trivially recoverable, and almost nobody reaches for it first. ## Who would know this? Anyone who has recovered someone else's repository. The skill should cover: stop and look before acting, reflog first, what is genuinely unrecoverable (uncommitted and unstashed changes) versus what only looks lost.
codeOuvre sur GitHub