I did something stupid…
- I forked a repo on GitHub.
- I made some changes, committed them on my fork.
- I sent this commit as a pull-request back to the original repo.
- Here comes the stupid part: I deleted my fork.
The owner of the original repo requested a couple changes in my code before he could accept the pull-request, which I'd gladly do.
I tried re-forking the repo, but I can't checkout the commit from the pull-request, it's not even there as an "unlinked" commit (a commit that is not part of any branch or tag, I don't know the official terminology).
My question is: How can I recover the commit sent as a pull-request ?
If there's no way, re-doing the changes in a new commit is an option, but the pull-request would be lost.
My question is not about not losing the changes from the commit, it's about not losing the git history, meaning keeping the commit's SHA1 (and anything else I might not be aware of).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…