blob: 12e2079a7c1e14e151d2ef3a94757c1b88774288 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-repack(1)
2=============
3
4NAME
5----
Junio C Hamano7c73c662007-01-19 00:37:506git-repack - Pack unpacked objects in a repository
Junio C Hamano1a4e8412005-12-27 08:17:237
8
9SYNOPSIS
10--------
Junio C Hamano3eb513f2006-09-18 02:47:1611'git-repack' [-a] [-d] [-f] [-l] [-n] [-q] [--window=N] [--depth=N]
Junio C Hamano1a4e8412005-12-27 08:17:2312
13DESCRIPTION
14-----------
15
16This script is used to combine all objects that do not currently
Junio C Hamanoa6387422007-08-25 03:54:2717reside in a "pack", into a pack. It can also be used to re-organize
Junio C Hamano401939f2007-07-01 06:34:3018existing packs into a single, more efficient pack.
Junio C Hamano1a4e8412005-12-27 08:17:2319
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::
31Instead of incrementally packing the unpacked objects,
Junio C Hamano401939f2007-07-01 06:34:3032pack everything referenced into a single pack.
Junio C Hamano1a4e8412005-12-27 08:17:2333Especially useful when packing a repository that is used
Junio C Hamano9cb74f22007-02-12 04:15:0534for private development and there is no need to worry
Junio C Hamano401939f2007-07-01 06:34:3035about people fetching via dumb protocols from it. Use
36with '-d'. This will clean up the objects that `git prune`
37leaves behind, but `git fsck --full` shows as
38dangling.
Junio C Hamano1a4e8412005-12-27 08:17:2339
40-d::
41After packing, if the newly created packs make some
42existing packs redundant, remove the redundant packs.
Junio C Hamano1bb569e2006-05-05 23:14:2543Also runs gitlink:git-prune-packed[1].
Junio C Hamano1a4e8412005-12-27 08:17:2344
45-l::
46 Pass the `--local` option to `git pack-objects`, see
47 gitlink:git-pack-objects[1].
48
Junio C Hamano7e9f6b72006-02-22 10:44:5549-f::
50 Pass the `--no-reuse-delta` option to `git pack-objects`, see
51 gitlink:git-pack-objects[1].
52
53-q::
54 Pass the `-q` option to `git pack-objects`, see
55 gitlink:git-pack-objects[1].
56
Junio C Hamano1a4e8412005-12-27 08:17:2357-n::
58 Do not update the server information with
59 `git update-server-info`.
60
Junio C Hamano3eb513f2006-09-18 02:47:1661--window=[N], --depth=[N]::
Junio C Hamano93567a62006-10-08 08:47:5662These two options affect how the objects contained in the pack are
Junio C Hamano3eb513f2006-09-18 02:47:1663stored using delta compression. The objects are first internally
64sorted by type, size and optionally names and compared against the
65other objects within `--window` to see if using delta compression saves
66space. `--depth` limits the maximum delta depth; making it too deep
67affects the performance on the unpacker side, because delta data needs
68to be applied that many times to get to the necessary object.
Junio C Hamano91d44c52007-05-09 07:16:0769The default value for --window is 10 and --depth is 50.
Junio C Hamano3eb513f2006-09-18 02:47:1670
Junio C Hamano235d53f2007-07-13 00:25:1571--window-memory=[N]::
72This option provides an additional limit on top of `--window`;
73the window size will dynamically scale down so as to not take
74up more than N bytes in memory. This is useful in
75repositories with a mix of large and small objects to not run
76out of memory with a large window, but still be able to take
77advantage of the large window for the smaller objects. The
78size can be suffixed with "k", "m", or "g".
79`--window-memory=0` makes memory usage unlimited, which is the
80default.
81
Junio C Hamano591dc6a2007-05-29 09:18:1982--max-pack-size=<n>::
83Maximum size of each output packfile, expressed in MiB.
84If specified, multiple packfiles may be created.
85The default is unlimited.
86
Junio C Hamano3eb513f2006-09-18 02:47:1687
Junio C Hamano77b7e902006-10-23 07:18:5088Configuration
89-------------
90
91When configuration variable `repack.UseDeltaBaseOffset` is set
92for the repository, the command passes `--delta-base-offset`
93option to `git-pack-objects`; this typically results in slightly
94smaller packs, but the generated packs are incompatible with
95versions of git older than (and including) v1.4.3; do not set
96the variable in a repository that older version of git needs to
97be able to read (this includes repositories from which packs can
98be copied out over http or rsync, and people who obtained packs
99that way can try to use older git with it).
100
101
Junio C Hamano1a4e8412005-12-27 08:17:23102Author
103------
104Written by Linus Torvalds <torvalds@osdl.org>
105
106Documentation
107--------------
108Documentation by Ryan Anderson <ryan@michonline.com>
109
Junio C Hamanodecf50e2006-03-05 10:51:14110See Also
Junio C Hamano1a4e8412005-12-27 08:17:23111--------
112gitlink:git-pack-objects[1]
113gitlink:git-prune-packed[1]
114
115GIT
116---
117Part of the gitlink:git[7] suite