分叉存储库时对存储的影响

Impact on storage when forking a repository

场景:拥有 100 多名开发人员的主存储库

在 100 多个开发人员分叉父存储库的情况下,对 Github 存储 space 是否有重大影响,或者每个开发人员拥有自己的分叉是否是一种有效的策略?回购,然后向父回购提交 PR?

我查看了其他几个可能与此问题相关的线程,但只能发现 fork 共享对象以最大限度地减少存储使用。但是,我无法确定大规模(数百个分叉)的影响程度以及这是否会显着占用可用存储空间。

GitHub 上的分支不会复制(在GitHub 服务器端)完整的存储库,如“2015 年Counting Objects" by Vicent Martí 中所述。

Very early on we figured out that actually forking people’s repositories was not sustainable.

For instance, there are almost 11,000 forks of Rails hosted on GitHub: if each one of them were its own copy of the repository, that would imply an incredible amount of redundant disk space, requiring several times more fileservers than the ones we have in our infrastructure.

That’s why we decided to use a feature of Git called alternates.

When you fork a repository on GitHub, we create a shallow copy of it.
This copy has no objects of its own, but it has access to all the objects of an alternate, a root repository we call network.git and which contains the objects for all the forks in the network.