Documentation / git-repack.txton commit Merge branch 'sp/maint-pack-memuse' into maint (bbe99ea)
   1git-repack(1)
   2=============
   3
   4NAME
   5----
   6git-repack - Pack unpacked objects in a repository
   7
   8
   9SYNOPSIS
  10--------
  11'git-repack' [-a] [-A] [-d] [-f] [-l] [-n] [-q] [--window=N] [--depth=N]
  12
  13DESCRIPTION
  14-----------
  15
  16This script is used to combine all objects that do not currently
  17reside in a "pack", into a pack.  It can also be used to re-organize
  18existing packs into a single, more efficient pack.
  19
  20A pack is a collection of objects, individually compressed, with
  21delta compression applied, stored in a single file, with an
  22associated index file.
  23
  24Packs are used to reduce the load on mirror systems, backup
  25engines, disk storage, etc.
  26
  27OPTIONS
  28-------
  29
  30-a::
  31        Instead of incrementally packing the unpacked objects,
  32        pack everything referenced into a single pack.
  33        Especially useful when packing a repository that is used
  34        for private development and there is no need to worry
  35        about people fetching via dumb protocols from it.  Use
  36        with '-d'.  This will clean up the objects that `git prune`
  37        leaves behind, but `git fsck --full` shows as
  38        dangling.
  39
  40-A::
  41        Same as `-a`, but any unreachable objects in a previous
  42        pack become loose, unpacked objects, instead of being
  43        left in the old pack.  Unreachable objects are never
  44        intentionally added to a pack, even when repacking.
  45        When used with '-d', this option
  46        prevents unreachable objects from being immediately
  47        deleted by way of being left in the old pack and then
  48        removed.  Instead, the loose unreachable objects
  49        will be pruned according to normal expiry rules
  50        with the next linkgit:git-gc[1].
  51
  52-d::
  53        After packing, if the newly created packs make some
  54        existing packs redundant, remove the redundant packs.
  55        Also runs linkgit:git-prune-packed[1].
  56
  57-l::
  58        Pass the `--local` option to `git pack-objects`, see
  59        linkgit:git-pack-objects[1].
  60
  61-f::
  62        Pass the `--no-reuse-delta` option to `git pack-objects`, see
  63        linkgit:git-pack-objects[1].
  64
  65-q::
  66        Pass the `-q` option to `git pack-objects`, see
  67        linkgit:git-pack-objects[1].
  68
  69-n::
  70        Do not update the server information with
  71        `git update-server-info`.  This option skips
  72        updating local catalog files needed to publish
  73        this repository (or a direct copy of it)
  74        over HTTP or FTP.  See gitlink:git-update-server-info[1].
  75
  76--window=[N]::
  77--depth=[N]::
  78        These two options affect how the objects contained in the pack are
  79        stored using delta compression. The objects are first internally
  80        sorted by type, size and optionally names and compared against the
  81        other objects within `--window` to see if using delta compression saves
  82        space. `--depth` limits the maximum delta depth; making it too deep
  83        affects the performance on the unpacker side, because delta data needs
  84        to be applied that many times to get to the necessary object.
  85        The default value for --window is 10 and --depth is 50.
  86
  87--window-memory=[N]::
  88        This option provides an additional limit on top of `--window`;
  89        the window size will dynamically scale down so as to not take
  90        up more than N bytes in memory.  This is useful in
  91        repositories with a mix of large and small objects to not run
  92        out of memory with a large window, but still be able to take
  93        advantage of the large window for the smaller objects.  The
  94        size can be suffixed with "k", "m", or "g".
  95        `--window-memory=0` makes memory usage unlimited, which is the
  96        default.
  97
  98--max-pack-size=<n>::
  99        Maximum size of each output packfile, expressed in MiB.
 100        If specified,  multiple packfiles may be created.
 101        The default is unlimited.
 102
 103
 104Configuration
 105-------------
 106
 107When configuration variable `repack.UseDeltaBaseOffset` is set
 108for the repository, the command passes `--delta-base-offset`
 109option to `git-pack-objects`; this typically results in slightly
 110smaller packs, but the generated packs are incompatible with
 111versions of git older than (and including) v1.4.3; do not set
 112the variable in a repository that older version of git needs to
 113be able to read (this includes repositories from which packs can
 114be copied out over http or rsync, and people who obtained packs
 115that way can try to use older git with it).
 116
 117
 118Author
 119------
 120Written by Linus Torvalds <torvalds@osdl.org>
 121
 122Documentation
 123--------------
 124Documentation by Ryan Anderson <ryan@michonline.com>
 125
 126SEE ALSO
 127--------
 128linkgit:git-pack-objects[1]
 129linkgit:git-prune-packed[1]
 130
 131GIT
 132---
 133Part of the linkgit:git[1] suite