]> git.ipfire.org Git - thirdparty/git.git/blob - Documentation/git-multi-pack-index.txt
stash: handle staged changes in skip-worktree files correctly
[thirdparty/git.git] / Documentation / git-multi-pack-index.txt
1 git-multi-pack-index(1)
2 =======================
3
4 NAME
5 ----
6 git-multi-pack-index - Write and verify multi-pack-indexes
7
8
9 SYNOPSIS
10 --------
11 [verse]
12 'git multi-pack-index' [--object-dir=<dir>] <subcommand>
13
14 DESCRIPTION
15 -----------
16 Write or verify a multi-pack-index (MIDX) file.
17
18 OPTIONS
19 -------
20
21 --object-dir=<dir>::
22 Use given directory for the location of Git objects. We check
23 `<dir>/packs/multi-pack-index` for the current MIDX file, and
24 `<dir>/packs` for the pack-files to index.
25
26 The following subcommands are available:
27
28 write::
29 Write a new MIDX file.
30
31 verify::
32 Verify the contents of the MIDX file.
33
34 expire::
35 Delete the pack-files that are tracked by the MIDX file, but
36 have no objects referenced by the MIDX. Rewrite the MIDX file
37 afterward to remove all references to these pack-files.
38
39 repack::
40 Create a new pack-file containing objects in small pack-files
41 referenced by the multi-pack-index. If the size given by the
42 `--batch-size=<size>` argument is zero, then create a pack
43 containing all objects referenced by the multi-pack-index. For
44 a non-zero batch size, Select the pack-files by examining packs
45 from oldest-to-newest, computing the "expected size" by counting
46 the number of objects in the pack referenced by the
47 multi-pack-index, then divide by the total number of objects in
48 the pack and multiply by the pack size. We select packs with
49 expected size below the batch size until the set of packs have
50 total expected size at least the batch size. If the total size
51 does not reach the batch size, then do nothing. If a new pack-
52 file is created, rewrite the multi-pack-index to reference the
53 new pack-file. A later run of 'git multi-pack-index expire' will
54 delete the pack-files that were part of this batch.
55
56
57 EXAMPLES
58 --------
59
60 * Write a MIDX file for the packfiles in the current .git folder.
61 +
62 -----------------------------------------------
63 $ git multi-pack-index write
64 -----------------------------------------------
65
66 * Write a MIDX file for the packfiles in an alternate object store.
67 +
68 -----------------------------------------------
69 $ git multi-pack-index --object-dir <alt> write
70 -----------------------------------------------
71
72 * Verify the MIDX file for the packfiles in the current .git folder.
73 +
74 -----------------------------------------------
75 $ git multi-pack-index verify
76 -----------------------------------------------
77
78
79 SEE ALSO
80 --------
81 See link:technical/multi-pack-index.html[The Multi-Pack-Index Design
82 Document] and link:technical/pack-format.html[The Multi-Pack-Index
83 Format] for more information on the multi-pack-index feature.
84
85
86 GIT
87 ---
88 Part of the linkgit:git[1] suite