Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If I fork someone else's private Github repo into my account, is it going to appear in my account as a public repo?

People also ask

Can I share a private GitHub repo with someone?

You can invite users to become collaborators to your personal repository. If you're using GitHub Free, you can add unlimited collaborators on public and private repositories. Repositories owned by an organization can grant more granular access.

Do private repos show up on GitHub?

Your GitHub profile shows a graph of your repository contributions over the past year. You can choose to show anonymized activity from private and internal repositories in addition to the activity from public repositories.

What happens when you fork a repo in GitHub?

A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project.

Can a fork be private GitHub?

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.


No. You can fork it and it still remains private.

Private collaborators may fork any private repository you’ve added them to without their own paid plan. Their forks do not count against your private repository quota.

https://github.com/plans


When you revoke access for a member on the main branch (master repo), it will yank the forked repo as well. So, if you added members to a team, and they forked from the master repo, always ensure that you either have merged their changes or you have a copy of their changes before you remove them from the team, as the members forked repo gets deleted when he is removed from the team and you wont have a way to fetch his changes (if only you care about those).


Here's GitHub's answer:

https://help.github.com/articles/what-happens-to-forks-when-a-repository-is-deleted-or-changes-visibility/#deleting-a-private-repository

Deleting a private repository

When you delete a private repository, all of its private forks are also deleted.


Real answer.

there are three types of repositories. private, public, and internal. Internal ones require an enterprise account, so we'll forget about them for now. :)

Any fork of one of those retains it's type. Forks of public repositories are public, and forks of private ones are private. Removing access to a private repository deletes that person's fork.

Deleting a private repository deletes all forks of it, which are also private. If you wish to keep a copy, you have to clone and publish it yourself. Which might not be allowed by the code's license. Deleting a PUBLIC repository makes all of the direct forks new masters.

Only the master can be changed from private to public, or vice versa.

Doing either disconnects all forks, and makes them into new masters, all retaining their existing type.

If you wish to delete your private repository while not deleting the other (private) forks, make it public first, which will make all of the private forks into private masters, then delete the repository.

TL:DR; If the repository is public, your fork is public, and stays forever. If the original is private, your fork is private and will vanish if the master does or you do not have access anymore, and you will have to clone and update repeatedly to be sure of keeping it.

This should hopefully answer all questions about forking and deleting. :)