Appearance
git-maintenance Quick Reference
Background housekeeping for long-lived .git directories on CI runners.
Enable
bash
git maintenance start # register hourly/daily/weekly
git maintenance run --task=gc --quiet # run gc now
git maintenance run --task=commit-graph --quiet
git maintenance run --task=pack-everything --quietPrefetch (monorepo CI optimisation)
bash
git config remote.origin.maintenance true
git config fetch.writeCommitGraph false
git maintenance run --task=prefetch --quietTighten for ephemeral runners
bash
git config gc.pruneExpire "24.hours.ago"Inspect / debug
bash
git maintenance run --task=gc --verbose
test -f .git/maintenance.lock && echo "running" # check lockDisable
bash
git maintenance stop # unregister schedule