Scalar

Scalar: Git at Monorepo Scale

Scalar 1,932 began at Microsoft as a tool for the Windows and Office monorepos and has shipped with Git 1,932 since 2.38 as a separate scalar command. It applies this section's techniques in one step: scalar clone makes a blobless partial clone with a cone-mode sparse checkout, puts the working tree under src/, and sets several dozen performance options:

Cloning BookNest with Scalar and inspecting what it configuredShell
scalar clone --no-maintenance file://$PWD/../server/booknest.git ../big
ls -C ../big/src
git -C ../big/src config list --local | grep -E "fsmonitor|untracked|filter|index.v|graph"
scalar delete ../big
Output
Initialized empty Git repository in /home/dev/v5-ch2/big/src/.git/
...
README.md  docker-compose.yml  package-lock.json  server.js
app.js     eslint.config.js    package.json
core.untrackedcache=true
core.fsmonitor=true
remote.origin.partialclonefilter=blob:none
commitgraph.changedpaths=true
commitgraph.generationversion=1
fetch.writecommitgraph=false
index.version=4
/home/dev/v5-ch2/big/src

core.fsmonitor=true starts Git's file-system monitor daemon, which Git 2.55 brought to Linux: git status asks it what changed instead of scanning every file. The untracked cache remembers directories without new files, and index version 4 compresses path names. Without --no-maintenance, Scalar also registers the enlistment for git maintenance's maintenance; scalar delete unregisters it, prints its path and removes it. Scalar suits repositories with hundreds of thousands of files; for BookNest a plain clone is best.