{
    "mode": "man",
    "parameter": "GITFORMAT-BUNDLE",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/GITFORMAT-BUNDLE/5/json",
    "generated": "2026-10-22T13:16:50Z",
    "synopsis": "*.bundle\n*.bdl",
    "sections": {
        "NAME": {
            "content": "gitformat-bundle - The bundle file format\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "*.bundle\n*.bdl\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The Git bundle format is a format that represents both refs and Git objects. A bundle is a\nheader in a format similar to git-show-ref(1) followed by a pack in *.pack format.\n\nThe format is created and read by the git-bundle(1) command, and supported by e.g. git-\nfetch(1) and git-clone(1).\n",
            "subsections": []
        },
        "FORMAT": {
            "content": "We will use ABNF notation to define the Git bundle format. See gitprotocol-common(5) for the\ndetails.\n\nA v2 bundle looks like this:\n\nbundle    = signature *prerequisite *reference LF pack\nsignature = \"# v2 git bundle\" LF\n\nprerequisite = \"-\" obj-id SP comment LF\ncomment      = *CHAR\nreference    = obj-id SP refname LF\n\npack         = ... ; packfile\n\n\nA v3 bundle looks like this:\n\nbundle    = signature *capability *prerequisite *reference LF pack\nsignature = \"# v3 git bundle\" LF\n\ncapability   = \"@\" key [\"=\" value] LF\nprerequisite = \"-\" obj-id SP comment LF\ncomment      = *CHAR\nreference    = obj-id SP refname LF\nkey          = 1*(ALPHA / DIGIT / \"-\")\nvalue        = *(%01-09 / %0b-FF)\n\npack         = ... ; packfile\n\n",
            "subsections": []
        },
        "SEMANTICS": {
            "content": "A Git bundle consists of several parts.\n\n•   \"Capabilities\", which are only in the v3 format, indicate functionality that the bundle\nrequires to be read properly.\n\n•   \"Prerequisites\" list the objects that are NOT included in the bundle and the reader of\nthe bundle MUST already have, in order to use the data in the bundle. The objects stored\nin the bundle may refer to prerequisite objects and anything reachable from them (e.g. a\ntree object in the bundle can reference a blob that is reachable from a prerequisite)\nand/or expressed as a delta against prerequisite objects.\n\n•   \"References\" record the tips of the history graph, iow, what the reader of the bundle CAN\n\"git fetch\" from it.\n\n•   \"Pack\" is the pack data stream \"git fetch\" would send, if you fetch from a repository\nthat has the references recorded in the \"References\" above into a repository that has\nreferences pointing at the objects listed in \"Prerequisites\" above.\n\nIn the bundle format, there can be a comment following a prerequisite obj-id. This is a\ncomment and it has no specific meaning. The writer of the bundle MAY put any string here. The\nreader of the bundle MUST ignore the comment.\n",
            "subsections": [
                {
                    "name": "Note on shallow clones and Git bundles",
                    "content": "Note that the prerequisites do not represent a shallow-clone boundary. The semantics of the\nprerequisites and the shallow-clone boundaries are different, and the Git bundle v2 format\ncannot represent a shallow clone repository.\n"
                }
            ]
        },
        "CAPABILITIES": {
            "content": "Because there is no opportunity for negotiation, unknown capabilities cause git bundle to\nabort.\n\n•   object-format specifies the hash algorithm in use, and can take the same values as the\nextensions.objectFormat configuration value.\n\n•   filter specifies an object filter as in the --filter option in git-rev-list(1). The\nresulting pack-file must be marked as a .promisor pack-file after it is unbundled.\n",
            "subsections": []
        },
        "GIT": {
            "content": "Part of the git(1) suite\n\nGit 2.43.0                                   07/02/2025                          GITFORMAT-BUNDLE(5)",
            "subsections": []
        }
    },
    "summary": "gitformat-bundle - The bundle file format",
    "flags": [],
    "examples": [],
    "see_also": []
}