IT lexicon › Programming › Shallow clone

Shallow clone

Programming På svenska → Updated: 2026-11-13

A clone that downloads only recent commits instead of the entire project history.

A shallow clone fetches only the latest layers of history (via git clone --depth N). For projects with decades of commits, this saves orders of magnitude in bandwidth and disk space—sometimes the difference between a 5-second clone and a 5-minute one. The tradeoff: you can't push from a shallow clone, and certain operations (rebase, merge from remote) may fail. Shallow clones are the standard for CI/CD systems, which don't need archaeology, just the current code. Many larger projects now default to shallow cloning in their deployment pipelines.

← Back to the lexicon