Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • git fetch origin produces this: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Commented Oct 5, 2016 at 14:46
  • Ah, nice, with the knowledge of the refs/pull/ namespace my solution above becomes much easier. :-) But wouldn't this have the same problem than my solution, that the PR is not attached to your repo anymore as soon as you delete the fork? Or can you reattach somehow? Commented Oct 5, 2016 at 15:01
  • It could be, but I hope I can get at least the code from that PR (it was one commit, therefore it could be easier) and create a new PR and new branch then. Commented Oct 5, 2016 at 15:07
  • Yep, I just checked with GitHub staff. There is one way, but only over them. Read my updated answer. :-) Commented Oct 5, 2016 at 15:42
  • 1
    Oh this is the best answer by far! In my case I'm looking at a historical PR, merging from a forked repo, and not only is the original feature branch deleted but the entire forked repo is gone. But of course GitHub has all of those commits "somewhere", that's how they drive the UI. And that "somewhere" turns out to be a branch called pr/9608. Perfect! Commented Oct 19, 2023 at 14:27