Converting a forked public repo to private repository on GitHub

I need help with repository visibility settings after forking.

I recently forked a public project on GitHub and now I want to change my fork to be private instead of public. I already have a paid GitHub account that supports private repositories, so that’s not an issue.

The problem is I can’t figure out where to find the setting to make this change. When I go to my fork’s settings, I don’t see an obvious way to switch from public to private visibility.

Is there a specific section in the repository settings where I can modify this? Or do I need to do something different when creating the fork initially?

Any step-by-step guidance would be really helpful since I want to keep working on this project but need it to remain private for now.

u can’t change a repo from public to private once its forked on GH. best to just create a new private repo and copy your code there. just keep in mind, ud lose the fork connection and commit history.

GitHub allows you to change repository visibility, but there are restrictions for forks. Navigate to your repository settings and look for the “Danger Zone” section at the bottom; there you should find “Change repository visibility”. However, if your fork is from a public repository, GitHub often prevents you from making it private due to their policies on forks. As forks inherit properties from the original repository, this is likely why the option is unavailable. If you encounter this issue, your best option is to create a new private repository and manually copy your code. Be aware that doing this will sever the connection with the original project.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.