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