| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
原始链接: https://news.ycombinator.com/item?id=43353223
Hacker News 的一篇帖子讨论了 Git 的新特性 bundle-URI 以及加速克隆大型仓库(多 GB,数百万次提交)的策略。一些用户分享了他们使用大型仓库的经验和面临的挑战,包括克隆速度慢以及 GitHub 等服务造成的限流。 提到的解决方案包括: * 将“种子”仓库存储在 S3 中以加快初始克隆速度。 * 使用 EBS 快照(但令人惊讶的是,并不总是更快)。 * Linux 内核在 CDN 上使用 bundle 文件。 * 浅克隆(`git clone --depth 1`),尽管关于其对 GitHub 等服务的性能影响存在争议。 * 快照的 tar 包。 讨论还涉及到当只需要单个快照时克隆整个项目历史记录的低效率。其他话题包括替代版本控制系统 Mercurial 以及在 Git 中存储大型二进制文件的解决方案。
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
Semi-related: I always wondered but never got time to dig into what exactly are the contents of the exchange between server and client; I sometimes notice that when creating a new branch off main (still talking the 1M commits repo), with just one new tiny commit, the amount of data the client sends is way bigger than I expected (tens of MBs). I always assumed the client somehow established with the server that it has a certain sha, and only uploads missing commit, but it seems it's not exactly the case when creating a new branch.
reply