🍴GitHub Deletes Private Forks Leaving People Shocked

Tom Smykowski
4 min readFeb 2, 2023

Github is one of the repository management systems out there. I know a lot of people use them for private and commercial projects. You can find some in my series of articles about the most interesting ones.

Often, when I want to play with a project, I am forking it to modify the code and upload it to the fork rather than to the original one.

Forking a repository feels like you store the code on your account and it is safe from any actions the owner of the forked repository does. For example when he removes it, you still keep your fork.

Usually that is true. But not always, so it’s important to know when it’s not to not loose your work. Especially the second case is unknown and may be surprising.


Github reserves the right to terminate your access to the service for any reason or even with no reason at all:

GitHub has the right to suspend or terminate your access to all or any part of the Website at any time, with or without cause, with or without notice, effective immediately. GitHub reserves the right to refuse service to anyone for any reason at any time.

Such action can lead to your repositories and forks being removed to. It may be a copyright issue, other legal issue, whatever. GitHub can remove your account at any given time.

Private Fork Base Removed

Second case is more tricky, because no one knows about it. Forking a private repository is different from forking a public one.

When a user owning a private repository deletes it, or revokes your access to the repository, your fork gets deleted too.

It is explained in the documentation:

If you remove a person’s access to a private repository, any of their forks of that private repository are deleted.

And also:

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

What it means is that a fork of a private repository is not owned by you, it is owned by the owner of the original repository.



Tom Smykowski

I will be able to write the next article when 9 people will become a member. Become a member now: https://medium.com/membership/@tomaszs2