Fix “unknown repository” of an opened PR after deleted the fork

放肆的年华 提交于 2019-12-03 16:58:43

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!