Hey everyone,
I’m trying to figure out how to make a private version of a public GitHub repository. I’ve got a paid account that lets me have private repos, but I’m not sure about the process of turning a public fork into a private one.
Has anyone done this before? What steps do I need to follow? I’d really appreciate some guidance on this. Thanks in advance for any help!
Also, I’m curious if there are any downsides to doing this. Will I still be able to sync with the original repo if I want to? Let me know if you have any experience with this.
I’ve actually gone through this process recently for a work project. Here’s what worked for me:
First, create a new private repository on GitHub. Then, clone the public repo you want to copy to your local machine. Change the remote URL of your local clone to point to your new private repo. Finally, push all the code to your private repo.
One thing to keep in mind is that you won’t be able to directly sync with the original public repo anymore. You’ll have to manually fetch updates and merge them into your private copy. It’s a bit more work, but it gives you full control over what changes you incorporate.
The main downside I found is losing the ability to easily contribute back to the original project. But if you need to keep your work private, it’s a small trade-off. Just be sure you’re not violating any licenses by privatizing the code.
hey lucask i’ve done this before. clone public repo, create private one, change remote url, push code. downside: no auto sync with original; must update manually.