git-unpack-objects
Unpack objects from a packed Git archive
TLDR
SYNOPSIS
git unpack-objects [-n] [-q] [-r] [--strict] [--max-input-size=size]
DESCRIPTION
git unpack-objects is a low-level plumbing command. It reads a packed archive (.pack) from standard input, expands the objects inside it, and writes them into the repository in loose form (one object per file under .git/objects).Objects that already exist in the repository are not unpacked from the packfile. Running this command on a pack that already lives in the target repository therefore unpacks nothing.Typical uses are recovering objects from a pack copied out of another repository, or feeding a pack produced by git pack-objects. Everyday packing and cleanup is done with git repack and git gc; this command is the inverse of packing, not a substitute for those tools.
PARAMETERS
-n
Dry run. Check the pack file without actually unpacking the objects.-q
Suppress the percentage progress meter the command normally prints.-r
When unpacking a corrupt packfile, keep going instead of dying at the first corruption and recover as many objects as possible.--strict
Do not write objects with broken content or links.--max-input-size=size
Die if the pack is larger than size.
INSTALL
CAVEATS
The pack is read from stdin, not from a filename argument. You must run it inside a Git repository. Existing objects are skipped, so a pack already registered in the target repo is a no-op. --strict still requires a well-formed pack; it only refuses to persist broken objects.
SEE ALSO
git-repack(1), git-verify-pack(1), git-cat-file(1), git-gc(1), git-unpack-file(1)
