]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/config/gc.txt
gc docs: include the "gc.*" section from "config" in "gc"
[thirdparty/git.git] / Documentation / config / gc.txt
CommitLineData
8daf3271
NTND
1gc.aggressiveDepth::
2 The depth parameter used in the delta compression
3 algorithm used by 'git gc --aggressive'. This defaults
4 to 50.
b6a8d09f
ÆAB
5+
6See the documentation for the `--depth` option in
7linkgit:git-repack[1] for more details.
8daf3271
NTND
8
9gc.aggressiveWindow::
10 The window size parameter used in the delta compression
11 algorithm used by 'git gc --aggressive'. This defaults
12 to 250.
b6a8d09f
ÆAB
13+
14See the documentation for the `--window` option in
15linkgit:git-repack[1] for more details.
8daf3271
NTND
16
17gc.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
b6a8d09f
ÆAB
22 default value is 6700.
23+
24Setting this to 0 disables not only automatic packing based on the
25number of loose objects, but any other heuristic `git gc --auto` will
26otherwise use to determine if there's work to do, such as
27`gc.autoPackLimit`.
8daf3271
NTND
28
29gc.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.
b6a8d09f
ÆAB
34 Setting `gc.auto` to 0 will also disable this.
35+
36See the `gc.bigPackThreshold` configuration variable below. When in
37use, it'll affect how the auto pack limit works.
8daf3271
NTND
38
39gc.autoDetach::
40 Make `git gc --auto` return immediately and run in background
41 if the system supports it. Default is true.
42
43gc.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+
50Note that if the number of kept packs is more than gc.autoPackLimit,
51this configuration variable is ignored, all packs except the base pack
52will be repacked. After this the number of packs should go below
53gc.autoPackLimit and gc.bigPackThreshold should be respected again.
b6a8d09f
ÆAB
54+
55If the amount of memory estimated for `git repack` to run smoothly is
56not available and `gc.bigPackThreshold` is not set, the largest
57pack will also be excluded (this is the equivalent of running `git gc`
58with `--keep-base-pack`).
8daf3271
NTND
59
60gc.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
67gc.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
74gc.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
82gc.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
91gc.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
99gc.reflogExpire::
100gc.<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
108gc.reflogExpireUnreachable::
109gc.<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>.
b6a8d09f
ÆAB
117+
118These types of entries are generally created as
119a result of using `git commit --amend` or `git rebase` and are the
120commits prior to the amend or rebase occurring. Since these changes
121are not part of the current project most users will want to expire
122them sooner, which is why the default is more aggressive than
123`gc.reflogExpire`.
8daf3271
NTND
124
125gc.rerereResolved::
126 Records of conflicted merge you resolved earlier are
127 kept for this many days when 'git rerere gc' is run.
128 You can also use more human-readable "1.month.ago", etc.
129 The default is 60 days. See linkgit:git-rerere[1].
130
131gc.rerereUnresolved::
132 Records of conflicted merge you have not resolved are
133 kept for this many days when 'git rerere gc' is run.
134 You can also use more human-readable "1.month.ago", etc.
135 The default is 15 days. See linkgit:git-rerere[1].