git clone --depth=1 $repository
You can even use the `--filter=tree:0` option to `git clone` with `git sparse-checkout` to only fetch subsets of the repository.
Using upload-pack allowed us to remove that constraint, since even in a shallow clone we can still get the commit graph via SSH from the remote.
You can even use the `--filter=tree:0` option to `git clone` with `git sparse-checkout` to only fetch subsets of the repository.