{
    "mode": "man",
    "parameter": "GIT-UNPACK-OBJECTS",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/man/GIT-UNPACK-OBJECTS/json",
    "generated": "2026-11-12T11:07:47Z",
    "synopsis": "git unpack-objects [-n] [-q] [-r] [--strict]",
    "sections": {
        "NAME": {
            "content": "git-unpack-objects - Unpack objects from a packed archive\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "git unpack-objects [-n] [-q] [-r] [--strict]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Read a packed archive (.pack) from the standard input, expanding the objects contained within\nand writing them into the repository in \"loose\" (one object per file) format.\n\nObjects that already exist in the repository will not be unpacked from the packfile.\nTherefore, nothing will be unpacked if you use this command on a packfile that exists within\nthe target repository.\n\nSee git-repack(1) for options to generate new packs and replace existing ones.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-n",
                    "content": "Dry run. Check the pack file without actually unpacking the objects.\n",
                    "flag": "-n"
                },
                {
                    "name": "-q",
                    "content": "The command usually shows percentage progress. This flag suppresses it.\n",
                    "flag": "-q"
                },
                {
                    "name": "-r",
                    "content": "When unpacking a corrupt packfile, the command dies at the first corruption. This flag\ntells it to keep going and make the best effort to recover as many objects as possible.\n",
                    "flag": "-r"
                },
                {
                    "name": "--strict",
                    "content": "Don’t write objects with broken content or links.\n\n--max-input-size=<size>\nDie, if the pack is larger than <size>.\n",
                    "long": "--strict"
                }
            ]
        },
        "GIT": {
            "content": "Part of the git(1) suite\n\nGit 2.43.0                                   07/02/2025                        GIT-UNPACK-OBJECTS(1)",
            "subsections": []
        }
    },
    "summary": "git-unpack-objects - Unpack objects from a packed archive",
    "flags": [
        {
            "flag": "-n",
            "long": null,
            "arg": null,
            "description": "Dry run. Check the pack file without actually unpacking the objects."
        },
        {
            "flag": "-q",
            "long": null,
            "arg": null,
            "description": "The command usually shows percentage progress. This flag suppresses it."
        },
        {
            "flag": "-r",
            "long": null,
            "arg": null,
            "description": "When unpacking a corrupt packfile, the command dies at the first corruption. This flag tells it to keep going and make the best effort to recover as many objects as possible."
        },
        {
            "flag": "",
            "long": "--strict",
            "arg": null,
            "description": "Don’t write objects with broken content or links. --max-input-size=<size> Die, if the pack is larger than <size>."
        }
    ],
    "examples": [],
    "see_also": [],
    "tldr": {
        "source": "official",
        "description": "Git command for unpacking objects from a packed archive.",
        "examples": [
            {
                "description": "Simulate the pack file without unpacking objects",
                "command": "git < {{pack-file.pack}} unpack-objects -n"
            },
            {
                "description": "Suppress percentage progress typically shown by the command",
                "command": "git < {{pack-file.pack}} unpack-objects -q"
            },
            {
                "description": "Unpack a corrupt packfile beyond the first corruption",
                "command": "git < {{pack-file.pack}} unpack-objects -r"
            },
            {
                "description": "Don't write objects containing broken content or links",
                "command": "git < {{pack-file.pack}} unpack-objects --strict"
            },
            {
                "description": "Die, given a pack larger than `size`",
                "command": "git < {{pack-file.pack}} unpack-objects --max-input-size={{size}}"
            }
        ]
    }
}