Live data from Hacker News

Tell HN: GitHub will delete your private repo if you lose access to the original

news.ycombinator.com

271–280 of 294 posts

Re: Tell HN: GitHub will delete your private repo if you lose access to the original

#271
post #198

Earlier quoted context omitted.

to my private repository, but not their own private repository. like it happens when a public repo goes private: I don't loose access to my fork of the repo but access to the original repo

GitHub doesn't allow you to make a public fork of a private repo, either. When you make a fork of a private repo, the resulting repo is constrained to have no broader access than the original.

"GitHub doesn't allow you to make a public fork of a private repo, either. "

where did I claim something like that?

Re: Tell HN: GitHub will delete your private repo if you lose access to the original

#272

Earlier quoted context omitted.

I guess this is a question of who should have been given further information. For example, whoever at the organization deleted the repo would have been given a very clear warning screen including the number of forks that would be deleted by their action prior to them doing it. On that note, an organization admin can _directly_ delete your private fork without even deleting the source repository if they want. GitHub's…

In my opinion in this case the fork shouldn't be allowed to be created at all. If this is the final effect it's better to inform the user that "no, we don't let you fork the repo". So he could have done it the normal way, clone the repo and push it with another remote, that would have not had this issue. To this day I thought that the "fork" concept was only a relationship at the level of UI, but as I see it has a lo…

I think you're misunderstanding the way that a lot of orgs use forks. Many orgs will have the team fork the repo under their own account so they get their own working space, and then they make PRs from their forks back to the origin. Before branch protections it was also the best way to manage write permission. This is a really common pattern and not allowing it would break how a lot of people use github.

If the org doesn't work this way, it can disable forking so that it's not allowed at all on the repo (or org-wide), like you said.

Re: Tell HN: GitHub will delete your private repo if you lose access to the original

#273
post #188

Earlier quoted context omitted.

GitHub coined this particular use of "fork", and it's always been about having an automatically managed relationship between the original repository and the new one. A copy without that automated connection is a clone.

No, it definitely predates GitHub. And git itself, by at least a full decade. https://en.wikipedia.org/wiki/Fork_(software_development)#Et...

GitHub specifically invented the idea of "forking" as a social action on a forge site that allows you to create your own associated copy of a repository. This is related to but different from the broader meaning of "fork". "Fork" doesn't mean anything at the git level.

Re: Tell HN: GitHub will delete your private repo if you lose access to the original

#274
post #194

Earlier quoted context omitted.

Right, the entire point of GitHub forks is to make it easier to upstream your local changes to the original repository. If you have no interest in doing that you shouldn't use a fork.

you know you can fork dead and abandoned projects right?

Sure, you can. It might not be a good idea in the long term.

Re: Tell HN: GitHub will delete your private repo if you lose access to the original

#275
post #198

Earlier quoted context omitted.

GitHub doesn't allow you to make a public fork of a private repo, either. When you make a fork of a private repo, the resulting repo is constrained to have no broader access than the original.

"GitHub doesn't allow you to make a public fork of a private repo, either. " where did I claim something like that?

I'm saying that GitHub consistently does not allow you to control access to a private fork. The original owners retain control.

Re: Tell HN: GitHub will delete your private repo if you lose access to the original

#276
post #273

Earlier quoted context omitted.

No, it definitely predates GitHub. And git itself, by at least a full decade. https://en.wikipedia.org/wiki/Fork_(software_development)#Et...

GitHub specifically invented the idea of "forking" as a social action on a forge site that allows you to create your own associated copy of a repository. This is related to but different from the broader meaning of "fork". "Fork" doesn't mean anything at the git level.

I'm not sure exactly the distinction that you're trying to make. I see GitHub's use of "fork" as a specific application of the broader meaning of "fork", not an invention of a new and distinct concept. Just as putting "wheels" onto a steam engine can produce a new type of vehicle but doesn't change the concept of "wheels", GitHub's use of "fork" doesn't fundamentally change the broader concept of "fork".

Re: Tell HN: GitHub will delete your private repo if you lose access to the original

#277
post #273

Earlier quoted context omitted.

GitHub specifically invented the idea of "forking" as a social action on a forge site that allows you to create your own associated copy of a repository. This is related to but different from the broader meaning of "fork". "Fork" doesn't mean anything at the git level.

I'm not sure exactly the distinction that you're trying to make. I see GitHub's use of "fork" as a specific application of the broader meaning of "fork", not an invention of a new and distinct concept. Just as putting "wheels" onto a steam engine can produce a new type of vehicle but doesn't change the concept of "wheels", GitHub's use of "fork" doesn't fundamentally change the broader concept of "fork".

If any changes done to the parent repository propagate automatically to "forked" repositories without the explicit consent of the _owner_ of the fork then it does change the broader concept of fork, and to follow your analogy it would be like calling a caterpillar track a wheel.

If this is acceptable because the original version it's a private repository that is unrelated, what we are discussing is the meaning of the word itself.

Re: Tell HN: GitHub will delete your private repo if you lose access to the original

#278
post #268

Earlier quoted context omitted.

a cron job ought to do this. Try something like Cloud Scheduler that can automate this for you.( I am not sure what the equivalent is in AWS)

My question is not how to run it, but what to run. If your scheduled task does a full clone every time to upload as ZIP to S3, it is massively inefficient. Even if you use something like Restic, because the Git pack file will have nothing in common with the previous one.

Clone each repo locally. Periodically do "git fetch -p" for each repo to update the local copy of upstream content. Run some periodic task like restic or rclone (depending on whether you want point in time snapshots or just a mirror of latest state) to mirror these local repos into your S3 bucket.

The local clones should evolve incrementally due to "git fetch", and then the restic or rclone task should figure out how to make incremental updates to the S3 content.

Re: Tell HN: GitHub will delete your private repo if you lose access to the original

#279
post #275

Earlier quoted context omitted.

"GitHub doesn't allow you to make a public fork of a private repo, either. " where did I claim something like that?

I'm saying that GitHub consistently does not allow you to control access to a private fork. The original owners retain control.

how does this consistency manifest itself?

what about when the original owner publishes his repository? he doesn't control the visibility of the fork, does he?

Re: Tell HN: GitHub will delete your private repo if you lose access to the original

#280

Earlier quoted context omitted.

Don't use the "Fork" button in the GitHub UI, then. It is intended for collaboration and establishes and maintains the parent-child relationship of "your fork" and if the parent repo is deleted, so are all forks. If the parent repo is private and goes public, so do all forks. If the parent repo is public and switches to private, so do all forks. This behavior is laid out in docs.github.com and is not secret. This has…

"If the parent repo is private and goes public, so do all forks." nope, that's not true: "GitHub will detach private forks and turn them into a standalone private repository. For more information, see "What happens to forks when a repository is deleted or changes visibility?"" " If the parent repo is public and switches to private, so do all forks." This isn't true either: "GitHub will detach public forks of the publ…

yep I was wrong about that point. generally my point still stands; if you want total control over your repo, don't use the GitHub "Fork" button to create your repo for that code.

I linked directly to the documentation about "Fork" in another comment.

Post reply on HN