~ubuntu-branches/ubuntu/intrepid/git-core/intrepid-updates

« back to all changes in this revision

Viewing changes to Documentation/git-gc.txt

  • Committer: Package Import Robot
  • Author(s): Gerrit Pape
  • Date: 2007-04-22 13:31:05 UTC
  • mfrom: (1.1.14)
  • Revision ID: package-import@ubuntu.com-20070422133105-tkmhz328g2p0epz1
Tags: 1:1.5.1.2-1
* new upstream point release.
* debian/changelog.upstream: upstream changes taken from mailing list
  announcement.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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' [--prune]
 
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
OPTIONS
 
25
-------
 
26
 
 
27
--prune::
 
28
        Usually `git-gc` packs refs, expires old reflog entries,
 
29
        packs loose objects,
 
30
        and removes old 'rerere' records.  Removal
 
31
        of unreferenced loose objects is an unsafe operation
 
32
        while other git operations are in progress, so it is not
 
33
        done by default.  Pass this option if you want it, and only
 
34
        when you know nobody else is creating new objects in the
 
35
        repository at the same time (e.g. never use this option
 
36
        in a cron script).
 
37
 
 
38
 
 
39
Configuration
 
40
-------------
 
41
 
 
42
The optional configuration variable 'gc.reflogExpire' can be
 
43
set to indicate how long historical entries within each branch's
 
44
reflog should remain available in this repository.  The setting is
 
45
expressed as a length of time, for example '90 days' or '3 months'.
 
46
It defaults to '90 days'.
 
47
 
 
48
The optional configuration variable 'gc.reflogExpireUnreachable'
 
49
can be set to indicate how long historical reflog entries which
 
50
are not part of the current branch should remain available in
 
51
this repository.  These types of entries are generally created as
 
52
a result of using `git commit \--amend` or `git rebase` and are the
 
53
commits prior to the amend or rebase occurring.  Since these changes
 
54
are not part of the current project most users will want to expire
 
55
them sooner.  This option defaults to '30 days'.
 
56
 
 
57
The optional configuration variable 'gc.rerereresolved' indicates
 
58
how long records of conflicted merge you resolved earlier are
 
59
kept.  This defaults to 60 days.
 
60
 
 
61
The optional configuration variable 'gc.rerereunresolved' indicates
 
62
how long records of conflicted merge you have not resolved are
 
63
kept.  This defaults to 15 days.
 
64
 
 
65
The optional configuration variable 'gc.packrefs' determines if
 
66
`git gc` runs `git-pack-refs`.  Without the configuration, `git-pack-refs`
 
67
is not run in bare repositories by default, to allow older dumb-transport
 
68
clients fetch from the repository,  but this will change in the future.
 
69
 
 
70
See Also
 
71
--------
 
72
gitlink:git-prune[1]
 
73
gitlink:git-reflog[1]
 
74
gitlink:git-repack[1]
 
75
gitlink:git-rerere[1]
 
76
 
 
77
Author
 
78
------
 
79
Written by Shawn O. Pearce <spearce@spearce.org>
 
80
 
 
81
GIT
 
82
---
 
83
Part of the gitlink:git[7] suite