Search code examples
giteclipsegithubegit

GitHub pull request from private to public repo possible?


I forked a public repo and made the new repo private.

I added a new remote branch on my private repo with some fixes committed.

Now, I want to create a pull request from the branch in my private repo towards the public repo I forked from.

I select the branch in my private repo and click "Pull request".

I click on "Change commits".

I can't change the organisation/repo owner. I only see my organisation, but not the one of the public repo. I could only create a pull request against master branch of my private repo, but that's not what I want.

Is it not possible to fix something of a public repo in a private one and create a pull request afterwards?


Solution

  • One solution would be to fork the original public repo into your own public repo on GitHub.
    Then duplicate your forked public repo into a private one.

    You then clone both on your local workstation, and:

    • do public and private modifications on your private local repo
    • push private modifications first to your local public repo
    • then push them to your GitHub forked public repo
    • make your pull request from your forked public repo on GitHub.