5 ms·
This is documented at: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/what-happens-to-forks-when-a-repository-is-d
by csteinbe 4y ago
This is documented at: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/what-happens-to-forks-when-a-repository-is-deleted-or-changes-visibility https://docs.github.com/en/pull-requests/collaborating-with-...
- fragmede 4y ago“But the plans were on display…” “On display? I eventually had to go down to the cellar to find them.” “That’s the display department.” “With a flashlight.” “Ah, well, the lights had probably gone.” “So had the stairs.” “But look, you found the notice, didn’t you?” “Yes,” said Arthur, “yes I did. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying ‘Beware of the Leopard.” ― Douglas Adams, The Hitchhiker's Guide to the Galaxy
- agolio 4y agoTo clarify the appropriateness of this analogy: This is unexpected behaviour from Github here which may (and has, by the anecdote of OP) cause permanent data loss. Documentation is not good enough, as users should not have been expected to have read the entire documentation.
- themitigating 4y agoIs it unexpected though? The repo was forked from an org by the person who was a member of that org. I know this isn't common but I actually use a unique user for my company "myname-company"
- chrisfosterelli 4y agoI 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 permission model is fairly direct that private forks you make through your membership in an organization are more the organization's property than the forker's.
- capableweb 4y ago> 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. This is exactly how it works today already. If I try to delete a private repository people have forked, I see the following: > We will also delete all 4 forks since this is a private repository. Clicking on the delete button, again: > Unexpected bad things will happen if you don’t read this! > This will also delete all 4 forks since this is a private repository. > [type name of repository]
- chrisfosterelli 4y agoYes, that's what I said. It sounds like the parent poster is suggesting that the fork account should instead have that notice.
- donmcronald 4y agoIMO it would be useful if non-obvious behavior like that were warned about when you fork the repo. I know I'd get burned by that. I keep a local mirror of everything though.
- chrisfosterelli 4y agoThat's a fair point.
- alerighi 4y agoIn 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 logic in it, that is the fork depends on the original repository even for permissions, and that to me is surprising!
- Barrin92 4y agoI don't think it's an unexpected at all given that the original repo was private, not just the fork. Secondly a GitHub "user" isn't really a user in the consumer sense. They're a developer, as a developer/professional you can be expected to consult the documentation of a tool you use so you understand default behavior.
- deleted 4y ago[deleted]
- darekkay 4y agoThat's why I usually don't use the official "fork" feature, but clone and push the repository manually instead. I would like to keep the fork network connection on Github, but I don't want to see my fork deleted because of an error, malice or simply lack of knowledge.
- rezonant 4y agoIt will only be deleted if the repo you fork from is a private repository. The documentation [1] covers the other scenarios, in all of which you keep your copy of the code (including when the public repository is made private later). [1] https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/what-happens-to-forks-when-a-repository-is-deleted-or-changes-visibility https://docs.github.com/en/pull-requests/collaborating-with-...
- darekkay 4y agoTIL, thanks! I probably confused this with the GitHub takedowns, when forks are removed as well (as it happened to the youtube-dl repo). I could imagine my manual clone not withstanding such takedown either, though.
- rezonant 4y agoYeah for cases like that, keep a local copy, thankfully many people did
- account42 4y agoIIRC GitHub will also delete the entire fork network for DMCA request even if your fork is not mentioned explicitly.
- andyjohnson0 4y ago> It will only be deleted if the repo you fork from is a private repository This makes sense. Thank you for clarifying that important detail. It seems to be missing from the parts of the discussion I've read here.