GIT-INDEX-PACK(1) | Git Manual | GIT-INDEX-PACK(1) |
NAME¶
git-index-pack - Build pack index file for an existing packed archive
SYNOPSIS¶
git index-pack [-v] [-o <index-file>] [--[no-]rev-index] <pack-file> git index-pack --stdin [--fix-thin] [--keep] [-v] [-o <index-file>]
[--[no-]rev-index] [<pack-file>]
DESCRIPTION¶
Reads a packed archive (.pack) from the specified file, builds a pack index file (.idx) for it, and optionally writes a reverse-index (.rev) for the specified pack. The packed archive, together with the pack index, can then be placed in the objects/pack/ directory of a Git repository.
OPTIONS¶
-v
-o <index-file>
--[no-]rev-index
--stdin
--fix-thin
--keep
--keep=<msg>
--index-version=<version>[,<offset>]
--strict
--progress-title
Set the title of the progress bar. The title is "Receiving objects" by default and "Indexing objects" when --stdin is specified.
--check-self-contained-and-connected
--fsck-objects
Die if the pack contains broken objects. If the pack contains a tree pointing to a .gitmodules blob that does not exist, prints the hash of that blob (for the caller to check) after the hash that goes into the name of the pack/idx file (see "Notes").
--threads=<n>
--max-input-size=<size>
--object-format=<hash-algorithm>
This option cannot be used with --stdin.
Note: At present, there is no interoperability between SHA-256 repositories and SHA-1 repositories.
Historically, we warned that SHA-256 repositories may later need backward incompatible changes when we introduce such interoperability features. Today, we only expect compatible changes. Furthermore, if such changes prove to be necessary, it can be expected that SHA-256 repositories created with today’s Git will be usable by future versions of Git without data loss.
--promisor[=<message>]
NOTES¶
Once the index has been created, the hash that goes into the name of the pack/idx file is printed to stdout. If --stdin was also used then this is prefixed by either "pack\t", or "keep\t" if a new .keep file was successfully created. This is useful to remove a .keep file used as a lock to prevent the race with git repack mentioned above.
GIT¶
Part of the git(1) suite
NOTES¶
- 1.
- partial clone
11/20/2023 | Git 2.43.0 |