]> git.ipfire.org Git - thirdparty/git.git/blob - Documentation/config/gc.txt
gc docs: re-flow the "gc.*" section in "config"
[thirdparty/git.git] / Documentation / config / gc.txt
1 gc.aggressiveDepth::
2 The depth parameter used in the delta compression
3 algorithm used by 'git gc --aggressive'. This defaults
4 to 50.
5 +
6 See the documentation for the `--depth` option in
7 linkgit:git-repack[1] for more details.
8
9 gc.aggressiveWindow::
10 The window size parameter used in the delta compression
11 algorithm used by 'git gc --aggressive'. This defaults
12 to 250.
13 +
14 See the documentation for the `--window` option in
15 linkgit:git-repack[1] for more details.
16
17 gc.auto::
18 When there are approximately more than this many loose
19 objects in the repository, `git gc --auto` will pack them.
20 Some Porcelain commands use this command to perform a
21 light-weight garbage collection from time to time. The
22 default value is 6700.
23 +
24 Setting this to 0 disables not only automatic packing based on the
25 number of loose objects, but any other heuristic `git gc --auto` will
26 otherwise use to determine if there's work to do, such as
27 `gc.autoPackLimit`.
28
29 gc.autoPackLimit::
30 When there are more than this many packs that are not
31 marked with `*.keep` file in the repository, `git gc
32 --auto` consolidates them into one larger pack. The
33 default value is 50. Setting this to 0 disables it.
34 Setting `gc.auto` to 0 will also disable this.
35 +
36 See the `gc.bigPackThreshold` configuration variable below. When in
37 use, it'll affect how the auto pack limit works.
38
39 gc.autoDetach::
40 Make `git gc --auto` return immediately and run in background
41 if the system supports it. Default is true.
42
43 gc.bigPackThreshold::
44 If non-zero, all packs larger than this limit are kept when
45 `git gc` is run. This is very similar to `--keep-base-pack`
46 except that all packs that meet the threshold are kept, not
47 just the base pack. Defaults to zero. Common unit suffixes of
48 'k', 'm', or 'g' are supported.
49 +
50 Note that if the number of kept packs is more than gc.autoPackLimit,
51 this configuration variable is ignored, all packs except the base pack
52 will be repacked. After this the number of packs should go below
53 gc.autoPackLimit and gc.bigPackThreshold should be respected again.
54 +
55 If the amount of memory estimated for `git repack` to run smoothly is
56 not available and `gc.bigPackThreshold` is not set, the largest pack
57 will also be excluded (this is the equivalent of running `git gc` with
58 `--keep-base-pack`).
59
60 gc.writeCommitGraph::
61 If true, then gc will rewrite the commit-graph file when
62 linkgit:git-gc[1] is run. When using linkgit:git-gc[1]
63 '--auto' the commit-graph will be updated if housekeeping is
64 required. Default is false. See linkgit:git-commit-graph[1]
65 for details.
66
67 gc.logExpiry::
68 If the file gc.log exists, then `git gc --auto` will print
69 its content and exit with status zero instead of running
70 unless that file is more than 'gc.logExpiry' old. Default is
71 "1.day". See `gc.pruneExpire` for more ways to specify its
72 value.
73
74 gc.packRefs::
75 Running `git pack-refs` in a repository renders it
76 unclonable by Git versions prior to 1.5.1.2 over dumb
77 transports such as HTTP. This variable determines whether
78 'git gc' runs `git pack-refs`. This can be set to `notbare`
79 to enable it within all non-bare repos or it can be set to a
80 boolean value. The default is `true`.
81
82 gc.pruneExpire::
83 When 'git gc' is run, it will call 'prune --expire 2.weeks.ago'.
84 Override the grace period with this config variable. The value
85 "now" may be used to disable this grace period and always prune
86 unreachable objects immediately, or "never" may be used to
87 suppress pruning. This feature helps prevent corruption when
88 'git gc' runs concurrently with another process writing to the
89 repository; see the "NOTES" section of linkgit:git-gc[1].
90
91 gc.worktreePruneExpire::
92 When 'git gc' is run, it calls
93 'git worktree prune --expire 3.months.ago'.
94 This config variable can be used to set a different grace
95 period. The value "now" may be used to disable the grace
96 period and prune `$GIT_DIR/worktrees` immediately, or "never"
97 may be used to suppress pruning.
98
99 gc.reflogExpire::
100 gc.<pattern>.reflogExpire::
101 'git reflog expire' removes reflog entries older than
102 this time; defaults to 90 days. The value "now" expires all
103 entries immediately, and "never" suppresses expiration
104 altogether. With "<pattern>" (e.g.
105 "refs/stash") in the middle the setting applies only to
106 the refs that match the <pattern>.
107
108 gc.reflogExpireUnreachable::
109 gc.<pattern>.reflogExpireUnreachable::
110 'git reflog expire' removes reflog entries older than
111 this time and are not reachable from the current tip;
112 defaults to 30 days. The value "now" expires all entries
113 immediately, and "never" suppresses expiration altogether.
114 With "<pattern>" (e.g. "refs/stash")
115 in the middle, the setting applies only to the refs that
116 match the <pattern>.
117 +
118 These types of entries are generally created as a result of using `git
119 commit --amend` or `git rebase` and are the commits prior to the amend
120 or rebase occurring. Since these changes are not part of the current
121 project most users will want to expire them sooner, which is why the
122 default is more aggressive than `gc.reflogExpire`.
123
124 gc.rerereResolved::
125 Records of conflicted merge you resolved earlier are
126 kept for this many days when 'git rerere gc' is run.
127 You can also use more human-readable "1.month.ago", etc.
128 The default is 60 days. See linkgit:git-rerere[1].
129
130 gc.rerereUnresolved::
131 Records of conflicted merge you have not resolved are
132 kept for this many days when 'git rerere gc' is run.
133 You can also use more human-readable "1.month.ago", etc.
134 The default is 15 days. See linkgit:git-rerere[1].