Skill 2.2.2

Design a strategy for scaling and optimizing a Git repository, including Scalar and cross-repository sharing

Key Concepts

Scalar is included with Git. scalar clone fetches commits and trees first, enables sparse-checkout with only top-level files present, and sets up background maintenance. Shallow clones limit history, which suits build agents more than developers.

Cross-repository sharing uses packages for versioned libraries, submodules or subtrees to include source, and templates for shared pipeline code. Packages are usually preferred, because consumers choose when to adopt a new version.