1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
\r
4 <article lang="en" id="git-repack(1)">
\r
6 <title>git-repack(1)</title>
\r
8 <primary>git-repack(1)</primary>
\r
11 <simplesect id="_name">
\r
13 <simpara>git-repack - Pack unpacked objects in a repository</simpara>
\r
15 <simplesect id="_synopsis">
\r
16 <title>SYNOPSIS</title>
\r
17 <simpara><emphasis>git repack</emphasis> [-a] [-A] [-d] [-f] [-l] [-n] [-q] [--window=N] [--depth=N]</simpara>
\r
19 <simplesect id="_description">
\r
20 <title>DESCRIPTION</title>
\r
21 <simpara>This script is used to combine all objects that do not currently
\r
22 reside in a "pack", into a pack. It can also be used to re-organize
\r
23 existing packs into a single, more efficient pack.</simpara>
\r
24 <simpara>A pack is a collection of objects, individually compressed, with
\r
25 delta compression applied, stored in a single file, with an
\r
26 associated index file.</simpara>
\r
27 <simpara>Packs are used to reduce the load on mirror systems, backup
\r
28 engines, disk storage, etc.</simpara>
\r
30 <simplesect id="_options">
\r
31 <title>OPTIONS</title>
\r
39 Instead of incrementally packing the unpacked objects,
\r
40 pack everything referenced into a single pack.
\r
41 Especially useful when packing a repository that is used
\r
42 for private development and there is no need to worry
\r
43 about people fetching via dumb protocols from it. Use
\r
44 with <emphasis>-d</emphasis>. This will clean up the objects that <literal>git prune</literal>
\r
45 leaves behind, but <literal>git fsck --full</literal> shows as
\r
56 Same as <literal>-a</literal>, unless <emphasis>-d</emphasis> is used. Then any unreachable
\r
57 objects in a previous pack become loose, unpacked objects,
\r
58 instead of being left in the old pack. Unreachable objects
\r
59 are never intentionally added to a pack, even when repacking.
\r
60 This option prevents unreachable objects from being immediately
\r
61 deleted by way of being left in the old pack and then
\r
62 removed. Instead, the loose unreachable objects
\r
63 will be pruned according to normal expiry rules
\r
64 with the next <emphasis>git-gc</emphasis> invocation. See <xref linkend="git-gc(1)"/>.
\r
74 After packing, if the newly created packs make some
\r
75 existing packs redundant, remove the redundant packs.
\r
76 Also run <emphasis>git-prune-packed</emphasis> to remove redundant
\r
87 Pass the <literal>--local</literal> option to <emphasis>git-pack-objects</emphasis>. See
\r
88 <xref linkend="git-pack-objects(1)"/>.
\r
98 Pass the <literal>--no-reuse-object</literal> option to <literal>git-pack-objects</literal>, see
\r
99 <xref linkend="git-pack-objects(1)"/>.
\r
109 Pass the <literal>-q</literal> option to <emphasis>git-pack-objects</emphasis>. See
\r
110 <xref linkend="git-pack-objects(1)"/>.
\r
120 Do not update the server information with
\r
121 <emphasis>git-update-server-info</emphasis>. This option skips
\r
122 updating local catalog files needed to publish
\r
123 this repository (or a direct copy of it)
\r
124 over HTTP or FTP. See <xref linkend="git-update-server-info(1)"/>.
\r
137 These two options affect how the objects contained in the pack are
\r
138 stored using delta compression. The objects are first internally
\r
139 sorted by type, size and optionally names and compared against the
\r
140 other objects within <literal>--window</literal> to see if using delta compression saves
\r
141 space. <literal>--depth</literal> limits the maximum delta depth; making it too deep
\r
142 affects the performance on the unpacker side, because delta data needs
\r
143 to be applied that many times to get to the necessary object.
\r
144 The default value for --window is 10 and --depth is 50.
\r
150 --window-memory=[N]
\r
154 This option provides an additional limit on top of <literal>--window</literal>;
\r
155 the window size will dynamically scale down so as to not take
\r
156 up more than N bytes in memory. This is useful in
\r
157 repositories with a mix of large and small objects to not run
\r
158 out of memory with a large window, but still be able to take
\r
159 advantage of the large window for the smaller objects. The
\r
160 size can be suffixed with "k", "m", or "g".
\r
161 <literal>--window-memory=0</literal> makes memory usage unlimited, which is the
\r
168 --max-pack-size=<n>
\r
172 Maximum size of each output packfile, expressed in MiB.
\r
173 If specified, multiple packfiles may be created.
\r
174 The default is unlimited.
\r
180 <simplesect id="_configuration">
\r
181 <title>Configuration</title>
\r
182 <simpara>When configuration variable <literal>repack.UseDeltaBaseOffset</literal> is set
\r
183 for the repository, the command passes <literal>--delta-base-offset</literal>
\r
184 option to <emphasis>git-pack-objects</emphasis>; this typically results in slightly
\r
185 smaller packs, but the generated packs are incompatible with
\r
186 versions of git older than (and including) v1.4.3; do not set
\r
187 the variable in a repository that older version of git needs to
\r
188 be able to read (this includes repositories from which packs can
\r
189 be copied out over http or rsync, and people who obtained packs
\r
190 that way can try to use older git with it).</simpara>
\r
192 <simplesect id="_author">
\r
193 <title>Author</title>
\r
194 <simpara>Written by Linus Torvalds <<ulink url="mailto:torvalds@osdl.org">torvalds@osdl.org</ulink>></simpara>
\r
196 <simplesect id="_documentation">
\r
197 <title>Documentation</title>
\r
198 <simpara>Documentation by Ryan Anderson <<ulink url="mailto:ryan@michonline.com">ryan@michonline.com</ulink>></simpara>
\r
200 <simplesect id="_see_also">
\r
201 <title>SEE ALSO</title>
\r
202 <simpara><xref linkend="git-pack-objects(1)"/>
\r
203 <xref linkend="git-prune-packed(1)"/></simpara>
\r
205 <simplesect id="_git">
\r
207 <simpara>Part of the <xref linkend="git(1)"/> suite</simpara>
\r