Calculate how long a git clone will take based on repo size and network speed.
Clone time is primarily bound by how much data must transfer over the network. Formula: time = repo_size / bandwidth. A shallow clone (`--depth N`) only fetches the specified number of recent commits and their objects, so it transfers a fraction of the full history — the calculator models this as transfer_size = repo_size × shallow_fraction, divided by bandwidth to get time.
clone_time_sec = transfer_size_MB / (bandwidth_Mbps / 8)
This model assumes sustained line-rate throughput. Real clones are also bound by server-side pack generation (CPU), TLS handshake overhead for many small requests, and network latency/packet loss — especially over long geographic distances.
It depends entirely on repository history depth. For a repo with years of history, `--depth 1` can transfer 5-20% of the full size; for a young repo with little history, savings are minimal.
Yes for many workflows — a treeless/blobless partial clone fetches full commit history (small) but defers blob downloads until checkout, which can be smaller than even a shallow clone if you only need recent file content.
Yes, run `git fetch --unshallow` to backfill the missing history, though this transfers the remaining objects and takes time proportional to that remaining size.