]>
Commit | Line | Data |
---|---|---|
4ce58ee3 DS |
1 | git-commit-graph(1) |
2 | =================== | |
3 | ||
4 | NAME | |
5 | ---- | |
6 | git-commit-graph - Write and verify Git commit graph files | |
7 | ||
f237c8b6 DS |
8 | |
9 | SYNOPSIS | |
10 | -------- | |
11 | [verse] | |
2a2e32bd | 12 | 'git commit-graph read' [--object-dir <dir>] |
f237c8b6 DS |
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 commit graph | |
26 | file. This parameter exists to specify the location of an alternate | |
27 | that only has the objects directory, not a full .git directory. The | |
28 | commit graph file is expected to be at <dir>/info/commit-graph and | |
29 | the packfiles are expected to be in <dir>/pack. | |
30 | ||
31 | ||
32 | COMMANDS | |
33 | -------- | |
34 | 'write':: | |
35 | ||
36 | Write a commit graph file based on the commits found in packfiles. | |
049d51a2 DS |
37 | + |
38 | With the `--stdin-packs` option, generate the new commit graph by | |
3d5df01b DS |
39 | walking objects only in the specified pack-indexes. (Cannot be combined |
40 | with --stdin-commits.) | |
41 | + | |
42 | With the `--stdin-commits` option, generate the new commit graph by | |
43 | walking commits starting at the commits specified in stdin as a list | |
44 | of OIDs in hex, one OID per line. (Cannot be combined with | |
45 | --stdin-packs.) | |
7547b95b DS |
46 | + |
47 | With the `--append` option, include all commits that are present in the | |
48 | existing commit-graph file. | |
f237c8b6 | 49 | |
2a2e32bd DS |
50 | 'read':: |
51 | ||
52 | Read a graph file given by the commit-graph file and output basic | |
53 | details about the graph file. Used for debugging purposes. | |
54 | ||
f237c8b6 DS |
55 | |
56 | EXAMPLES | |
57 | -------- | |
58 | ||
59 | * Write a commit graph file for the packed commits in your local .git folder. | |
60 | + | |
61 | ------------------------------------------------ | |
62 | $ git commit-graph write | |
63 | ------------------------------------------------ | |
64 | ||
049d51a2 DS |
65 | * Write a graph file, extending the current graph file using commits |
66 | * in <pack-index>. | |
67 | + | |
68 | ------------------------------------------------ | |
69 | $ echo <pack-index> | git commit-graph write --stdin-packs | |
70 | ------------------------------------------------ | |
71 | ||
3d5df01b DS |
72 | * Write a graph file containing all reachable commits. |
73 | + | |
74 | ------------------------------------------------ | |
75 | $ git show-ref -s | git commit-graph write --stdin-commits | |
76 | ------------------------------------------------ | |
77 | ||
7547b95b DS |
78 | * Write a graph file containing all commits in the current |
79 | * commit-graph file along with those reachable from HEAD. | |
80 | + | |
81 | ------------------------------------------------ | |
82 | $ git rev-parse HEAD | git commit-graph write --stdin-commits --append | |
83 | ------------------------------------------------ | |
84 | ||
2a2e32bd DS |
85 | * Read basic information from the commit-graph file. |
86 | + | |
87 | ------------------------------------------------ | |
88 | $ git commit-graph read | |
89 | ------------------------------------------------ | |
90 | ||
f237c8b6 | 91 | |
4ce58ee3 DS |
92 | GIT |
93 | --- | |
94 | Part of the linkgit:git[1] suite |