6 git-commit-graph - Write and verify Git commit graphs (.graph files)
12 'git commit-graph read' <options> [--object-dir <dir>]
13 'git commit-graph write' <options> [--object-dir <dir>]
19 Manage the serialized commit graph file.
25 Use given directory for the location of packfiles and graph files.
26 The graph files will be in <dir>/info and the packfiles are expected
34 Write a commit graph file based on the commits found in packfiles.
35 Includes all commits from the existing commit graph file. Outputs the
38 With `--set-latest` option, update the graph-latest file to point
39 to the written graph file.
41 With the `--delete-expired` option, delete the graph files in the pack
42 directory that are not referred to by the graph-latest file. To avoid race
43 conditions, do not delete the file previously referred to by the
44 graph-latest file if it is updated by the `--set-latest` option.
46 With the `--stdin-packs` option, generate the new commit graph by
47 walking objects only in the specified packfiles and any commits in
48 the existing graph-head. (Cannot be combined with --stdin-commits.)
50 With the `--stdin-commits` option, generate the new commit graph by
51 walking commits starting at the commits specified in stdin as a list
52 of OIDs in hex, one OID per line. (Cannot be combined with
57 Read a graph file given by the graph-head file and output basic
58 details about the graph file.
60 With `--file=<name>` option, consider the graph stored in the file at
61 the path <object-dir>/info/<name>.
67 * Write a commit graph file for the packed commits in your local .git folder.
69 ------------------------------------------------
70 $ git commit-graph write
71 ------------------------------------------------
73 * Write a graph file for the packed commits in your local .git folder,
74 * update graph-latest, and delete stale graph files.
76 ------------------------------------------------
77 $ git commit-graph write --set-latest --delete-expired
78 ------------------------------------------------
80 * Write a graph file, extending the current graph file using commits
81 * in <pack-index>, update graph-latest, and delete stale graph files.
83 ------------------------------------------------
84 $ echo <pack-index> | git commit-graph write --set-latest --delete-expired --stdin-packs
85 ------------------------------------------------
87 * Write a graph file, extending the current graph file using all
88 * commits reachable from refs/heads/*, update graph-latest, and delete
91 ------------------------------------------------
92 $ git show-ref -s | git commit-graph write --set-latest --delete-expired --stdin-commits
93 ------------------------------------------------
95 * Read basic information from a graph file.
97 ------------------------------------------------
98 $ git commit-graph read --file=<name>
99 ------------------------------------------------
104 Part of the linkgit:git[1] suite