Background Maintenance With git maintenance

Register scheduled tasks that keep a repository packed and fast.

macOSautomationgitcliLow risk
Run git maintenance start to register scheduled optimization for the repository.

01Command

Command
$ git maintenance start

02What it does

git maintenance registers platform schedulers (launchd, cron, Task Scheduler) to run incremental repacks and commit-graph updates, so clones and fetches stay fast without manual git gc. It is automation that would otherwise require editing system schedulers by hand.

03Risk

RiskLow risk
RequirementsGit 2.20+ (install with Homebrew or Xcode Command Line Tools)
CompatibilitymacOS with Git installed (Homebrew or Xcode Command Line Tools)
!Warning: It modifies scheduled tasks for your user; run git maintenance stop to remove them.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-10-13 · Category: Developer