Skip to main content

Run tasks to optimize Git repository data.

# To register the current repository in the user's list of repositories to daily have maintenance run:
git maintenance register

# To start running maintenance on the current repository:
git maintenance start

# To halt the background maintenance schedule for the current repository:
git maintenance stop

# To remove the current repository from the user's maintenance repository list:
git maintenance unregister

# To run a specific maintenance task on the current repository:
git maintenance run --task=<commit-graph|gc|incremental-repack|loose-objects|pack-refs|prefetch>