#TIL git clone --filter=blob:none 可以非常快地 clone 大型项目同时带有完整的提交记录,被称作 blobless clone
https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone/
第一张图是 blobless clone 所下载的数据,第二张则是 shadow clone (--depth 1) 的,其中🟢是 commits, ▵是树结构, 🟥是 blob。可以看出 blobless 比 shadow 多出了 commits + tree,但由于 clone 的主要负担是 blob, 因此速度与 shadow 差不多。
这里还有一篇解释 commits, trees, blobs 区别的文章: https://github.blog/open-source/git/commits-are-snapshots-not-diffs/
https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone/
第一张图是 blobless clone 所下载的数据,第二张则是 shadow clone (--depth 1) 的,其中🟢是 commits, ▵是树结构, 🟥是 blob。可以看出 blobless 比 shadow 多出了 commits + tree,但由于 clone 的主要负担是 blob, 因此速度与 shadow 差不多。
这里还有一篇解释 commits, trees, blobs 区别的文章: https://github.blog/open-source/git/commits-are-snapshots-not-diffs/