]> git.ipfire.org Git - thirdparty/git.git/blob - Documentation/git-gc.txt
Create 'git gc' to perform common maintenance operations.
[thirdparty/git.git] / Documentation / git-gc.txt
1 git-gc(1)
2 =========
3
4 NAME
5 ----
6 git-gc - Cleanup unnecessary files and optimize the local repository
7
8
9 SYNOPSIS
10 --------
11 'git-gc'
12
13 DESCRIPTION
14 -----------
15 Runs a number of housekeeping tasks within the current repository,
16 such as compressing file revisions (to reduce disk space and increase
17 performance) and removing unreachable objects which may have been
18 created from prior invocations of gitlink:git-add[1].
19
20 Users are encouraged to run this task on a regular basis within
21 each repository to maintain good disk space utilization and good
22 operating performance.
23
24 Configuration
25 -------------
26
27 The optional configuration variable 'gc.reflogExpire' can be
28 set to indicate how long historical entries within each branch's
29 reflog should remain available in this repository. The setting is
30 expressed as a length of time, for example '90 days' or '3 months'.
31 It defaults to '90 days'.
32
33 The optional configuration variable 'gc.reflogExpireUnreachable'
34 can be set to indicate how long historical reflog entries which
35 are not part of the current branch should remain available in
36 this repository. These types of entries are generally created as
37 a result of using `git commit \--amend` or `git rebase` and are the
38 commits prior to the amend or rebase occuring. Since these changes
39 are not part of the current project most users will want to expire
40 them sooner. This option defaults to '30 days'.
41
42 The optional configuration variable 'gc.rerereresolved' indicates
43 how long records of conflicted merge you resolved earlier are
44 kept. This defaults to 60 days.
45
46 The optional configuration variable 'gc.rerereunresolved' indicates
47 how long records of conflicted merge you have not resolved are
48 kept. This defaults to 15 days.
49
50
51 See Also
52 --------
53 gitlink:git-prune[1]
54 gitlink:git-reflog[1]
55 gitlink:git-repack[1]
56 gitlink:git-rerere[1]
57
58 Author
59 ------
60 Written by Shawn O. Pearce <spearce@spearce.org>
61
62 GIT
63 ---
64 Part of the gitlink:git[7] suite