Introduction
The commit-graph is a file in which Git caches the
graph of commits so that history can be walked without unpacking each commit. It is
kept as objects/info/commit-graph, or as a chain of
.graph files in objects/info/commit-graphs.
Structure
The file is binary and big-endian. It starts with the 4 bytes CGPH, a
version (1), the hash type, the number of chunks and the number of base graphs. A table
of chunk positions follows, then the chunks (among them OIDF,
OIDL and CDAT) and a checksum.
Not described
Known, not yet covered
- Reference: this page is a summary; the chunks are not yet described on this site.
- Viewer: the site has no viewer for commit-graph files.
Links
Software
- Git – writes and reads commit-graph files
Reference
- gitformat-commit-graph – Git’s own description of the format