Bitzu

AZ-400 ยท Repository management

Scaling and sharing repositories

Shallow and partial clone, sparse checkout, Scalar and VFS-style optimizations, git gc, submodules vs subtrees vs packages for cross-repository sharing, mono-repo vs multi-repo.

Key points

  • Shallow clone (--depth): truncates history.
  • Partial clone (--filter=blob:none): defers file contents.
  • Sparse checkout: limits working tree directories.
  • scalar clone: partial clone + sparse checkout, scheduled background maintenance, no automatic gc.
  • Sharing: submodules (pinned pointer), subtrees (code copied into history), packages (versioned).
  • Mono-repo: atomic cross-project changes. Multi-repo: own access control, lifecycles.

Source: https://git-scm.com/docs/scalar

Practice questions

Single choice

Which git clone option requests a partial clone that omits file contents until they are needed?

  1. --depth 1
  2. --single-branch
  3. --filter=blob:none
  4. --sparse
Show answer

Answer: C. --filter=blob:none

--filter=blob:none uses the partial clone feature to skip blobs. --depth truncates history, --single-branch limits branches, and --sparse limits the working tree.

Select all that apply

Which behaviors does scalar clone provide by default?

  1. Partial clone that fetches commits and trees first
  2. Sparse checkout with only top-level files initially
  3. Scheduled background maintenance for the repository
  4. Replacing Git with a centralized locking server
  5. Downloading every blob so work is possible offline
Show answer

Answer: A. Partial clone that fetches commits and trees first, B. Sparse checkout with only top-level files initially, C. Scheduled background maintenance for the repository

By default Scalar clones only commits and trees (partial clone), enables sparse checkout, and configures scheduled background maintenance. It does not make the repo centralized or fetch every blob.

True or false

Sparse checkout on its own shortens the commit history that is downloaded.

Show answer

Answer: False

False. Sparse checkout only limits which files appear in the working tree. Shortening history is what --depth (a shallow clone) does, and deferring file contents is what a partial clone does.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More AZ-400 topics in this module