TwKit
正在载入
TwKit

I clone a GitHub repo almost every day for work, and I was tired of waiting. S… · @ReignSwords · TwKit

@ReignSwords

I clone a GitHub repo almost every day for work, and I was tired of waiting. So tonight I timed all 4 ways to clone — same repo (ollama/ollama), same box, back to back. 1. git clone → 680s, 148 MB 2. git clone --depth 1 → 88s, 78 MB 3. git clone --filter=blob:none → 234s, 86 MB 4. blob:none + sparse checkout → 146s, 45 MB Two things surprised me. First: --depth 1 still downloads every file at HEAD. It cuts history, not files. "Shallow" is doing a lot of heavy lifting in that sentence. Second: --filter=blob:none alone was SLOWER than --depth 1. It skips file contents but fetches every commit and tree in history — 35,750 objects of pure metadata. The combo wins. Full history, but git only downloads the files you actually check out. One gotcha from my run: sparse checkout still pulled every top-level file. Cone mode always includes the repo root — ask for "docs", get the root too. My new default when I just need to look at a repo: git clone --filter=blob:none --sparse <url> I run hands-on tests like this on my own machine and post the real numbers — stick around if that's your thing. 🔵 Fellow Premium members, let's connect! I post about AI & tech — follow for more 👥 Be honest: when did you last sit through a full clone you didn't need?

曝光 146 · 评论 8 · 点赞 3 · 书签 0

查看原帖