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
Which git clone option requests a partial clone that omits file contents until they are needed?
- --depth 1
- --single-branch
- --filter=blob:none
- --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.
Which behaviors does scalar clone provide by default?
- Partial clone that fetches commits and trees first
- Sparse checkout with only top-level files initially
- Scheduled background maintenance for the repository
- Replacing Git with a centralized locking server
- 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.
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.
