A stupid way to recover a commit that has been rebased and is now unreachable (ref):
- Given unreachable commit
https://github.com/org/repo/commits/332a2b9f43f1f8d7730e0a01356ea183dfadd470
- See if you can compare them to any earlier commit you have
https://github.com/org/repo/compare/f571415f4da9cc28edc83242e353966677dabcd2...332a2b9f43f1f8d7730e0a01356ea183dfadd470
- Push your local commit up to a recovery branch
git checkout f571415f4da9cc28edc83242e353966677dabcd2; git checkout -b recovery; git push origin recovery
- See the patch commits
https://github.com/org/repo/compare/recovery...332a2b9f43f1f8d7730e0a01356ea183dfadd470.patch
and download asrecovery.patch
(you could curl unless it's private so blah blah) - Apply the patch commits and push up.
git am recovery.patch && git push origin recovery