2 .\" Title: git-commit-graph
3 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
7 .\" Source: Git 2.47.0.rc1.33.g90fe3800b9
10 .TH "GIT\-COMMIT\-GRAPH" "1" "2024-10-04" "Git 2\&.47\&.0\&.rc1\&.33\&.g9" "Git Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 git-commit-graph \- Write and verify Git commit\-graph files
35 \fIgit commit\-graph verify\fR [\-\-object\-dir <dir>] [\-\-shallow] [\-\-[no\-]progress]
36 \fIgit commit\-graph write\fR [\-\-object\-dir <dir>] [\-\-append]
37 [\-\-split[=<strategy>]] [\-\-reachable | \-\-stdin\-packs | \-\-stdin\-commits]
38 [\-\-changed\-paths] [\-\-[no\-]max\-new\-filters <n>] [\-\-[no\-]progress]
43 Manage the serialized commit\-graph file\&.
48 Use given directory for the location of packfiles and commit\-graph file\&. This parameter exists to specify the location of an alternate that only has the objects directory, not a full
50 directory\&. The commit\-graph file is expected to be in the
52 directory and the packfiles are expected to be in
53 \fB<dir>/pack\fR\&. If the directory could not be made into an absolute path, or does not match any known object directory,
54 \fBgit commit\-graph \&.\&.\&.\fR
55 will exit with non\-zero status\&.
60 Turn progress on/off explicitly\&. If neither is specified, progress is shown if standard error is connected to a terminal\&.
66 Write a commit\-graph file based on the commits found in packfiles\&. If the config option
67 \fBcore\&.commitGraph\fR
68 is disabled, then this command will output a warning, then return success without writing a commit\-graph file\&.
71 \fB\-\-stdin\-packs\fR
72 option, generate the new commit graph by walking objects only in the specified pack\-indexes\&. (Cannot be combined with
73 \fB\-\-stdin\-commits\fR
75 \fB\-\-reachable\fR\&.)
78 \fB\-\-stdin\-commits\fR
79 option, generate the new commit graph by walking commits starting at the commits specified in stdin as a list of OIDs in hex, one OID per line\&. OIDs that resolve to non\-commits (either directly, or by peeling tags) are silently ignored\&. OIDs that are malformed, or do not exist generate an error\&. (Cannot be combined with
80 \fB\-\-stdin\-packs\fR
82 \fB\-\-reachable\fR\&.)
86 option, generate the new commit graph by walking commits starting at all refs\&. (Cannot be combined with
87 \fB\-\-stdin\-commits\fR
89 \fB\-\-stdin\-packs\fR\&.)
93 option, include all commits that are present in the existing commit\-graph file\&.
96 \fB\-\-changed\-paths\fR
97 option, compute and write information about the paths changed between a commit and its first parent\&. This operation can take a while on large repositories\&. It provides significant performance gains for getting history of a directory or a file with
98 \fBgit log \-\- <path>\fR\&. If this option is given, future commit\-graph writes will automatically assume that this option was intended\&. Use
99 \fB\-\-no\-changed\-paths\fR
100 to stop storing this data\&.
103 \fB\-\-max\-new\-filters=<n>\fR
104 option, generate at most
106 new Bloom filters (if
107 \fB\-\-changed\-paths\fR
111 \fB\-1\fR, no limit is enforced\&. Only commits present in the new layer count against this limit\&. To retroactively compute Bloom filters over earlier layers, it is advised to use
112 \fB\-\-split=replace\fR\&. Overrides the
113 \fBcommitGraph\&.maxNewFilters\fR
117 \fB\-\-split[=<strategy>]\fR
118 option, write the commit\-graph as a chain of multiple commit\-graph files stored in
119 \fB<dir>/info/commit\-graphs\fR\&. Commit\-graph layers are merged based on the strategy and other splitting options\&. The new commits not already in the commit\-graph are added in a new "tip" file\&. This file is merged with the existing file if the following merge conditions are met:
130 \fB\-\-split=no\-merge\fR
131 is specified, a merge is never performed, and the remaining options are ignored\&.
132 \fB\-\-split=replace\fR
133 overwrites the existing chain with a new one\&. A bare
135 defers to the remaining options\&. (Note that merging a chain of commit graphs replaces the existing chain with a length\-1 chain where the first and only incremental holds the entire graph)\&.
147 \fB\-\-size\-multiple=<X>\fR
148 is not specified, let
150 equal 2\&. If the new tip file would have
152 commits and the previous tip has
159 \fBM\fR, instead merge the two files into a single file\&.
171 \fB\-\-max\-commits=<M>\fR
174 a positive integer, and the new tip file would have more than
176 commits, then instead merge the new tip with the previous tip\&.
179 \fB\-\-expire\-time=<datetime>\fR
180 is not specified, let
182 be the current time\&. After writing the split commit\-graph, delete all unused commit\-graph whose modified times are older than
189 Read the commit\-graph file and verify its contents against the object database\&. Used to check for corrupted data\&.
193 option, only check the tip commit\-graph file in a chain of split commit\-graphs\&.
205 Write a commit\-graph file for the packed commits in your local
213 $ git commit\-graph write
228 Write a commit\-graph file, extending the current commit\-graph file using commits in
229 \fB<pack\-index>\fR\&.
235 $ echo <pack\-index> | git commit\-graph write \-\-stdin\-packs
250 Write a commit\-graph file containing all reachable commits\&.
256 $ git show\-ref \-s | git commit\-graph write \-\-stdin\-commits
271 Write a commit\-graph file containing all commits in the current commit\-graph file along with those reachable from
278 $ git rev\-parse HEAD | git commit\-graph write \-\-stdin\-commits \-\-append
286 Everything below this line in this section is selectively included from the \fBgit-config\fR(1) documentation\&. The content is the same as what\(cqs found there:
288 commitGraph\&.generationVersion
290 Specifies the type of generation number version to use when writing or reading the commit\-graph file\&. If version 1 is specified, then the corrected commit dates will not be written or read\&. Defaults to 2\&.
293 commitGraph\&.maxNewFilters
295 Specifies the default value for the
296 \fB\-\-max\-new\-filters\fR
298 \fBgit commit\-graph write\fR
300 \fBgit-commit-graph\fR(1))\&.
303 commitGraph\&.readChangedPaths
305 Deprecated\&. Equivalent to commitGraph\&.changedPathsVersion=\-1 if true, and commitGraph\&.changedPathsVersion=0 if false\&. (If commitGraph\&.changedPathVersion is also set, commitGraph\&.changedPathsVersion takes precedence\&.)
308 commitGraph\&.changedPathsVersion
310 Specifies the version of the changed\-path Bloom filters that Git will read and write\&. May be \-1, 0, 1, or 2\&. Note that values greater than 1 may be incompatible with older versions of Git which do not yet understand those versions\&. Use caution when operating in a mixed\-version environment\&.
314 If \-1, Git will use the version of the changed\-path Bloom filters in the repository, defaulting to 1 if there are none\&.
316 If 0, Git will not read any Bloom filters, and will write version 1 Bloom filters when instructed to write\&.
318 If 1, Git will only read version 1 Bloom filters, and will write version 1 Bloom filters\&.
320 If 2, Git will only read version 2 Bloom filters, and will write version 2 Bloom filters\&.
323 \fBgit-commit-graph\fR(1)
324 for more information\&.
328 see \fBgitformat-commit-graph\fR(5)\&.
331 Part of the \fBgit\fR(1) suite