GITFORMAT-BUNDLE(5) | Git Manual | GITFORMAT-BUNDLE(5) |
NAME
gitformat-bundle - The bundle file format
SYNOPSIS
*.bundle *.bdl
DESCRIPTION
The Git bundle format is a format that represents both refs and Git objects. A bundle is a header in a format similar to git-show-ref(1) followed by a pack in *.pack format.
The format is created and read by the git-bundle(1) command, and supported by e.g. git-fetch(1) and git-clone(1).
FORMAT
We will use ABNF notation to define the Git bundle format. See gitprotocol-common(5) for the details.
A v2 bundle looks like this:
bundle = signature *prerequisite *reference LF pack signature = "# v2 git bundle" LF prerequisite = "-" obj-id SP comment LF comment = *CHAR reference = obj-id SP refname LF pack = ... ; packfile
A v3 bundle looks like this:
bundle = signature *capability *prerequisite *reference LF pack signature = "# v3 git bundle" LF capability = "@" key ["=" value] LF prerequisite = "-" obj-id SP comment LF comment = *CHAR reference = obj-id SP refname LF key = 1*(ALPHA / DIGIT / "-") value = *(%01-09 / %0b-FF) pack = ... ; packfile
SEMANTICS
A Git bundle consists of several parts.
In the bundle format, there can be a comment following a prerequisite obj-id. This is a comment and it has no specific meaning. The writer of the bundle MAY put any string here. The reader of the bundle MUST ignore the comment.
Note on shallow clones and Git bundles
Note that the prerequisites do not represent a shallow-clone boundary. The semantics of the prerequisites and the shallow-clone boundaries are different, and the Git bundle v2 format cannot represent a shallow clone repository.
CAPABILITIES
Because there is no opportunity for negotiation, unknown capabilities cause git bundle to abort.
GIT
Part of the git(1) suite
11/25/2024 | Git 2.47.1 |