Blame


1 5c860e29 2018-03-12 stsp .\"
2 5c860e29 2018-03-12 stsp .\" Copyright (c) 2017 Martin Pieuchot
3 5d56da81 2019-01-13 stsp .\" Copyright (c) 2018, 2019 Stefan Sperling
4 5c860e29 2018-03-12 stsp .\"
5 5c860e29 2018-03-12 stsp .\" Permission to use, copy, modify, and distribute this software for any
6 5c860e29 2018-03-12 stsp .\" purpose with or without fee is hereby granted, provided that the above
7 5c860e29 2018-03-12 stsp .\" copyright notice and this permission notice appear in all copies.
8 5c860e29 2018-03-12 stsp .\"
9 5c860e29 2018-03-12 stsp .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 5c860e29 2018-03-12 stsp .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 5c860e29 2018-03-12 stsp .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 5c860e29 2018-03-12 stsp .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 5c860e29 2018-03-12 stsp .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 5c860e29 2018-03-12 stsp .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 5c860e29 2018-03-12 stsp .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 5c860e29 2018-03-12 stsp .\"
17 5c860e29 2018-03-12 stsp .Dd $Mdocdate$
18 5c860e29 2018-03-12 stsp .Dt GOT 1
19 5c860e29 2018-03-12 stsp .Os
20 5c860e29 2018-03-12 stsp .Sh NAME
21 5c860e29 2018-03-12 stsp .Nm got
22 eb7dbff5 2019-05-09 stsp .Nd game of trees
23 5c860e29 2018-03-12 stsp .Sh SYNOPSIS
24 0bb8a95e 2018-03-12 stsp .Nm
25 5c860e29 2018-03-12 stsp .Ar command
26 1b6b95a8 2018-03-12 stsp .Op Fl h
27 5c860e29 2018-03-12 stsp .Op Ar arg ...
28 5c860e29 2018-03-12 stsp .Sh DESCRIPTION
29 5c860e29 2018-03-12 stsp .Nm
30 4dfb2f0f 2019-03-26 stsp is a version control system which stores the history of tracked files
31 4dfb2f0f 2019-03-26 stsp in a Git repository, as used by the Git version control system.
32 285dc8a4 2018-03-13 stsp This repository format is described in
33 5e5560e1 2018-08-01 stsp .Xr git-repository 5 .
34 285dc8a4 2018-03-13 stsp .Pp
35 4129c201 2018-03-13 stsp .Nm
36 4129c201 2018-03-13 stsp is a
37 ae73e26f 2019-03-26 stsp .Dq distributed
38 4129c201 2018-03-13 stsp version control system because every copy of a repository is writeable.
39 4129c201 2018-03-13 stsp Modifications made to files can be synchronized between repositories
40 97925469 2018-03-17 stsp at any time.
41 4129c201 2018-03-13 stsp .Pp
42 285dc8a4 2018-03-13 stsp Files managed by
43 285dc8a4 2018-03-13 stsp .Nm
44 4129c201 2018-03-13 stsp must be checked out from the repository for modification.
45 285dc8a4 2018-03-13 stsp Checked out files are stored in a
46 285dc8a4 2018-03-13 stsp .Em work tree
47 c5867b47 2018-03-13 stsp which can be placed at an arbitrary directory in the filesystem hierarchy.
48 fb2921d0 2019-03-26 stsp The on-disk format of this work tree is described in
49 285dc8a4 2018-03-13 stsp .Xr got-worktree 5 .
50 285dc8a4 2018-03-13 stsp .Pp
51 285dc8a4 2018-03-13 stsp .Nm
52 285dc8a4 2018-03-13 stsp provides global and command-specific options.
53 285dc8a4 2018-03-13 stsp Global options must preceed the command name, and are as follows:
54 1b6b95a8 2018-03-12 stsp .Bl -tag -width tenletters
55 1b6b95a8 2018-03-12 stsp .It Fl h
56 1b6b95a8 2018-03-12 stsp Display usage information.
57 1b6b95a8 2018-03-12 stsp .El
58 1b6b95a8 2018-03-12 stsp .Pp
59 38e11793 2018-06-13 stsp The commands for
60 38e11793 2018-06-13 stsp .Nm
61 38e11793 2018-06-13 stsp are as follows:
62 0bb8a95e 2018-03-12 stsp .Bl -tag -width checkout
63 8069f636 2019-01-12 stsp .It Cm checkout [ Fl c Ar commit ] [ Fl p Ar path-prefix ] repository-path [ work-tree-path ]
64 0bb8a95e 2018-03-12 stsp Copy files from a repository into a new work tree.
65 5d7c1dab 2018-04-01 stsp If the
66 5d7c1dab 2018-04-01 stsp .Ar work tree path
67 c844a238 2019-02-06 stsp is not specified, either use the last component of
68 5d7c1dab 2018-04-01 stsp .Ar repository path ,
69 5d7c1dab 2018-04-01 stsp or if a
70 5d7c1dab 2018-04-01 stsp .Ar path prefix
71 c844a238 2019-02-06 stsp was specified use the last component of
72 5d7c1dab 2018-04-01 stsp .Ar path prefix .
73 38e11793 2018-06-13 stsp .Pp
74 38e11793 2018-06-13 stsp The options for
75 38e11793 2018-06-13 stsp .Cm got checkout
76 38e11793 2018-06-13 stsp are as follows:
77 38e11793 2018-06-13 stsp .Bl -tag -width Ds
78 8069f636 2019-01-12 stsp .It Fl c Ar commit
79 8069f636 2019-01-12 stsp Check out files from the specified
80 8069f636 2019-01-12 stsp .Ar commit .
81 c844a238 2019-02-06 stsp If this option is not specified, a commit resolved via the repository's HEAD
82 c844a238 2019-02-06 stsp reference will be used.
83 38e11793 2018-06-13 stsp .It Fl p Ar path-prefix
84 38e11793 2018-06-13 stsp Restrict the work tree to a subset of the repository's tree hierarchy.
85 38e11793 2018-06-13 stsp Only files beneath the specified
86 38e11793 2018-06-13 stsp .Ar path-prefix
87 38e11793 2018-06-13 stsp will be checked out.
88 38e11793 2018-06-13 stsp .El
89 c4cdcb68 2019-04-03 stsp .It Cm update [ Fl c Ar commit ] [ Ar path ]
90 0032ca71 2019-01-23 stsp Update an existing work tree to another commit on the current branch.
91 507dc3bb 2018-12-29 stsp By default, the latest commit on the current branch is assumed.
92 7f838b36 2019-02-08 stsp Show the status of each affected file, using the following status codes:
93 7f838b36 2019-02-08 stsp .Bl -column YXZ description
94 7f838b36 2019-02-08 stsp .It U Ta file was updated and contained no local changes
95 7f838b36 2019-02-08 stsp .It G Ta file was updated and local changes were merged cleanly
96 7f838b36 2019-02-08 stsp .It C Ta file was updated and conflicts occurred during merge
97 7f838b36 2019-02-08 stsp .It D Ta file was deleted
98 7f838b36 2019-02-08 stsp .It A Ta new file was added
99 7f838b36 2019-02-08 stsp .It ~ Ta versioned file is obstructed by a non-regular file
100 a378724f 2019-02-10 stsp .It ! Ta a missing versioned file was restored
101 7f838b36 2019-02-08 stsp .El
102 7f838b36 2019-02-08 stsp .Pp
103 c4cdcb68 2019-04-03 stsp If a
104 c4cdcb68 2019-04-03 stsp .Ar path
105 c4cdcb68 2019-04-03 stsp is specified, restrict the update operation to files at or within this path.
106 f2cf8fbb 2019-04-04 stsp The path is required to exist in the update operation's target commit.
107 f2cf8fbb 2019-04-04 stsp Files in the work tree outside this path will remain unchanged and will
108 f2cf8fbb 2019-04-04 stsp retain their previously recorded base commit.
109 f2cf8fbb 2019-04-04 stsp Some
110 f2cf8fbb 2019-04-04 stsp .Nm
111 f2cf8fbb 2019-04-04 stsp commands may refuse to run while the work tree contains files from
112 c4cdcb68 2019-04-03 stsp multiple base commits.
113 f2cf8fbb 2019-04-04 stsp The base commit of such a work tree can be made consistent by running
114 47ec7be7 2019-05-12 stsp .Cm got update
115 47ec7be7 2019-05-12 stsp across the entire work tree.
116 7f838b36 2019-02-08 stsp .Pp
117 507dc3bb 2018-12-29 stsp The options for
118 507dc3bb 2018-12-29 stsp .Cm got update
119 507dc3bb 2018-12-29 stsp are as follows:
120 507dc3bb 2018-12-29 stsp .Bl -tag -width Ds
121 507dc3bb 2018-12-29 stsp .It Fl c Ar commit
122 507dc3bb 2018-12-29 stsp Update the work tree to the specified
123 507dc3bb 2018-12-29 stsp .Ar commit .
124 0032ca71 2019-01-23 stsp The expected argument is a SHA1 hash which corresponds to a commit object.
125 507dc3bb 2018-12-29 stsp .El
126 927df6b7 2019-02-10 stsp .It Cm status [ Ar path ]
127 6cd959e6 2019-03-26 stsp Show the current modification status of files in a work tree,
128 6bad629b 2019-02-04 stsp using the following status codes:
129 6bad629b 2019-02-04 stsp .Bl -column YXZ description
130 6bad629b 2019-02-04 stsp .It M Ta modified file
131 079890a9 2019-03-26 stsp .It A Ta file scheduled for addition in next commit
132 079890a9 2019-03-26 stsp .It D Ta file scheduled for deletion in next commit
133 7154f6ce 2019-03-27 stsp .It C Ta modified or added file which contains merge conflicts
134 6bad629b 2019-02-04 stsp .It ! Ta versioned file was expected on disk but is missing
135 0dbc2271 2019-02-05 stsp .It ~ Ta versioned file is obstructed by a non-regular file
136 6bad629b 2019-02-04 stsp .It ? Ta unversioned item not tracked by
137 6bad629b 2019-02-04 stsp .Nm
138 6bad629b 2019-02-04 stsp .El
139 6bad629b 2019-02-04 stsp .Pp
140 927df6b7 2019-02-10 stsp If a
141 927df6b7 2019-02-10 stsp .Ar path
142 927df6b7 2019-02-10 stsp is specified, only show modifications within this path.
143 ae9f01af 2018-10-18 stsp .It Cm log [ Fl c Ar commit ] [ Fl C Ar number ] [ Fl f ] [ Fl l Ar N ] [ Fl p ] [ Fl r Ar repository-path ] [ path ]
144 38e11793 2018-06-13 stsp Display history of a repository.
145 04ca23f4 2018-07-16 stsp If a
146 04ca23f4 2018-07-16 stsp .Ar path
147 04ca23f4 2018-07-16 stsp is specified, show only commits which modified this path.
148 38e11793 2018-06-13 stsp .Pp
149 38e11793 2018-06-13 stsp The options for
150 38e11793 2018-06-13 stsp .Cm got log
151 38e11793 2018-06-13 stsp are as follows:
152 38e11793 2018-06-13 stsp .Bl -tag -width Ds
153 38e11793 2018-06-13 stsp .It Fl c Ar commit
154 38e11793 2018-06-13 stsp Start traversing history at the specified
155 38e11793 2018-06-13 stsp .Ar commit .
156 d1f2edc9 2018-06-13 stsp The expected argument is the name of a branch or a SHA1 hash which corresponds
157 1cfab718 2018-06-13 stsp to a commit object.
158 c0cc5c62 2018-10-18 stsp .It Fl C Ar number
159 c0cc5c62 2018-10-18 stsp Set the number of context lines shown in diffs with
160 c0cc5c62 2018-10-18 stsp .Fl p .
161 c0cc5c62 2018-10-18 stsp By default, 3 lines of context are shown.
162 38e11793 2018-06-13 stsp .It Fl f
163 38e11793 2018-06-13 stsp Restrict history traversal to the first parent of each commit.
164 38e11793 2018-06-13 stsp This shows the linear history of the current branch only.
165 38e11793 2018-06-13 stsp Merge commits which affected the current branch will be shown but
166 38e11793 2018-06-13 stsp individual commits which originated on other branches will be omitted.
167 6238ee32 2018-06-13 stsp .It Fl l Ar N
168 6238ee32 2018-06-13 stsp Limit history traversal to a given number of commits.
169 6238ee32 2018-06-13 stsp .It Fl p
170 6238ee32 2018-06-13 stsp Display the patch of modifications made in each commit.
171 04ca23f4 2018-07-16 stsp .It Fl r Ar repository-path
172 04ca23f4 2018-07-16 stsp Use the repository at the specified path.
173 04ca23f4 2018-07-16 stsp If not specified, assume the repository is located at or above the current
174 04ca23f4 2018-07-16 stsp working directory.
175 e9cf2e30 2019-02-05 stsp If this directory is a
176 e9cf2e30 2019-02-05 stsp .Nm
177 e9cf2e30 2019-02-05 stsp work tree, use the repository path associated with this work tree.
178 38e11793 2018-06-13 stsp .El
179 927df6b7 2019-02-10 stsp .It Cm diff [ Fl C Ar number ] [ Fl r Ar repository-path ] [ Ar object1 Ar object2 | Ar path ]
180 927df6b7 2019-02-10 stsp When invoked within a work tree with less than two arguments, display
181 927df6b7 2019-02-10 stsp uncommitted changes in the work tree.
182 927df6b7 2019-02-10 stsp If a
183 927df6b7 2019-02-10 stsp .Ar path
184 927df6b7 2019-02-10 stsp is specified, only show changes within this path.
185 927df6b7 2019-02-10 stsp .Pp
186 927df6b7 2019-02-10 stsp If two arguments are provided, treat each argument as a SHA1 hash which
187 927df6b7 2019-02-10 stsp corresponds to an object in the repository, and display differences
188 927df6b7 2019-02-10 stsp between these objects.
189 3f8b7d6a 2018-04-01 stsp Both objects must be of the same type (blobs, trees, or commits).
190 c0cc5c62 2018-10-18 stsp .Pp
191 c0cc5c62 2018-10-18 stsp The options for
192 c0cc5c62 2018-10-18 stsp .Cm got diff
193 c0cc5c62 2018-10-18 stsp are as follows:
194 c0cc5c62 2018-10-18 stsp .Bl -tag -width Ds
195 c0cc5c62 2018-10-18 stsp .It Fl C Ar number
196 c0cc5c62 2018-10-18 stsp Set the number of context lines shown in the diff.
197 c0cc5c62 2018-10-18 stsp By default, 3 lines of context are shown.
198 b72f483a 2019-02-05 stsp .It Fl r Ar repository-path
199 b72f483a 2019-02-05 stsp Use the repository at the specified path.
200 b72f483a 2019-02-05 stsp If not specified, assume the repository is located at or above the current
201 b72f483a 2019-02-05 stsp working directory.
202 b72f483a 2019-02-05 stsp If this directory is a
203 b72f483a 2019-02-05 stsp .Nm
204 b72f483a 2019-02-05 stsp work tree, use the repository path associated with this work tree.
205 c0cc5c62 2018-10-18 stsp .El
206 1ff8e573 2018-08-02 stsp .It Cm blame [ Fl c Ar commit ] [ Fl r Ar repository-path ] Ar path
207 1ff8e573 2018-08-02 stsp Display line-by-line history of a file at the specified path.
208 1ff8e573 2018-08-02 stsp .Pp
209 1ff8e573 2018-08-02 stsp The options for
210 1ff8e573 2018-08-02 stsp .Cm got blame
211 1ff8e573 2018-08-02 stsp are as follows:
212 1ff8e573 2018-08-02 stsp .Bl -tag -width Ds
213 1ff8e573 2018-08-02 stsp .It Fl c Ar commit
214 1ff8e573 2018-08-02 stsp Start traversing history at the specified
215 1ff8e573 2018-08-02 stsp .Ar commit .
216 1ff8e573 2018-08-02 stsp The expected argument is the name of a branch or a SHA1 hash which corresponds
217 1ff8e573 2018-08-02 stsp to a commit object.
218 1ff8e573 2018-08-02 stsp .It Fl r Ar repository-path
219 1ff8e573 2018-08-02 stsp Use the repository at the specified path.
220 1ff8e573 2018-08-02 stsp If not specified, assume the repository is located at or above the current
221 1ff8e573 2018-08-02 stsp working directory.
222 0c06baac 2019-02-05 stsp If this directory is a
223 0c06baac 2019-02-05 stsp .Nm
224 0c06baac 2019-02-05 stsp work tree, use the repository path associated with this work tree.
225 5c860e29 2018-03-12 stsp .El
226 c1669e2e 2019-01-09 stsp .It Cm tree [ Fl c Ar commit ] [ Fl r Ar repository-path ] [ Fl i ] [ Fl R] [ Ar path ]
227 5de5890b 2018-10-18 stsp Display a listing of files and directories at the specified
228 5de5890b 2018-10-18 stsp directory path in the repository.
229 db0c2996 2019-02-10 stsp Entries shown in this listing may carry one of the following trailing
230 db0c2996 2019-02-10 stsp annotations:
231 db0c2996 2019-02-10 stsp .Bl -column YXZ description
232 db0c2996 2019-02-10 stsp .It / Ta entry is a directory
233 db0c2996 2019-02-10 stsp .It * Ta entry is an executable file
234 db0c2996 2019-02-10 stsp .El
235 db0c2996 2019-02-10 stsp .Pp
236 0c849583 2019-02-05 stsp If no
237 0c849583 2019-02-05 stsp .Ar path
238 0c849583 2019-02-05 stsp is specified, list the repository path corresponding to the current
239 0c849583 2019-02-05 stsp directory of the work tree, or the root directory of the repository
240 0c849583 2019-02-05 stsp if there is no work tree.
241 5de5890b 2018-10-18 stsp .Pp
242 5de5890b 2018-10-18 stsp The options for
243 5de5890b 2018-10-18 stsp .Cm got tree
244 5de5890b 2018-10-18 stsp are as follows:
245 5de5890b 2018-10-18 stsp .Bl -tag -width Ds
246 5de5890b 2018-10-18 stsp .It Fl c Ar commit
247 5de5890b 2018-10-18 stsp List files and directories as they appear in the specified
248 5de5890b 2018-10-18 stsp .Ar commit .
249 5de5890b 2018-10-18 stsp The expected argument is the name of a branch or a SHA1 hash which corresponds
250 5de5890b 2018-10-18 stsp to a commit object.
251 5de5890b 2018-10-18 stsp .It Fl r Ar repository-path
252 5de5890b 2018-10-18 stsp Use the repository at the specified path.
253 5de5890b 2018-10-18 stsp If not specified, assume the repository is located at or above the current
254 5de5890b 2018-10-18 stsp working directory.
255 0c849583 2019-02-05 stsp If this directory is a
256 0c849583 2019-02-05 stsp .Nm
257 0c849583 2019-02-05 stsp work tree, use the repository path associated with this work tree.
258 5de5890b 2018-10-18 stsp .It Fl i
259 5de5890b 2018-10-18 stsp Show object IDs of files (blob objects) and directories (tree objects).
260 c1669e2e 2019-01-09 stsp .It Fl R
261 0c849583 2019-02-05 stsp Recurse into sub-directories in the repository.
262 d0eebce4 2019-03-11 stsp .El
263 d83d9d5c 2019-05-13 stsp .It Cm ref [ Fl r Ar repository-path ] [ Fl l ] [ Fl d Ar name ] [ Ar name Ar target ]
264 d0eebce4 2019-03-11 stsp Manage references in a repository.
265 d0eebce4 2019-03-11 stsp .Pp
266 d0eebce4 2019-03-11 stsp If no options are passed, expect two arguments and attempt to create,
267 d0eebce4 2019-03-11 stsp or update, the reference with the given
268 d0eebce4 2019-03-11 stsp .Ar name ,
269 d0eebce4 2019-03-11 stsp and make it point at the given
270 d83d9d5c 2019-05-13 stsp .Ar target .
271 d83d9d5c 2019-05-13 stsp The target may be a SHA1 hash which corresponds to an existing object ID
272 d83d9d5c 2019-05-13 stsp in the repository, or an existing reference which will be resolved to an
273 d83d9d5c 2019-05-13 stsp object ID.
274 d0eebce4 2019-03-11 stsp .Pp
275 d0eebce4 2019-03-11 stsp The options for
276 d0eebce4 2019-03-11 stsp .Cm got ref
277 d0eebce4 2019-03-11 stsp are as follows:
278 d0eebce4 2019-03-11 stsp .Bl -tag -width Ds
279 d0eebce4 2019-03-11 stsp .It Fl r Ar repository-path
280 d0eebce4 2019-03-11 stsp Use the repository at the specified path.
281 d0eebce4 2019-03-11 stsp If not specified, assume the repository is located at or above the current
282 d0eebce4 2019-03-11 stsp working directory.
283 d0eebce4 2019-03-11 stsp If this directory is a
284 d0eebce4 2019-03-11 stsp .Nm
285 d0eebce4 2019-03-11 stsp work tree, use the repository path associated with this work tree.
286 d0eebce4 2019-03-11 stsp .It Fl l
287 d0eebce4 2019-03-11 stsp List all existing references in the repository.
288 d0eebce4 2019-03-11 stsp .It Fl d Ar name
289 d0eebce4 2019-03-11 stsp Delete the reference with the specified name from the repository.
290 5de5890b 2018-10-18 stsp .El
291 fbb7e5c7 2019-05-11 stsp .It Cm add Ar file-path ...
292 8125ddca 2019-05-11 stsp Schedule unversioned files in a work tree for addition to the
293 d00136be 2019-03-26 stsp repository in the next commit.
294 2ec1f75b 2019-03-26 stsp .It Cm rm Ar file-path
295 2ec1f75b 2019-03-26 stsp Remove a versioned file from a work tree and schedule it for deletion
296 2ec1f75b 2019-03-26 stsp from the repository in the next commit.
297 2ec1f75b 2019-03-26 stsp .Pp
298 2ec1f75b 2019-03-26 stsp The options for
299 2ec1f75b 2019-03-26 stsp .Cm got rm
300 2ec1f75b 2019-03-26 stsp are as follows:
301 2ec1f75b 2019-03-26 stsp .Bl -tag -width Ds
302 2ec1f75b 2019-03-26 stsp .It Fl f
303 2ec1f75b 2019-03-26 stsp Perform the operation even if the file contains uncommitted modifications.
304 d0eebce4 2019-03-11 stsp .El
305 a129376b 2019-03-28 stsp .It Cm revert Ar file-path
306 a129376b 2019-03-28 stsp Revert any uncommited changes in the file at the specified path.
307 a129376b 2019-03-28 stsp File contents will be overwritten with those contained in the
308 a129376b 2019-03-28 stsp work tree's base commit. There is no way to bring discarded
309 a129376b 2019-03-28 stsp changes back after
310 a129376b 2019-03-28 stsp .Cm got revert !
311 a129376b 2019-03-28 stsp .Pp
312 a129376b 2019-03-28 stsp If the file was added with
313 a129376b 2019-03-28 stsp .Cm got add
314 a129376b 2019-03-28 stsp it will become an unversioned file again.
315 a129376b 2019-03-28 stsp If the file was deleted with
316 a129376b 2019-03-28 stsp .Cm got rm
317 a129376b 2019-03-28 stsp it will be restored.
318 74416c47 2019-05-09 stsp .It Cm commit [ Fl m Ar msg ] [ file-path ]
319 15cd91f7 2019-05-12 stsp Create a new commit in the repository from local changes in a work tree
320 15cd91f7 2019-05-12 stsp and use this commit as the new base commit for the work tree.
321 15cd91f7 2019-05-12 stsp .Pp
322 15cd91f7 2019-05-12 stsp Show the status of each affected file, using the following status codes:
323 15cd91f7 2019-05-12 stsp .Bl -column YXZ description
324 15cd91f7 2019-05-12 stsp .It M Ta modified file
325 15cd91f7 2019-05-12 stsp .It D Ta file was deleted
326 15cd91f7 2019-05-12 stsp .It A Ta new file was added
327 15cd91f7 2019-05-12 stsp .El
328 15cd91f7 2019-05-12 stsp .Pp
329 15cd91f7 2019-05-12 stsp Files without local changes will retain their previously recorded base
330 15cd91f7 2019-05-12 stsp commit.
331 15cd91f7 2019-05-12 stsp Some
332 15cd91f7 2019-05-12 stsp .Nm
333 15cd91f7 2019-05-12 stsp commands may refuse to run while the work tree contains files from
334 15cd91f7 2019-05-12 stsp multiple base commits.
335 15cd91f7 2019-05-12 stsp The base commit of such a work tree can be made consistent by running
336 47ec7be7 2019-05-12 stsp .Cm got update
337 47ec7be7 2019-05-12 stsp across the entire work tree.
338 15cd91f7 2019-05-12 stsp .Pp
339 15cd91f7 2019-05-12 stsp The
340 15cd91f7 2019-05-12 stsp .Cm got commit
341 15cd91f7 2019-05-12 stsp command requires the
342 74416c47 2019-05-09 stsp .Ev GOT_AUTHOR
343 74416c47 2019-05-09 stsp environment variable to be set.
344 74416c47 2019-05-09 stsp .Pp
345 74416c47 2019-05-09 stsp The options for
346 74416c47 2019-05-09 stsp .Cm got commit
347 74416c47 2019-05-09 stsp are as follows:
348 74416c47 2019-05-09 stsp .Bl -tag -width Ds
349 74416c47 2019-05-09 stsp .It Fl m Ar msg
350 74416c47 2019-05-09 stsp Use the specified log message when creating the new commit.
351 23594da9 2019-05-13 stsp Without the
352 23594da9 2019-05-13 stsp .Fl m
353 23594da9 2019-05-13 stsp option,
354 23594da9 2019-05-13 stsp .Cm got commit
355 23594da9 2019-05-13 stsp opens a temporary file in an editor where a log message can be written.
356 2ec1f75b 2019-03-26 stsp .El
357 74416c47 2019-05-09 stsp .El
358 74416c47 2019-05-09 stsp .Sh ENVIRONMENT
359 74416c47 2019-05-09 stsp .Bl -tag -width GOT_AUTHOR
360 74416c47 2019-05-09 stsp .It Ev GOT_AUTHOR
361 74416c47 2019-05-09 stsp The author's name and email address for
362 74416c47 2019-05-09 stsp .Cm got commit ,
363 74416c47 2019-05-09 stsp for example:
364 74416c47 2019-05-09 stsp .An Stefan Sperling Aq Mt stsp@openbsd.org
365 23594da9 2019-05-13 stsp .It Ev VISUAL, Ev EDITOR
366 23594da9 2019-05-13 stsp The editor spawned by
367 23594da9 2019-05-13 stsp .Cm got commit .
368 74416c47 2019-05-09 stsp .El
369 5c860e29 2018-03-12 stsp .Sh EXIT STATUS
370 5c860e29 2018-03-12 stsp .Ex -std got
371 97925469 2018-03-17 stsp .Sh EXAMPLES
372 97925469 2018-03-17 stsp Check out a work tree of
373 97925469 2018-03-17 stsp .Ox
374 97925469 2018-03-17 stsp kernel sources from a Git repository at /var/repo/openbsd-src to ~/sys:
375 97925469 2018-03-17 stsp .Pp
376 97925469 2018-03-17 stsp .Dl $ got checkout -p sys /var/repo/openbsd-src ~/sys
377 d83d9d5c 2019-05-13 stsp .Pp
378 d83d9d5c 2019-05-13 stsp Create a new branch
379 d83d9d5c 2019-05-13 stsp .Dq mybranch
380 d83d9d5c 2019-05-13 stsp which is forked off the
381 d83d9d5c 2019-05-13 stsp .Dq master
382 d83d9d5c 2019-05-13 stsp branch:
383 d83d9d5c 2019-05-13 stsp .Pp
384 eb6c77f2 2019-05-13 stsp .Dl $ got ref refs/heads/mybranch refs/heads/master
385 5c860e29 2018-03-12 stsp .Sh SEE ALSO
386 5e5560e1 2018-08-01 stsp .Xr git-repository 5
387 285dc8a4 2018-03-13 stsp .Xr got-worktree 5
388 1a208aaf 2018-04-01 stsp .Sh AUTHORS
389 1a208aaf 2018-04-01 stsp .An Stefan Sperling Aq Mt stsp@openbsd.org
390 1a208aaf 2018-04-01 stsp .An Martin Pieuchot Aq Mt mpi@openbsd.org