Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github - Fork a private repo

Tags:

I have been added to an organization that has some private repositories and I need to send them a pull request with some changes but I don't know if I can.

I haven't a paid account on GitHub, so how can I fork that private repo to modify and send pull requests?

like image 402
Christian Giupponi Avatar asked Sep 02 '12 16:09

Christian Giupponi


People also ask

How do I fork a repo to a private repo?

Just go to https://github.com/new/import . In the section "Your old repository's clone URL" paste the repo URL you want and in "Privacy" select Private .

Can I make a forked private repo public?

Give feedback. Hmmm I understand, private forks can't be made public. You could try to duplicate the repository.

Why is GitHub fork disabled?

As I didn't find this checkbox for personal private repositories. If so, then you need to: go to your organisation's settings, Member privileges, and check "Allow forking of private repositories" there. go to your repo and you'll see "Allow forking" will be automatically checked after doing step 1, like this.

How do I give someone access to my GitHub fork?

On GitHub.com, navigate to the main page of the repository. Under your repository name, click Settings. Under "Features", select Allow forking.


2 Answers

As mentioned in "If I fork someone else's private Github repo into my account, is it going to appear in my account as a public repo?", you can fork a private repo (for which you were added as a private user). The resulting repo will still be private, and you will be able to make pull-requests.

like image 73
VonC Avatar answered Sep 19 '22 13:09

VonC


You can make a pull request from a branch in the private repository without the need to fork it.

The workflow we are starting to use is:

 1. clone the private repository  2. make a branch  3. work on the branch  4. push the branch to the private repository  5. goto GitHub and create a pull request from the branch on the private repository  6. someone else reviews the the pull request and decides to merge it with master on GitHub  7. delete the branch unless there was a problem and it was not merged then go back to #3 
like image 20
Nothus Avatar answered Sep 21 '22 13:09

Nothus