Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A fork is a linked copy, a clone is just a copy. They are not the same.

  Deleting your repository or changing its visibility affects that repository's forks.


Forks predate GitHub and have another almost opposing definition that sets up for a confusion here. By that lingo forks go their own way (like a fork in the road) independently of the upstream and clones are copies of an upstream.


I agree it does...

  fork() creates a new process by duplicating the calling process.
Thats similar to what happens on git providers, you create a new repo by duplicating it, and the repo is linked aka child.

Many forks do go their own way. You can choose to pull from upstream or completely ignore it.


  Deleting your repository or changing its visibility affects that repository's forks.
Sure, but this only matters for 'private' repos. See <https://docs.github.com/en/pull-requests/collaborating-with-...>.

Github does some cute things behind the scenes to save space, but for all 'public' or 'internal' repos, what Github calls a fork is (from a Github user's perspective) identical to what happens when you run 'git clone' on your machine.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: