Running into this?

My computer is running hot, and Activity Monitor shows dozens of git processes

I turned off the maintenance Git starts on its own after every commit; maintenance now runs once an hour, as a single copy.

before76 git maintenance runs at once
afterat most 1
turn off git's automatic maintenance (gc.auto · maintenance.auto) and switch to hourly scheduled maintenance
Text for your agent · 23 lines
Situation: many agents commit often in the same git repository. Activity Monitor shows many `git maintenance run --auto`, `git repack` and `git pack-objects` processes at the same time; the machine is running hot.

Why: after a commit, once a threshold is crossed, git starts maintenance in the background (`git maintenance run --auto --detach`). This background run holds no lock (observed on git 2.54): while one repack takes minutes, every new commit starts another one. I had 76 concurrent repacks in 10 minutes, each repacking 11 GB of history from scratch, and a commit object was lost in the race.

Do:
1. Turn off commit-triggered maintenance in this repository:
   git config --local gc.auto 0
   git config --local maintenance.auto false
2. Stop the running maintenance together with its child processes, then a minute later delete the temporary packs they left behind (this stops maintenance in every repository on this machine; a push, fetch or clone keeps running):
   pkill -TERM -f 'git(-core/git)? (maintenance run|repack|pack-objects .*objects/pack/)'
   sleep 60; find "$(git rev-parse --git-path objects/pack)" -name 'tmp_*' -mmin +1 -delete
3. Set up maintenance to run on a schedule, as a single copy:
   git maintenance start
   git config --local maintenance.gc.enabled false
   git config --local maintenance.prefetch.enabled false
   git config --local maintenance.loose-objects.schedule hourly
   git config --local maintenance.incremental-repack.schedule daily

Verify:
- git fsck --connectivity-only --no-reflogs --no-dangling → prints nothing (no missing objects)
- pgrep -f 'git(-core/git)? (maintenance run|repack|pack-objects .*objects/pack/)' | wc -l → 0 (above 0 only while the hourly scheduled run is going)

Don't: start a full `git gc` or `git repack -a` while doing this.