问题
I have the following scenario:
- Created a fork of a github repository
- Submitted a pull request (still opened)
- Deleted the fork
Now, when I browse the opened PR on github, the repositories section says "unknown repository".
I want to revert my fork in order to make this section displaying its name.
My first idea was to re fork the upstream repository, rebase it properly (thank's to this one) and pray for that github automatically re-fill the correct name in the PR.
Unfortunately, nothing happened.
How can I achieve this ?
Should I contact support ?
回答1:
Unfortunately it looks like your pull-request will remain an orphan.
See this (still unresolved) thread: https://github.com/isaacs/github/issues/168
Probably the best thing to do would be to re-clone the repo, re-create your pull-request, delete the existing pull-request, and submit a fresh one.
Also, add a "thumbs up" to tohe issue so in the future there can be a more straight-forward solution to this problem.
回答2:
You can reclaim orphaned pull requests as
git fetch <remote> refs/pull/<pr_number>/head:<local-branch>
git checkout <local-branch>
来源:https://stackoverflow.com/questions/36071272/fix-unknown-repository-of-an-opened-pr-after-deleted-the-fork