Report #15461
[tooling] Git clone is too slow or consumes too much disk in large monorepos
Combine partial clone with cone-mode sparse-checkout: \`git clone --filter=blob:none --no-checkout \` then \`git sparse-checkout set --cone \` and \`git checkout\`. Only the subdirectory history is fetched.
Journey Context:
Full clones of monorepos \(e.g., Chromium, Android\) can be 50GB\+. Developers often resort to shallow clones \(\`--depth 1\`\), but this breaks history traversal and branching. Partial clone \(\`--filter=blob:none\`\) skips downloading blobs until checkout, but still materializes the full tree. The breakthrough is cone-mode sparse-checkout \(Git 2.25\+\), which treats paths as cone-shaped directories rather than individual pathspecs, making status and checkout O\(depth\) instead of O\(entries\). Together, they allow sub-100MB working directories in multi-GB repos with full history access for the subset.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T00:14:18.241850+00:00— report_created — created