GIT-MAINTENANCE(1) (NAME) git-maintenance - (SYNOPSIS) git maintenance run [] git maintenance start [--scheduler=] git maintenance (stop|register|unregister) [] git maintenance is-needed [] (DESCRIPTION) . git add git fetch . . git maintenance . (SUBCOMMANDS) run . --task . maintenance..enabled true . maintenance.gc.enabled true . start . register git maintenance run --scheduled . stop . . register . maintenance.repo --config-file maintenance..schedule . . register maintenance.strategy incremental . incremental : o gc: . o commit-graph: . o prefetch: . o loose-objects: . o incremental-repack: . git maintenance register maintenance.auto = false . git maintenance unregister . unregister . . unregister . --force . is-needed . 0 1 . --auto . --task . maintenance..enabled true . maintenance.gc.enabled true . (TASKS) commit-graph commit-graph commit-graph . .graph commit-graph-chain . . prefetch prefetch . git fetch . (refspec) refs/prefetch/ . . . fetch . (prefetch) fetch fetch . . remote..skipFetchAll . gc . "GC" "garbage collection" ( ) . (repack) . . git-gc(1) . loose-objects loose-objects . . . ( "loose-" ) . . maintenance.loose-objects.batchSize 0 . gc loose-objects gc . incremental-repack incremental-repack multi-pack-index . . git multi-pack-index expire multi-pack-index . git multi-pack-index repack multi-pack-index . git multi-pack-index expire . --batch-size repack git-multi-pack- index(1) . . pack-refs pack-refs . . git-pack- refs(1) . reflog-expire reflog-expire reflog . git-reflog(1) . rerere-gc rerere-gc rerere . git- rerere(1) . worktree-prune worktree-prune . git-worktree(1) . (OPTIONS) --auto run . gc gc.auto gc.autoPackLimit . --schedule . is-needed . --schedule run maintenance..schedule . maintenance..lastRun . () --task= maintenance..enabled true . --quiet stderr. --task= . --task= maintenance..enabled true . TASKS . --scheduler=auto|crontab|systemd-timer|launchctl|schtasks start git maintenance run . auto crontab ( POSIX) systemd-timer ( ) launchctl ( macOS) schtasks ( ). auto systemd-timer crontab. auto . (TROUBLESHOOTING) git maintenance . . . . git maintenance run git maintenance run . . git maintenance run . "hourly" () . "daily" () . "weekly" () . . ( ) . . git maintenance run . . . gc incremental-repack . . . git maintenance start . git maintenance run . git gc git maintenance run . git gc git maintenance run . git maintenance run --task=gc git gc . git maintenance start . (POSIX) POSIX cron(8) . . crontab -l . git maintenance start : # BEGIN GIT MAINTENANCE SCHEDULE # The following schedule was created by Git # Any edits made in this region might be # replaced in the future by a Git command. 0 1-23 * * * "//git" --exec-path="/" for-each-repo --config=maintenance.repo maintenance run --schedule=hourly 0 0 * * 1-6 "//git" --exec-path="/" for-each-repo --config=maintenance.repo maintenance run --schedule=daily 0 0 * * 0 "//git" --exec-path="/" for-each-repo --config=maintenance.repo maintenance run --schedule=weekly # END GIT MAINTENANCE SCHEDULE . git maintenance stop git maintenance start . crontab git git git maintenance start PATH. git maintenance start Git . git for-each-repo --config=maintenance.repo git maintenance run --schedule= maintenance.repo . . git maintenance maintenance..schedule . . . crontab -e cron . . crontab(5) . --exec-path . SYSTEMD cron cron . systemd . systemd cron . git maintenance start systemd . systemctl --user list-timers . git maintenance start : $ systemctl --user list-timers NEXT LEFT LAST PASSED UNIT ACTIVATES Thu 2021-04-29 19:00:00 CEST 42min left Thu 2021-04-29 18:00:11 CEST 17min ago git-maintenance@hourly.timer git-maintenance@hourly.service Fri 2021-04-30 00:00:00 CEST 5h 42min left Thu 2021-04-29 00:00:11 CEST 18h ago git-maintenance@daily.timer git-maintenance@daily.service Mon 2021-05-03 00:00:00 CEST 3 days left Mon 2021-04-26 00:00:11 CEST 3 days ago git-maintenance@weekly.timer git-maintenance@weekly.service --schedule= . systemd : ~/.config/systemd/user/git-maintenance@.timer ~/.config/systemd/user/git-maintenance@.service ~/.config/systemd/user/timers.target.wants/git-maintenance@hourly.timer ~/.config/systemd/user/timers.target.wants/git-maintenance@daily.timer ~/.config/systemd/user/timers.target.wants/git-maintenance@weekly.timer git maintenance start systemctl --user drop-in .conf ~/.config/systemd/user/git-maintenance@.service.d. git maintenance stop systemd . systemd.timer(5) . (MACOS) macOS cron crontab -e . Git . git maintenance start launchctl macOS . git maintenance (start|stop) launchctl macOS 10.11 . .plist XML ~/Library/LaunchAgents/ . : $ ls ~/Library/LaunchAgents/org.git-scm.git* org.git-scm.git.daily.plist org.git-scm.git.hourly.plist org.git-scm.git.weekly.plist --schedule= . XML .plist StartCalendarInterval . git maintenance start launchctl .plist . git maintenance stop launchctl .plist . launchctl.plist(5) . (WINDOWS) cron . git maintenance start schtasks . (Task Scheduler) . Git Git Maintenance () . Task Scheduler XML . Git . "Run whether user is logged in or not" Task Scheduler . git maintenance start . git maintenance (start|stop) . (CONFIGURATION) git-config(1) . : maintenance.auto git maintenance run --auto . true . maintenance.autoDetach . . gc.autoDetach . true . maintenance.strategy . git maintenance run --task= . . . maintenance..enabled maintenance..schedule . maintenance.strategy . : o none: . . o gc: gc . o geometric: . reflog . (cruft pack) . . gc . . o incremental: . gc prefetch commit-graph loose-objects incremental-repack pack-refs . gc . maintenance..enabled --task git maintenance run . --task . maintenance.gc.enabled true . maintenance..schedule git maintenance run --schedule= . "hourly" () "daily" () "weekly" () . maintenance.commit-graph.auto commit-graph git maintenance run --auto . commit-graph --auto . . commit-graph maintenance.commit-graph.auto . 100 . maintenance.loose-objects.auto loose-objects git maintenance run --auto . loose-objects --auto . . maintenance.loose-objects.auto . 100 . maintenance.loose-objects.batchSize loose-objects . . 0 . maintenance.incremental-repack.auto incremental-repack git maintenance run --auto . incremental-repack --auto . . multi-pack-index maintenance.incremental-repack.auto . 10 . maintenance.geometric-repack.auto geometric-repack git maintenance run --auto . geometric-repack --auto . . . 100 . maintenance.geometric-repack.splitFactor . --geometric= git-repack(1) . 2 . maintenance.reflog-expire.auto reflog-expire git maintenance run --auto . reflog-expire --auto . . reflog reflog "HEAD" maintenance.loose-objects.auto . 100 . maintenance.rerere-gc.auto rerere-gc git maintenance run --auto . rerere-gc --auto . . "rr-cache" . . 1 . maintenance.worktree-prune.auto worktree-prune git maintenance run --auto . worktree-prune --auto . . . 1 . (GIT) git(1) Git 2.55.0 2026-06-29 GIT-MAINTENANCE(1)