场景:主存储库有超过 100 名开发人员在使用它
在 100 多个开发人员 fork 父存储库的情况下,对 Github 存储空间是否会产生重大影响,或者每个开发人员拥有自己的存储库 fork ,然后向父存储库提出 PR 是一个有效的策略?
我查看了其他几个可能与这个问题相关的线程,但只能发现 fork 共享对象以最大限度地减少存储使用。但是,我无法弄清楚大规模(数百个 fork )的影响程度以及这是否会显着占用可用存储空间。
最佳答案
GitHub 上的 fork 不会(在 GitHub 服务器端)复制完整存储库,如 Counting Objects 的“Vicent Martí”中所述。 2015年。
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 callnetwork.git
and which contains the objects for all the forks in the network.
关于git - fork 存储库时对存储的影响,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69305027/