Merge branch 'sg/subtree-signed-commits' into pu
[git] / Documentation / git-commit-graph.txt
1 git-commit-graph(1)
2 ===================
3
4 NAME
5 ----
6 git-commit-graph - Write and verify Git commit graphs (.graph files)
7
8
9 SYNOPSIS
10 --------
11 [verse]
12 'git commit-graph read' <options> [--object-dir <dir>]
13 'git commit-graph write' <options> [--object-dir <dir>]
14
15
16 DESCRIPTION
17 -----------
18
19 Manage the serialized commit graph file.
20
21
22 OPTIONS
23 -------
24 --object-dir::
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
27         to be in <dir>/pack.
28
29
30 COMMANDS
31 --------
32 'write'::
33
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
36 resulting filename.
37 +
38 With `--set-latest` option, update the graph-latest file to point
39 to the written graph file.
40 +
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.
45 +
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.)
49 +
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
53 --stdin-packs.)
54
55 'read'::
56
57 Read a graph file given by the graph-head file and output basic
58 details about the graph file.
59 +
60 With `--file=<name>` option, consider the graph stored in the file at
61 the path  <object-dir>/info/<name>.
62
63
64 EXAMPLES
65 --------
66
67 * Write a commit graph file for the packed commits in your local .git folder.
68 +
69 ------------------------------------------------
70 $ git commit-graph write
71 ------------------------------------------------
72
73 * Write a graph file for the packed commits in your local .git folder,
74 * update graph-latest, and delete stale graph files.
75 +
76 ------------------------------------------------
77 $ git commit-graph write --set-latest --delete-expired
78 ------------------------------------------------
79
80 * Write a graph file, extending the current graph file using commits
81 * in <pack-index>, update graph-latest, and delete stale graph files.
82 +
83 ------------------------------------------------
84 $ echo <pack-index> | git commit-graph write --set-latest --delete-expired --stdin-packs
85 ------------------------------------------------
86
87 * Write a graph file, extending the current graph file using all
88 * commits reachable from refs/heads/*, update graph-latest, and delete
89 * stale graph files.
90 +
91 ------------------------------------------------
92 $ git show-ref -s | git commit-graph write --set-latest --delete-expired --stdin-commits
93 ------------------------------------------------
94
95 * Read basic information from a graph file.
96 +
97 ------------------------------------------------
98 $ git commit-graph read --file=<name>
99 ------------------------------------------------
100
101
102 GIT
103 ---
104 Part of the linkgit:git[1] suite