La configurazione tutto in uno
Mettendo i pezzi insieme: questa e una singola configurazione che applica lo stack di performance Git moderno.
Il blocco di config
[feature]
manyFiles = true
[core]
fsmonitor = true
untrackedCache = true
commitGraph = true
multiPackIndex = true
preloadIndex = true
[index]
version = 4
sparse = true
[fetch]
parallel = 0
writeCommitGraph = true
negotiationAlgorithm = skipping
showForcedUpdates = false
[gc]
auto = 0
writeCommitGraph = true
[maintenance]
auto = false
[checkout]
workers = 0
thresholdForParallelism = 100
[pack]
useSparse = true
writeBitmaps = true
threads = 0
windowMemory = 256m
[commitGraph]
changedPathsVersion = 2
[diff]
algorithm = histogram
[merge]
conflictStyle = zdiff3
[rebase]
autoSquash = true
autoStash = true
updateRefs = true
[push]
autoSetupRemote = true
[protocol]
version = 2
Task una tantum
git sparse-checkout init --cone --sparse-index
git sparse-checkout set apps/web libs/shared
git commit-graph write --reachable --changed-paths
git multi-pack-index write --bitmap
git update-index --index-version 4
git pack-refs --all
git maintenance start
Verifica
git config --list --show-origin | sort
git maintenance status
git fsmonitor--daemon status
git-sizer --no-progress
GIT_TRACE2_PERF=1 git status
Note per piattaforma
- Linux: alzare
fs.inotify.max_user_watches. - macOS: nulla di extra.
- Windows: escludere il working tree dalla scansione AV.
Errori comuni
Applicare ogni impostazione tutta insieme senza misurare.