Introduction
A packfile is the file in which Git stores many
objects (commits, trees, files and tags) together. Objects can be held whole or as
deltas against another object. The same data is sent between repositories on fetch and
push. A pack kept on disk has a .idx index beside it.
Structure
The file is binary, with numbers in network (big-endian) byte order. It starts with the
4 bytes PACK, a 4-byte version (Git accepts 2 and 3 and writes 2) and a
count of objects. The object entries follow, and a checksum of everything before it ends
the file.
Not described
Known, not yet covered
- Reference: this page is a summary; the object entries and delta instructions are not yet described on this site.
- Viewer: the site has no viewer for packfiles.
Links
Software
- Git – the version control system that writes and reads packfiles
Reference
- gitformat-pack – Git’s own description of the pack formats