im literally losing my mind here git rescue in steps:
- Don't panic, and don't run
git gc. 2, rungit reflogto see recent HEAD positions. 3, find teh entry from before teh mistake (reset, rebase, checkout). - Create a branch there:
git branch rescue <hash>. - inspect it, then merge or reset back as needed.
this saved me after a rebase went wrong. every command that moves HEAD gets an entry, with a short description like "rebase: ..." or "reset: moving to ...".
