Scheduled gc, fetch, commit-graph. The Cron of Git.
Schedule background upkeep for repos: gc, fetch, commit-graph, prefetch, loose-objects. Like a Cron config dedicated to keeping a repo healthy.
Maintenance is a runner: it reads maintenance.<task>.enabled config and dispatches the named tasks (gc, commit-graph, prefetch, loose-objects, incremental-repack, pack-refs). Scheduling backs onto cron/launchd/systemd-timers so the OS handles when.
git maintenance run [<options>]
git maintenance start [--scheduler=<scheduler>]
git maintenance (stop|register|unregister) [<options>]| Flag | What it does |
|---|---|
start | Enable scheduled maintenance. |
stop | Disable it. |
run | Run maintenance tasks now. |
register/unregister | Add/remove the current repo from the maintenance list. |
$ git maintenance run --task=gc$ git maintenance start$ git maintenance stop$ git maintenance register$ git maintenance unregister$ git maintenance start$ git maintenance run --task=gcHit each option, then Check answers. Score is recorded; Next is always open.