]>
Commit | Line | Data |
---|---|---|
2057d750 DS |
1 | git-maintenance(1) |
2 | ================== | |
3 | ||
4 | NAME | |
5 | ---- | |
6 | git-maintenance - Run tasks to optimize Git repository data | |
7 | ||
8 | ||
9 | SYNOPSIS | |
10 | -------- | |
11 | [verse] | |
12 | 'git maintenance' run [<options>] | |
13 | ||
14 | ||
15 | DESCRIPTION | |
16 | ----------- | |
17 | Run tasks to optimize Git repository data, speeding up other Git commands | |
18 | and reducing storage requirements for the repository. | |
19 | ||
20 | Git commands that add repository data, such as `git add` or `git fetch`, | |
21 | are optimized for a responsive user experience. These commands do not take | |
22 | time to optimize the Git data, since such optimizations scale with the full | |
23 | size of the repository while these user commands each perform a relatively | |
24 | small action. | |
25 | ||
26 | The `git maintenance` command provides flexibility for how to optimize the | |
27 | Git repository. | |
28 | ||
29 | SUBCOMMANDS | |
30 | ----------- | |
31 | ||
32 | run:: | |
33 | Run one or more maintenance tasks. | |
34 | ||
35 | TASKS | |
36 | ----- | |
37 | ||
38 | gc:: | |
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 | ||
46 | OPTIONS | |
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 | ||
55 | GIT | |
56 | --- | |
57 | Part of the linkgit:git[1] suite |