]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-maintenance.txt
maintenance: create basic maintenance runner
[thirdparty/git.git] / Documentation / git-maintenance.txt
CommitLineData
2057d750
DS
1git-maintenance(1)
2==================
3
4NAME
5----
6git-maintenance - Run tasks to optimize Git repository data
7
8
9SYNOPSIS
10--------
11[verse]
12'git maintenance' run [<options>]
13
14
15DESCRIPTION
16-----------
17Run tasks to optimize Git repository data, speeding up other Git commands
18and reducing storage requirements for the repository.
19
20Git commands that add repository data, such as `git add` or `git fetch`,
21are optimized for a responsive user experience. These commands do not take
22time to optimize the Git data, since such optimizations scale with the full
23size of the repository while these user commands each perform a relatively
24small action.
25
26The `git maintenance` command provides flexibility for how to optimize the
27Git repository.
28
29SUBCOMMANDS
30-----------
31
32run::
33 Run one or more maintenance tasks.
34
35TASKS
36-----
37
38gc::
39 Clean up unnecessary files and optimize the local repository. "GC"
40 stands for "garbage collection," but this task performs many
41 smaller tasks. This task can be expensive for large repositories,
42 as it repacks all Git objects into a single pack-file. It can also
43 be disruptive in some situations, as it deletes stale data. See
44 linkgit:git-gc[1] for more details on garbage collection in Git.
45
46OPTIONS
47-------
48--auto::
49 When combined with the `run` subcommand, run maintenance tasks
50 only if certain thresholds are met. For example, the `gc` task
51 runs when the number of loose objects exceeds the number stored
52 in the `gc.auto` config setting, or when the number of pack-files
53 exceeds the `gc.autoPackLimit` config setting.
54
55GIT
56---
57Part of the linkgit:git[1] suite