2 5c860e29 2018-03-12 stsp .\" Copyright (c) 2017 Martin Pieuchot
3 5aa81393 2020-01-06 stsp .\" Copyright (c) 2018, 2019, 2020 Stefan Sperling
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.
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.
17 5c860e29 2018-03-12 stsp .Dd $Mdocdate$
22 8e13c46f 2019-08-05 stsp .Nd Game of Trees
23 5c860e29 2018-03-12 stsp .Sh SYNOPSIS
27 5c860e29 2018-03-12 stsp .Op Ar arg ...
28 5c860e29 2018-03-12 stsp .Sh DESCRIPTION
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 .
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.
42 285dc8a4 2018-03-13 stsp Files managed by
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 .
52 285dc8a4 2018-03-13 stsp provides global and command-specific options.
53 bc3056e3 2019-08-18 stsp Global options must precede the command name, and are as follows:
54 1b6b95a8 2018-03-12 stsp .Bl -tag -width tenletters
56 fef8a0d3 2019-08-04 stsp Display usage information and exit immediately.
57 1795b260 2021-04-02 kn .It Fl V , -version
58 53ccebc2 2019-07-30 stsp Display program version and exit immediately.
61 38e11793 2018-06-13 stsp The commands for
63 38e11793 2018-06-13 stsp are as follows:
64 0bb8a95e 2018-03-12 stsp .Bl -tag -width checkout
66 dfc23429 2019-08-11 stsp .It Cm import Oo Fl b Ar branch Oc Oo Fl m Ar message Oc Oo Fl r Ar repository-path Oc Oo Fl I Ar pattern Oc Ar directory
67 4683a10b 2021-11-04 kn .Dl Pq alias: Cm im
68 3ce1b845 2019-07-15 stsp Create an initial commit in a repository from the file hierarchy
69 3ce1b845 2019-07-15 stsp within the specified
70 3ce1b845 2019-07-15 stsp .Ar directory .
71 3ce1b845 2019-07-15 stsp The created commit will not have any parent commits, i.e. it will be a
72 3ce1b845 2019-07-15 stsp root commit.
73 3ce1b845 2019-07-15 stsp Also create a new reference which provides a branch name for the newly
74 3ce1b845 2019-07-15 stsp created commit.
75 21a44f98 2019-07-15 stsp Show the path of each imported file to indicate progress.
78 21a44f98 2019-07-15 stsp .Cm got import
79 21a44f98 2019-07-15 stsp command requires the
80 21a44f98 2019-07-15 stsp .Ev GOT_AUTHOR
81 aba9c984 2019-09-08 stsp environment variable to be set,
82 257add31 2020-09-09 stsp unless an author has been configured in
83 257add31 2020-09-09 stsp .Xr got.conf 5
85 aba9c984 2019-09-08 stsp .Dv user.name
87 709ae9eb 2019-09-08 stsp .Dv user.email
88 709ae9eb 2019-09-08 stsp configuration settings can be obtained from the repository's
89 aba9c984 2019-09-08 stsp .Pa .git/config
90 c9956ddf 2019-09-08 stsp file or from Git's global
91 c9956ddf 2019-09-08 stsp .Pa ~/.gitconfig
92 c9956ddf 2019-09-08 stsp configuration file.
94 3ce1b845 2019-07-15 stsp The options for
95 3ce1b845 2019-07-15 stsp .Cm got import
96 3ce1b845 2019-07-15 stsp are as follows:
97 3ce1b845 2019-07-15 stsp .Bl -tag -width Ds
98 3ce1b845 2019-07-15 stsp .It Fl b Ar branch
99 3ce1b845 2019-07-15 stsp Create the specified
101 3ce1b845 2019-07-15 stsp instead of creating the default branch
103 3ce1b845 2019-07-15 stsp Use of this option is required if the
105 3ce1b845 2019-07-15 stsp branch already exists.
106 3ce1b845 2019-07-15 stsp .It Fl m Ar message
107 3ce1b845 2019-07-15 stsp Use the specified log message when creating the new commit.
108 3ce1b845 2019-07-15 stsp Without the
111 3ce1b845 2019-07-15 stsp .Cm got import
112 3ce1b845 2019-07-15 stsp opens a temporary file in an editor where a log message can be written.
113 3ce1b845 2019-07-15 stsp .It Fl r Ar repository-path
114 3ce1b845 2019-07-15 stsp Use the repository at the specified path.
115 3ce1b845 2019-07-15 stsp If not specified, assume the repository is located at or above the current
116 3ce1b845 2019-07-15 stsp working directory.
117 3ce1b845 2019-07-15 stsp .It Fl I Ar pattern
118 3ce1b845 2019-07-15 stsp Ignore files or directories with a name which matches the specified
119 3ce1b845 2019-07-15 stsp .Ar pattern .
120 3ce1b845 2019-07-15 stsp This option may be specified multiple times to build a list of ignore patterns.
122 3ce1b845 2019-07-15 stsp .Ar pattern
123 3ce1b845 2019-07-15 stsp follows the globbing rules documented in
124 3ce1b845 2019-07-15 stsp .Xr glob 7 .
127 0e4002ca 2020-03-21 stsp .It Cm clone Oo Fl a Oc Oo Fl b Ar branch Oc Oo Fl l Oc Oo Fl m Oc Oo Fl q Oc Oo Fl v Oc Oo Fl R Ar reference Oc Ar repository-URL Op Ar directory
128 4683a10b 2021-11-04 kn .Dl Pq alias: Cm cl
129 2ab43947 2020-03-18 stsp Clone a Git repository at the specified
130 2ab43947 2020-03-18 stsp .Ar repository-URL
131 2ab43947 2020-03-18 stsp into the specified
132 3493b628 2020-03-20 stsp .Ar directory .
134 3493b628 2020-03-20 stsp .Ar directory
135 e38d4cde 2022-03-21 naddy is specified, the directory name will be derived from the name of the
136 2ab43947 2020-03-18 stsp cloned repository.
137 2ab43947 2020-03-18 stsp .Cm got clone
138 2ab43947 2020-03-18 stsp will refuse to run if the
139 3493b628 2020-03-20 stsp .Ar directory
140 2ab43947 2020-03-18 stsp already exists.
143 2ab43947 2020-03-18 stsp .Ar repository-URL
144 619eb6dd 2020-03-20 stsp specifies a protocol scheme, a server hostname, an optional port number
145 619eb6dd 2020-03-20 stsp separated from the hostname by a colon, and a path to the repository on
146 619eb6dd 2020-03-20 stsp the server:
147 619eb6dd 2020-03-20 stsp .Lk scheme://hostname:port/path/to/repository
149 2ab43947 2020-03-18 stsp The following protocol schemes are supported:
150 2ab43947 2020-03-18 stsp .Bl -tag -width git+ssh
152 2ab43947 2020-03-18 stsp The Git protocol as implemented by the
153 2ab43947 2020-03-18 stsp .Xr git-daemon 1
155 10c073e7 2020-03-20 stsp Use of this protocol is discouraged since it supports neither authentication
156 10c073e7 2020-03-20 stsp nor encryption.
157 2ab43947 2020-03-18 stsp .It git+ssh
158 2ab43947 2020-03-18 stsp The Git protocol wrapped in an authenticated and encrypted
161 2ab43947 2020-03-18 stsp With this protocol the hostname may contain an embedded username for
164 2ab43947 2020-03-18 stsp .Mt user@hostname
166 2ab43947 2020-03-18 stsp Short alias for git+ssh.
169 89c3c67b 2020-03-20 stsp Objects in the cloned repository are stored in a pack file which is downloaded
170 89c3c67b 2020-03-20 stsp from the server.
171 89c3c67b 2020-03-20 stsp This pack file will then be indexed to facilitate access to the objects stored
173 89c3c67b 2020-03-20 stsp If any objects in the pack file are stored in deltified form, all deltas will
174 89c3c67b 2020-03-20 stsp be fully resolved in order to compute the ID of such objects.
175 89c3c67b 2020-03-20 stsp This can take some time.
176 010f7279 2020-03-20 stsp More details about the pack file format are documented in
177 010f7279 2020-03-20 stsp .Xr git-repository 5 .
179 7848a0e1 2020-03-19 stsp .Cm got clone
180 7848a0e1 2020-03-19 stsp creates a remote repository entry in the
181 257add31 2020-09-09 stsp .Xr got.conf 5
184 257add31 2020-09-09 stsp files of the cloned repository to store the
185 7848a0e1 2020-03-19 stsp .Ar repository-url
189 99495ddb 2021-01-10 stsp .Ar reference
190 132af4a5 2021-01-05 stsp arguments for future use by
191 7848a0e1 2020-03-19 stsp .Cm got fetch
193 7848a0e1 2020-03-19 stsp .Xr git-fetch 1 .
195 2ab43947 2020-03-18 stsp The options for
196 2ab43947 2020-03-18 stsp .Cm got clone
197 2ab43947 2020-03-18 stsp are as follows:
198 2ab43947 2020-03-18 stsp .Bl -tag -width Ds
200 1d4b192f 2020-03-21 stsp Fetch all branches from the remote repository's
201 1d4b192f 2020-03-21 stsp .Dq refs/heads/
202 5aa20203 2021-01-05 stsp reference namespace and set
203 f1bf60d1 2022-07-03 stsp .Cm fetch_all_branches
204 5aa20203 2021-01-05 stsp in the cloned repository's
205 5aa20203 2021-01-05 stsp .Xr got.conf 5
206 5aa20203 2021-01-05 stsp file for future use by
207 5aa20203 2021-01-05 stsp .Cm got fetch .
208 4ba14133 2020-03-20 stsp If this option is not specified, a branch resolved via the remote
209 4ba14133 2020-03-20 stsp repository's HEAD reference will be fetched.
210 4ba14133 2020-03-20 stsp Cannot be used together with the
213 4ba14133 2020-03-20 stsp .It Fl b Ar branch
214 4ba14133 2020-03-20 stsp Fetch the specified
216 1d4b192f 2020-03-21 stsp from the remote repository's
217 1d4b192f 2020-03-21 stsp .Dq refs/heads/
218 1d4b192f 2020-03-21 stsp reference namespace.
219 4ba14133 2020-03-20 stsp This option may be specified multiple times to build a list of branches
221 4ba14133 2020-03-20 stsp If the branch corresponding to the remote repository's HEAD reference is not
222 4ba14133 2020-03-20 stsp in this list, the cloned repository's HEAD reference will be set to the first
223 4ba14133 2020-03-20 stsp branch which was fetched.
224 4ba14133 2020-03-20 stsp If this option is not specified, a branch resolved via the remote
225 4ba14133 2020-03-20 stsp repository's HEAD reference will be fetched.
226 4ba14133 2020-03-20 stsp Cannot be used together with the
230 a18cccf9 2020-03-21 stsp List branches and tags available for fetching from the remote repository
231 41b0de12 2020-03-21 stsp and exit immediately.
232 41b0de12 2020-03-21 stsp Cannot be used together with any of the other options except
237 469dd726 2020-03-20 stsp Create the cloned repository as a mirror of the original repository.
238 469dd726 2020-03-20 stsp This is useful if the cloned repository will not be used to store
239 bd81cfb7 2020-04-19 stsp locally created commits.
241 469dd726 2020-03-20 stsp The repository's
242 257add31 2020-09-09 stsp .Xr got.conf 5
245 257add31 2020-09-09 stsp files will be set up with the
247 469dd726 2020-03-20 stsp option enabled, such that
248 469dd726 2020-03-20 stsp .Cm got fetch
250 469dd726 2020-03-20 stsp .Xr git-fetch 1
251 bd81cfb7 2020-04-19 stsp will write incoming changes directly to branches in the
252 469dd726 2020-03-20 stsp .Dq refs/heads/
253 469dd726 2020-03-20 stsp reference namespace, rather than to branches in the
254 469dd726 2020-03-20 stsp .Dq refs/remotes/
256 469dd726 2020-03-20 stsp This avoids the usual requirement of having to run
257 469dd726 2020-03-20 stsp .Cm got rebase
259 469dd726 2020-03-20 stsp .Cm got fetch
260 bd81cfb7 2020-04-19 stsp in order to make incoming changes appear on branches in the
261 bd81cfb7 2020-04-19 stsp .Dq refs/heads/
263 bd81cfb7 2020-04-19 stsp But maintaining custom changes in the cloned repository becomes difficult
264 bd81cfb7 2020-04-19 stsp since such changes will be at risk of being discarded whenever incoming
265 498ef124 2020-03-21 stsp changes are fetched.
267 2ab43947 2020-03-18 stsp Suppress progress reporting output.
268 2ab43947 2020-03-18 stsp The same option will be passed to
270 2ab43947 2020-03-18 stsp if applicable.
272 2690194b 2020-03-21 stsp Verbose mode.
274 2690194b 2020-03-21 stsp .Cm got clone
275 2690194b 2020-03-21 stsp to print debugging messages to standard error output.
276 2690194b 2020-03-21 stsp This option will be passed to
278 2ab43947 2020-03-18 stsp if applicable.
279 2ab43947 2020-03-18 stsp Multiple -v options increase the verbosity.
280 2ab43947 2020-03-18 stsp The maximum is 3.
281 0e4002ca 2020-03-21 stsp .It Fl R Ar reference
282 0e4002ca 2020-03-21 stsp In addition to the branches and tags that will be fetched, fetch an arbitrary
283 0e4002ca 2020-03-21 stsp .Ar reference
284 0e4002ca 2020-03-21 stsp from the remote repository's
287 0e4002ca 2020-03-21 stsp This option may be specified multiple times to build a list of additional
288 0e4002ca 2020-03-21 stsp references to fetch.
289 71f12362 2020-03-21 stsp The specified
290 71f12362 2020-03-21 stsp .Ar reference
291 a18cccf9 2020-03-21 stsp may either be a path to a specific reference, or a reference namespace
292 71f12362 2020-03-21 stsp which will cause all references in this namespace to be fetched.
294 71f12362 2020-03-21 stsp Each reference will be mapped into the cloned repository's
295 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
296 0e4002ca 2020-03-21 stsp namespace, unless the
298 0e4002ca 2020-03-21 stsp option is used to mirror references directly into the cloned repository's
302 0e4002ca 2020-03-21 stsp .Cm got clone
303 0e4002ca 2020-03-21 stsp will refuse to fetch references from the remote repository's
304 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
306 0e4002ca 2020-03-21 stsp .Dq refs/got/
310 161728eb 2021-07-24 stsp .It Cm fetch Oo Fl a Oc Oo Fl b Ar branch Oc Oo Fl d Oc Oo Fl l Oc Oo Fl r Ar repository-path Oc Oo Fl t Oc Oo Fl q Oc Oo Fl v Oc Oo Fl R Ar reference Oc Oo Fl X Oc Op Ar remote-repository
311 4683a10b 2021-11-04 kn .Dl Pq alias: Cm fe
312 7848a0e1 2020-03-19 stsp Fetch new changes from a remote repository.
314 4ba14133 2020-03-20 stsp .Ar remote-repository
315 4ba14133 2020-03-20 stsp is specified,
317 7848a0e1 2020-03-19 stsp will be used.
318 50b0790e 2020-09-11 stsp The remote repository's URL is obtained from the corresponding entry in
319 257add31 2020-09-09 stsp .Xr got.conf 5
322 f8ab0c60 2020-03-20 stsp file of the local repository, as created by
323 7848a0e1 2020-03-19 stsp .Cm got clone .
325 89c3c67b 2020-03-20 stsp New changes will be stored in a separate pack file downloaded from the server.
326 89c3c67b 2020-03-20 stsp Optionally, separate pack files stored in the repository can be combined with
327 89c3c67b 2020-03-20 stsp .Xr git-repack 1 .
329 498ef124 2020-03-21 stsp By default, branch references in the
330 7848a0e1 2020-03-19 stsp .Dq refs/remotes/
331 498ef124 2020-03-21 stsp reference namespace will be updated to point at the newly fetched commits.
333 498ef124 2020-03-21 stsp .Cm got rebase
334 bd81cfb7 2020-04-19 stsp command can then be used to make new changes visible on branches in the
335 7848a0e1 2020-03-19 stsp .Dq refs/heads/
336 bd81cfb7 2020-04-19 stsp namespace, merging incoming changes with the changes on those branches
337 bd81cfb7 2020-04-19 stsp as necessary.
339 498ef124 2020-03-21 stsp If the repository was created as a mirror with
340 e38d4cde 2022-03-21 naddy .Cm got clone -m ,
341 498ef124 2020-03-21 stsp then all branches in the
342 469dd726 2020-03-20 stsp .Dq refs/heads/
343 498ef124 2020-03-21 stsp namespace will be updated directly to match the corresponding branches in
344 498ef124 2020-03-21 stsp the remote repository.
345 175367bd 2020-03-20 stsp If those branches contained local commits, these commits will no longer be
346 175367bd 2020-03-20 stsp reachable via a reference and will therefore be at risk of being discarded
347 e6786710 2021-07-03 stsp by Git's garbage collector or
348 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
349 bd81cfb7 2020-04-19 stsp Maintaining custom changes in a mirror repository is therefore discouraged.
351 db6d8ad8 2020-03-21 stsp In any case, references in the
352 7848a0e1 2020-03-19 stsp .Dq refs/tags/
353 db6d8ad8 2020-03-21 stsp namespace will always be fetched and mapped directly to local references
354 db6d8ad8 2020-03-21 stsp in the same namespace.
356 7848a0e1 2020-03-19 stsp The options for
357 7848a0e1 2020-03-19 stsp .Cm got fetch
358 7848a0e1 2020-03-19 stsp are as follows:
359 7848a0e1 2020-03-19 stsp .Bl -tag -width Ds
361 1d4b192f 2020-03-21 stsp Fetch all branches from the remote repository's
362 1d4b192f 2020-03-21 stsp .Dq refs/heads/
363 1d4b192f 2020-03-21 stsp reference namespace.
364 0c8b29c5 2021-01-05 stsp This option can be enabled by default for specific repositories in
365 0c8b29c5 2021-01-05 stsp .Xr got.conf 5 .
366 4ba14133 2020-03-20 stsp If this option is not specified, a branch resolved via the remote
367 4ba14133 2020-03-20 stsp repository's HEAD reference will be fetched.
368 4ba14133 2020-03-20 stsp Cannot be used together with the
371 4ba14133 2020-03-20 stsp .It Fl b Ar branch
372 4ba14133 2020-03-20 stsp Fetch the specified
374 1d4b192f 2020-03-21 stsp from the remote repository's
375 1d4b192f 2020-03-21 stsp .Dq refs/heads/
376 1d4b192f 2020-03-21 stsp reference namespace.
377 4ba14133 2020-03-20 stsp This option may be specified multiple times to build a list of branches
379 4ba14133 2020-03-20 stsp If this option is not specified, a branch resolved via the remote
380 4ba14133 2020-03-20 stsp repository's HEAD reference will be fetched.
381 4ba14133 2020-03-20 stsp Cannot be used together with the
385 f21ec2f0 2020-03-21 stsp Delete branches and tags from the local repository which are no longer
386 f21ec2f0 2020-03-21 stsp present in the remote repository.
387 f21ec2f0 2020-03-21 stsp Only references are deleted.
388 239821eb 2020-03-21 stsp Any commit, tree, tag, and blob objects belonging to deleted branches or
389 f21ec2f0 2020-03-21 stsp tags remain in the repository and may be removed separately with
390 e6786710 2021-07-03 stsp Git's garbage collector or
391 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
393 41b0de12 2020-03-21 stsp List branches and tags available for fetching from the remote repository
394 41b0de12 2020-03-21 stsp and exit immediately.
395 41b0de12 2020-03-21 stsp Cannot be used together with any of the other options except
401 db6d8ad8 2020-03-21 stsp Allow existing references in the
402 db6d8ad8 2020-03-21 stsp .Dq refs/tags
403 db6d8ad8 2020-03-21 stsp namespace to be updated if they have changed on the server.
404 db6d8ad8 2020-03-21 stsp If not specified, only new tag references will be created.
405 7848a0e1 2020-03-19 stsp .It Fl r Ar repository-path
406 7848a0e1 2020-03-19 stsp Use the repository at the specified path.
407 7848a0e1 2020-03-19 stsp If not specified, assume the repository is located at or above the current
408 7848a0e1 2020-03-19 stsp working directory.
409 7848a0e1 2020-03-19 stsp If this directory is a
411 7848a0e1 2020-03-19 stsp work tree, use the repository path associated with this work tree.
413 7848a0e1 2020-03-19 stsp Suppress progress reporting output.
414 7848a0e1 2020-03-19 stsp The same option will be passed to
416 7848a0e1 2020-03-19 stsp if applicable.
418 2690194b 2020-03-21 stsp Verbose mode.
420 2690194b 2020-03-21 stsp .Cm got fetch
421 2690194b 2020-03-21 stsp to print debugging messages to standard error output.
422 7848a0e1 2020-03-19 stsp The same option will be passed to
424 7848a0e1 2020-03-19 stsp if applicable.
425 7848a0e1 2020-03-19 stsp Multiple -v options increase the verbosity.
426 7848a0e1 2020-03-19 stsp The maximum is 3.
427 0e4002ca 2020-03-21 stsp .It Fl R Ar reference
428 0e4002ca 2020-03-21 stsp In addition to the branches and tags that will be fetched, fetch an arbitrary
429 0e4002ca 2020-03-21 stsp .Ar reference
430 0e4002ca 2020-03-21 stsp from the remote repository's
433 0e4002ca 2020-03-21 stsp This option may be specified multiple times to build a list of additional
434 0e4002ca 2020-03-21 stsp references to fetch.
435 71f12362 2020-03-21 stsp The specified
436 71f12362 2020-03-21 stsp .Ar reference
437 a18cccf9 2020-03-21 stsp may either be a path to a specific reference, or a reference namespace
438 71f12362 2020-03-21 stsp which will cause all references in this namespace to be fetched.
440 0e4002ca 2020-03-21 stsp Each reference will be mapped into the local repository's
441 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
442 0e4002ca 2020-03-21 stsp namespace, unless the local repository was created as a mirror with
443 a18cccf9 2020-03-21 stsp .Cm got clone -m
444 a18cccf9 2020-03-21 stsp in which case references will be mapped directly into the local repository's
448 bd81cfb7 2020-04-19 stsp Once a reference has been fetched, a branch based on it can be created with
449 0e4002ca 2020-03-21 stsp .Cm got branch
452 0e4002ca 2020-03-21 stsp .Cm got fetch
453 0e4002ca 2020-03-21 stsp will refuse to fetch references from the remote repository's
454 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
456 0e4002ca 2020-03-21 stsp .Dq refs/got/
459 161728eb 2021-07-24 stsp Delete all references which correspond to a particular
460 161728eb 2021-07-24 stsp .Ar remote-repository
461 161728eb 2021-07-24 stsp instead of fetching new changes.
462 161728eb 2021-07-24 stsp This can be useful when a remote repository is being removed from
463 161728eb 2021-07-24 stsp .Xr got.conf 5 .
468 161728eb 2021-07-24 stsp .Ar remote-repository
469 161728eb 2021-07-24 stsp argument is mandatory and no other options except
474 161728eb 2021-07-24 stsp are allowed.
476 161728eb 2021-07-24 stsp Only references are deleted.
477 161728eb 2021-07-24 stsp Any commit, tree, tag, and blob objects fetched from a remote repository
478 161728eb 2021-07-24 stsp will generally be stored in pack files and may be removed separately with
479 161728eb 2021-07-24 stsp .Xr git-repack 1
480 161728eb 2021-07-24 stsp and Git's garbage collector.
483 4ad4a1ec 2021-09-13 tracey .It Cm checkout Oo Fl E Oc Oo Fl b Ar branch Oc Oo Fl c Ar commit Oc Oo Fl p Ar path-prefix Oc Oo Fl q Oc Ar repository-path Op Ar work-tree-path
484 4683a10b 2021-11-04 kn .Dl Pq alias: Cm co
485 0bb8a95e 2018-03-12 stsp Copy files from a repository into a new work tree.
486 bb51a5b4 2020-01-13 stsp Show the status of each affected file, using the following status codes:
487 bb51a5b4 2020-01-13 stsp .Bl -column YXZ description
488 bb51a5b4 2020-01-13 stsp .It A Ta new file was added
489 bb51a5b4 2020-01-13 stsp .It E Ta file already exists in work tree's meta-data
493 5d7c1dab 2018-04-01 stsp .Ar work tree path
494 c844a238 2019-02-06 stsp is not specified, either use the last component of
495 5d7c1dab 2018-04-01 stsp .Ar repository path ,
497 5d7c1dab 2018-04-01 stsp .Ar path prefix
498 c844a238 2019-02-06 stsp was specified use the last component of
499 5d7c1dab 2018-04-01 stsp .Ar path prefix .
501 38e11793 2018-06-13 stsp The options for
502 38e11793 2018-06-13 stsp .Cm got checkout
503 38e11793 2018-06-13 stsp are as follows:
504 38e11793 2018-06-13 stsp .Bl -tag -width Ds
506 bb51a5b4 2020-01-13 stsp Proceed with the checkout operation even if the directory at
507 bb51a5b4 2020-01-13 stsp .Ar work-tree-path
508 bb51a5b4 2020-01-13 stsp is not empty.
509 bb51a5b4 2020-01-13 stsp Existing files will be left intact.
510 08573d5b 2019-05-14 stsp .It Fl b Ar branch
511 3c575567 2019-07-28 stsp Check out files from a commit on the specified
512 08573d5b 2019-05-14 stsp .Ar branch .
513 08573d5b 2019-05-14 stsp If this option is not specified, a branch resolved via the repository's HEAD
514 08573d5b 2019-05-14 stsp reference will be used.
515 8069f636 2019-01-12 stsp .It Fl c Ar commit
516 8069f636 2019-01-12 stsp Check out files from the specified
518 3c575567 2019-07-28 stsp on the selected branch.
519 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
520 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
521 0e1b0230 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
522 0e1b0230 2019-07-07 stsp automatically, provided the abbreviation is unique.
523 08573d5b 2019-05-14 stsp If this option is not specified, the most recent commit on the selected
524 08573d5b 2019-05-14 stsp branch will be used.
526 4b6c9460 2020-03-05 stsp If the specified
528 4b6c9460 2020-03-05 stsp is not contained in the selected branch, a different branch which contains
529 4b6c9460 2020-03-05 stsp this commit must be specified with the
532 e38d4cde 2022-03-21 naddy If no such branch is known, a new branch must be created for this
533 4b6c9460 2020-03-05 stsp commit with
534 4b6c9460 2020-03-05 stsp .Cm got branch
536 4b6c9460 2020-03-05 stsp .Cm got checkout
537 4b6c9460 2020-03-05 stsp can be used.
538 4b6c9460 2020-03-05 stsp Checking out work trees with an unknown branch is intentionally not supported.
539 38e11793 2018-06-13 stsp .It Fl p Ar path-prefix
540 38e11793 2018-06-13 stsp Restrict the work tree to a subset of the repository's tree hierarchy.
541 38e11793 2018-06-13 stsp Only files beneath the specified
542 38e11793 2018-06-13 stsp .Ar path-prefix
543 38e11793 2018-06-13 stsp will be checked out.
545 4ad4a1ec 2021-09-13 tracey Silence progress output.
548 4ad4a1ec 2021-09-13 tracey .It Cm update Oo Fl b Ar branch Oc Oo Fl c Ar commit Oc Oo Fl q Oc Op Ar path ...
549 4683a10b 2021-11-04 kn .Dl Pq alias: Cm up
550 4f331d3a 2020-04-01 stsp Update an existing work tree to a different
551 4f331d3a 2020-04-01 stsp .Ar commit .
552 4f331d3a 2020-04-01 stsp Change existing files in the work tree as necessary to match file contents
553 4f331d3a 2020-04-01 stsp of this commit.
554 4f331d3a 2020-04-01 stsp Preserve any local changes in the work tree and merge them with the
555 4f331d3a 2020-04-01 stsp incoming changes.
557 5036ab18 2020-04-18 stsp Files which already contain merge conflicts will not be updated to avoid
558 5036ab18 2020-04-18 stsp further complications.
559 5036ab18 2020-04-18 stsp Such files will be updated when
560 5036ab18 2020-04-18 stsp .Cm got update
561 5036ab18 2020-04-18 stsp is run again after merge conflicts have been resolved.
562 e38d4cde 2022-03-21 naddy If the conflicting changes are no longer needed, affected files can be
563 5036ab18 2020-04-18 stsp reverted with
564 5036ab18 2020-04-18 stsp .Cm got revert
565 5036ab18 2020-04-18 stsp before running
566 5036ab18 2020-04-18 stsp .Cm got update
569 7f838b36 2019-02-08 stsp Show the status of each affected file, using the following status codes:
570 7f838b36 2019-02-08 stsp .Bl -column YXZ description
571 7f838b36 2019-02-08 stsp .It U Ta file was updated and contained no local changes
572 7f838b36 2019-02-08 stsp .It G Ta file was updated and local changes were merged cleanly
573 7f838b36 2019-02-08 stsp .It C Ta file was updated and conflicts occurred during merge
574 7f838b36 2019-02-08 stsp .It D Ta file was deleted
575 7f838b36 2019-02-08 stsp .It A Ta new file was added
576 1dd86744 2019-08-12 anthony .It \(a~ Ta versioned file is obstructed by a non-regular file
577 a378724f 2019-02-10 stsp .It ! Ta a missing versioned file was restored
578 5036ab18 2020-04-18 stsp .It # Ta file was not updated because it contains merge conflicts
579 3b9f0f87 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
584 f2ea84fa 2019-07-27 stsp is specified, update the entire work tree.
585 f2ea84fa 2019-07-27 stsp Otherwise, restrict the update operation to files at or within the
586 f2ea84fa 2019-07-27 stsp specified paths.
587 f2ea84fa 2019-07-27 stsp Each path is required to exist in the update operation's target commit.
588 f2ea84fa 2019-07-27 stsp Files in the work tree outside specified paths will remain unchanged and
589 f2ea84fa 2019-07-27 stsp will retain their previously recorded base commit.
592 f2cf8fbb 2019-04-04 stsp commands may refuse to run while the work tree contains files from
593 c4cdcb68 2019-04-03 stsp multiple base commits.
594 f2cf8fbb 2019-04-04 stsp The base commit of such a work tree can be made consistent by running
595 47ec7be7 2019-05-12 stsp .Cm got update
596 47ec7be7 2019-05-12 stsp across the entire work tree.
597 024e9686 2019-05-14 stsp Specifying a
599 024e9686 2019-05-14 stsp is incompatible with the
603 4ed9f614 2019-08-04 stsp .Cm got update
604 4ed9f614 2019-08-04 stsp cannot update paths with staged changes.
605 4ed9f614 2019-08-04 stsp If changes have been staged with
606 4ed9f614 2019-08-04 stsp .Cm got stage ,
607 bc3056e3 2019-08-18 stsp these changes must first be committed with
608 4ed9f614 2019-08-04 stsp .Cm got commit
609 4ed9f614 2019-08-04 stsp or unstaged with
610 4ed9f614 2019-08-04 stsp .Cm got unstage .
612 507dc3bb 2018-12-29 stsp The options for
613 507dc3bb 2018-12-29 stsp .Cm got update
614 507dc3bb 2018-12-29 stsp are as follows:
615 507dc3bb 2018-12-29 stsp .Bl -tag -width Ds
616 024e9686 2019-05-14 stsp .It Fl b Ar branch
617 024e9686 2019-05-14 stsp Switch the work tree's branch reference to the specified
619 024e9686 2019-05-14 stsp before updating the work tree.
620 024e9686 2019-05-14 stsp This option requires that all paths in the work tree are updated.
622 4f331d3a 2020-04-01 stsp As usual, any local changes in the work tree will be preserved.
623 4f331d3a 2020-04-01 stsp This can be useful when switching to a newly created branch in order
624 4f331d3a 2020-04-01 stsp to commit existing local changes to this branch.
626 4f331d3a 2020-04-01 stsp Any local changes must be dealt with separately in order to obtain a
627 4f331d3a 2020-04-01 stsp work tree with pristine file contents corresponding exactly to the specified
628 4f331d3a 2020-04-01 stsp .Ar branch .
629 4f331d3a 2020-04-01 stsp Such changes could first be committed to a different branch with
630 4f331d3a 2020-04-01 stsp .Cm got commit ,
631 4f331d3a 2020-04-01 stsp or could be discarded with
632 4f331d3a 2020-04-01 stsp .Cm got revert .
633 507dc3bb 2018-12-29 stsp .It Fl c Ar commit
634 507dc3bb 2018-12-29 stsp Update the work tree to the specified
635 507dc3bb 2018-12-29 stsp .Ar commit .
636 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
637 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
638 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
639 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
640 024e9686 2019-05-14 stsp If this option is not specified, the most recent commit on the work tree's
641 024e9686 2019-05-14 stsp branch will be used.
643 4ad4a1ec 2021-09-13 tracey Silence progress output.
646 ac372b60 2021-09-15 stsp .It Cm status Oo Fl I Oc Oo Fl s Ar status-codes Oc Oo Fl S Ar status-codes Oc Op Ar path ...
647 4683a10b 2021-11-04 kn .Dl Pq alias: Cm st
648 6cd959e6 2019-03-26 stsp Show the current modification status of files in a work tree,
649 6bad629b 2019-02-04 stsp using the following status codes:
650 6bad629b 2019-02-04 stsp .Bl -column YXZ description
651 6bad629b 2019-02-04 stsp .It M Ta modified file
652 079890a9 2019-03-26 stsp .It A Ta file scheduled for addition in next commit
653 079890a9 2019-03-26 stsp .It D Ta file scheduled for deletion in next commit
654 7154f6ce 2019-03-27 stsp .It C Ta modified or added file which contains merge conflicts
655 6bad629b 2019-02-04 stsp .It ! Ta versioned file was expected on disk but is missing
656 1dd86744 2019-08-12 anthony .It \(a~ Ta versioned file is obstructed by a non-regular file
657 6bad629b 2019-02-04 stsp .It ? Ta unversioned item not tracked by
659 1ebedb77 2019-10-19 stsp .It m Ta modified file modes (executable bit only)
660 2a06fe5f 2019-08-24 stsp .It N Ta non-existent
662 2a06fe5f 2019-08-24 stsp specified on the command line
667 72ea6654 2019-07-27 stsp is specified, show modifications in the entire work tree.
668 72ea6654 2019-07-27 stsp Otherwise, show modifications at or within the specified paths.
670 4ed9f614 2019-08-04 stsp If changes have been staged with
671 4ed9f614 2019-08-04 stsp .Cm got stage ,
672 4ed9f614 2019-08-04 stsp staged changes are shown in the second output column, using the following
673 4ed9f614 2019-08-04 stsp status codes:
674 4ed9f614 2019-08-04 stsp .Bl -column YXZ description
675 4ed9f614 2019-08-04 stsp .It M Ta file modification is staged
676 4ed9f614 2019-08-04 stsp .It A Ta file addition is staged
677 4ed9f614 2019-08-04 stsp .It D Ta file deletion is staged
680 95ac67f0 2019-08-08 stsp Changes created on top of staged changes are indicated in the first column:
681 4ed9f614 2019-08-04 stsp .Bl -column YXZ description
682 95ac67f0 2019-08-08 stsp .It MM Ta file was modified after earlier changes have been staged
683 95ac67f0 2019-08-08 stsp .It MA Ta file was modified after having been staged for addition
686 081470ac 2020-08-13 stsp The options for
687 081470ac 2020-08-13 stsp .Cm got status
688 081470ac 2020-08-13 stsp are as follows:
689 081470ac 2020-08-13 stsp .Bl -tag -width Ds
691 f6343036 2021-06-22 stsp Show unversioned files even if they match an ignore pattern.
692 081470ac 2020-08-13 stsp .It Fl s Ar status-codes
693 081470ac 2020-08-13 stsp Only show files with a modification status matching any of the
694 00357e4d 2021-09-14 tracey single-character status codes contained in the
695 00357e4d 2021-09-14 tracey .Ar status-codes
696 00357e4d 2021-09-14 tracey argument.
697 00357e4d 2021-09-14 tracey Any combination of codes from the above list of possible status codes
698 00357e4d 2021-09-14 tracey may be specified.
699 00357e4d 2021-09-14 tracey For staged files, status codes displayed in either column will be matched.
700 b043307b 2021-09-14 stsp Cannot be used together with the
703 00357e4d 2021-09-14 tracey .It Fl S Ar status-codes
704 00357e4d 2021-09-14 tracey Suppress the output of files with a modification status matching any of the
705 081470ac 2020-08-13 stsp single-character status codes contained in the
706 081470ac 2020-08-13 stsp .Ar status-codes
708 081470ac 2020-08-13 stsp Any combination of codes from the above list of possible status codes
709 081470ac 2020-08-13 stsp may be specified.
710 081470ac 2020-08-13 stsp For staged files, status codes displayed in either column will be matched.
711 b043307b 2021-09-14 stsp Cannot be used together with the
716 6841da00 2019-08-08 stsp For compatibility with
719 bd8de430 2019-10-04 stsp .Xr git 1 ,
720 6841da00 2019-08-08 stsp .Cm got status
723 bd8de430 2019-10-04 stsp patterns from
724 6841da00 2019-08-08 stsp .Pa .cvsignore
726 bd8de430 2019-10-04 stsp .Pa .gitignore
727 6841da00 2019-08-08 stsp files in each traversed directory and will not display unversioned files
728 bd8de430 2019-10-04 stsp which match these patterns.
729 bd8de430 2019-10-04 stsp As an extension to
731 bd8de430 2019-10-04 stsp matching rules,
732 bd8de430 2019-10-04 stsp .Cm got status
733 bd8de430 2019-10-04 stsp supports consecutive asterisks,
735 bd8de430 2019-10-04 stsp which will match an arbitrary amount of directories.
737 6841da00 2019-08-08 stsp .Xr cvs 1 ,
738 6841da00 2019-08-08 stsp .Cm got status
739 6841da00 2019-08-08 stsp only supports a single ignore pattern per line.
741 bd8de430 2019-10-04 stsp .Xr git 1 ,
742 bd8de430 2019-10-04 stsp .Cm got status
743 bd8de430 2019-10-04 stsp does not support negated ignore patterns prefixed with
745 bd8de430 2019-10-04 stsp and gives no special significance to the location of path component separators,
747 bd8de430 2019-10-04 stsp in a pattern.
748 c1c775eb 2022-06-08 stsp .It Cm log Oo Fl b Oc Oo Fl c Ar commit Oc Oo Fl C Ar number Oc Oo Fl l Ar N Oc Oo Fl p Oc Oo Fl P Oc Oo Fl s Oc Oo Fl S Ar search-pattern Oc Oo Fl r Ar repository-path Oc Oo Fl R Oc Oo Fl x Ar commit Oc Op Ar path
749 38e11793 2018-06-13 stsp Display history of a repository.
752 04ca23f4 2018-07-16 stsp is specified, show only commits which modified this path.
753 dc990cbf 2020-02-22 stsp If invoked in a work tree, the
755 dc990cbf 2020-02-22 stsp is interpreted relative to the current working directory,
756 dc990cbf 2020-02-22 stsp and the work tree's path prefix is implicitly prepended.
757 dc990cbf 2020-02-22 stsp Otherwise, the path is interpreted relative to the repository root.
759 38e11793 2018-06-13 stsp The options for
760 38e11793 2018-06-13 stsp .Cm got log
761 38e11793 2018-06-13 stsp are as follows:
762 38e11793 2018-06-13 stsp .Bl -tag -width Ds
764 1137e0ae 2020-01-27 stsp Display individual commits which were merged into the current branch
765 1137e0ae 2020-01-27 stsp from other branches.
766 48c8c60d 2020-01-27 stsp By default,
767 48c8c60d 2020-01-27 stsp .Cm got log
768 48c8c60d 2020-01-27 stsp shows the linear history of the current branch only.
769 38e11793 2018-06-13 stsp .It Fl c Ar commit
770 38e11793 2018-06-13 stsp Start traversing history at the specified
771 38e11793 2018-06-13 stsp .Ar commit .
772 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
773 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
774 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
775 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
776 1cc14b9f 2019-05-14 stsp If this option is not specified, default to the work tree's current branch
777 1cc14b9f 2019-05-14 stsp if invoked in a work tree, or to the repository's HEAD reference.
778 c0cc5c62 2018-10-18 stsp .It Fl C Ar number
779 c0cc5c62 2018-10-18 stsp Set the number of context lines shown in diffs with
781 c0cc5c62 2018-10-18 stsp By default, 3 lines of context are shown.
782 6238ee32 2018-06-13 stsp .It Fl l Ar N
783 6238ee32 2018-06-13 stsp Limit history traversal to a given number of commits.
784 b1ebc001 2019-08-13 stsp If this option is not specified, a default limit value of zero is used,
785 b1ebc001 2019-08-13 stsp which is treated as an unbounded limit.
787 b1ebc001 2019-08-13 stsp .Ev GOT_LOG_DEFAULT_LIMIT
788 b1ebc001 2019-08-13 stsp environment variable may be set to change this default value.
790 6238ee32 2018-06-13 stsp Display the patch of modifications made in each commit.
793 44392932 2019-08-25 stsp is specified, only show the patch of modifications at or within this path.
794 c1c775eb 2022-06-08 stsp Cannot be used with the
798 0208f208 2020-05-05 stsp Display the list of file paths changed in each commit, using the following
799 0208f208 2020-05-05 stsp status codes:
800 0208f208 2020-05-05 stsp .Bl -column YXZ description
801 0208f208 2020-05-05 stsp .It M Ta modified file
802 0208f208 2020-05-05 stsp .It D Ta file was deleted
803 0208f208 2020-05-05 stsp .It A Ta new file was added
804 0208f208 2020-05-05 stsp .It m Ta modified file modes (executable bit only)
807 c1c775eb 2022-06-08 stsp Cannot be used with the
811 c1c775eb 2022-06-08 stsp Display a short one-line summary of each commit, instead of the default
812 c1c775eb 2022-06-08 stsp history format.
813 c1c775eb 2022-06-08 stsp Cannot be used together with the
818 c1c775eb 2022-06-08 stsp .It Fl S Ar search-pattern
819 793b9394 2022-06-12 op If specified, show only commits with a log message, author name,
820 793b9394 2022-06-12 op committer name, or ID SHA1 hash matched by the extended regular
822 6841bf13 2019-11-29 kn .Ar search-pattern .
823 3ef807ee 2022-06-08 stsp Lines in committed patches will be matched if
825 3ef807ee 2022-06-08 stsp is specified.
826 3ef807ee 2022-06-08 stsp File paths changed by a commit will be matched if
828 3ef807ee 2022-06-08 stsp is specified.
829 6841bf13 2019-11-29 kn Regular expression syntax is documented in
830 6841bf13 2019-11-29 kn .Xr re_format 7 .
831 04ca23f4 2018-07-16 stsp .It Fl r Ar repository-path
832 04ca23f4 2018-07-16 stsp Use the repository at the specified path.
833 04ca23f4 2018-07-16 stsp If not specified, assume the repository is located at or above the current
834 04ca23f4 2018-07-16 stsp working directory.
835 e9cf2e30 2019-02-05 stsp If this directory is a
837 e9cf2e30 2019-02-05 stsp work tree, use the repository path associated with this work tree.
839 dbec59df 2020-04-18 stsp Determine a set of commits to display as usual, but display these commits
840 dbec59df 2020-04-18 stsp in reverse order.
841 d1fe46f9 2020-04-18 stsp .It Fl x Ar commit
842 4e20a648 2021-03-21 jrick Stop traversing commit history immediately after the specified
844 52ab7958 2020-04-18 stsp has been traversed.
845 d1fe46f9 2020-04-18 stsp This option has no effect if the specified
847 d1fe46f9 2020-04-18 stsp is never traversed.
850 67b631c9 2021-10-10 stsp .It Cm diff Oo Fl a Oc Oo Fl c Ar commit Oc Oo Fl C Ar number Oc Oo Fl r Ar repository-path Oc Oo Fl s Oc Oo Fl P Oc Oo Fl w Oc Op Ar object1 Ar object2 | Ar path ...
851 4683a10b 2021-11-04 kn .Dl Pq alias: Cm di
852 e7ffb0b0 2021-10-07 stsp When invoked within a work tree without any arguments, display all
853 bd81cfb7 2020-04-19 stsp local changes in the work tree.
854 e7ffb0b0 2021-10-07 stsp If one or more
856 e7ffb0b0 2021-10-07 stsp arguments are specified, only show changes within the specified paths.
858 d24820bf 2019-08-11 stsp If two arguments are provided, treat each argument as a reference, a tag
859 d24820bf 2019-08-11 stsp name, or an object ID SHA1 hash, and display differences between the
860 d24820bf 2019-08-11 stsp corresponding objects.
861 3f8b7d6a 2018-04-01 stsp Both objects must be of the same type (blobs, trees, or commits).
862 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
863 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
864 e7ffb0b0 2021-10-07 stsp If none of these interpretations produce a valid result or if the
866 e7ffb0b0 2021-10-07 stsp option is used,
868 e7ffb0b0 2021-10-07 stsp .Cm got diff
869 e7ffb0b0 2021-10-07 stsp is running in a work tree, attempt to interpret the two arguments as paths.
871 c0cc5c62 2018-10-18 stsp The options for
872 c0cc5c62 2018-10-18 stsp .Cm got diff
873 c0cc5c62 2018-10-18 stsp are as follows:
874 c0cc5c62 2018-10-18 stsp .Bl -tag -width Ds
876 64453f7e 2020-11-21 stsp Treat file contents as ASCII text even if binary data is detected.
877 67b631c9 2021-10-10 stsp .It Fl c Ar commit
878 67b631c9 2021-10-10 stsp Show differences between commits in the repository.
879 67b631c9 2021-10-10 stsp This options may be used up to two times.
880 67b631c9 2021-10-10 stsp When used only once, show differences between the specified
882 67b631c9 2021-10-10 stsp and its first parent commit.
883 67b631c9 2021-10-10 stsp When used twice, show differences between the two specified commits.
885 67b631c9 2021-10-10 stsp The expected argument is a commit ID SHA1 hash or an existing reference
886 67b631c9 2021-10-10 stsp or tag name which will be resolved to a commit ID.
887 67b631c9 2021-10-10 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
888 67b631c9 2021-10-10 stsp automatically, provided the abbreviation is unique.
892 67b631c9 2021-10-10 stsp option is used, all non-option arguments will be interpreted as paths.
893 67b631c9 2021-10-10 stsp If one or more such
895 67b631c9 2021-10-10 stsp arguments are provided, only show differences for the specified paths.
897 67b631c9 2021-10-10 stsp Cannot be used together with the
900 c0cc5c62 2018-10-18 stsp .It Fl C Ar number
901 c0cc5c62 2018-10-18 stsp Set the number of context lines shown in the diff.
902 c0cc5c62 2018-10-18 stsp By default, 3 lines of context are shown.
903 b72f483a 2019-02-05 stsp .It Fl r Ar repository-path
904 b72f483a 2019-02-05 stsp Use the repository at the specified path.
905 b72f483a 2019-02-05 stsp If not specified, assume the repository is located at or above the current
906 b72f483a 2019-02-05 stsp working directory.
907 b72f483a 2019-02-05 stsp If this directory is a
909 b72f483a 2019-02-05 stsp work tree, use the repository path associated with this work tree.
911 4ed9f614 2019-08-04 stsp Show changes staged with
912 4ed9f614 2019-08-04 stsp .Cm got stage
913 bd81cfb7 2020-04-19 stsp instead of showing local changes in the work tree.
914 e7ffb0b0 2021-10-07 stsp This option is only valid when
915 e7ffb0b0 2021-10-07 stsp .Cm got diff
916 e7ffb0b0 2021-10-07 stsp is invoked in a work tree.
918 e7ffb0b0 2021-10-07 stsp Interpret all arguments as paths only.
919 e7ffb0b0 2021-10-07 stsp This option can be used to resolve ambiguity in cases where paths
920 e7ffb0b0 2021-10-07 stsp look like tag names, reference names, or object IDs.
921 4ed9f614 2019-08-04 stsp This option is only valid when
922 4ed9f614 2019-08-04 stsp .Cm got diff
923 4ed9f614 2019-08-04 stsp is invoked in a work tree.
925 63035f9f 2019-10-06 stsp Ignore whitespace-only changes.
928 dfc23429 2019-08-11 stsp .It Cm blame Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Ar path
929 4683a10b 2021-11-04 kn .Dl Pq alias: Cm bl
930 1ff8e573 2018-08-02 stsp Display line-by-line history of a file at the specified path.
932 1ff8e573 2018-08-02 stsp The options for
933 1ff8e573 2018-08-02 stsp .Cm got blame
934 1ff8e573 2018-08-02 stsp are as follows:
935 1ff8e573 2018-08-02 stsp .Bl -tag -width Ds
936 1ff8e573 2018-08-02 stsp .It Fl c Ar commit
937 1ff8e573 2018-08-02 stsp Start traversing history at the specified
938 1ff8e573 2018-08-02 stsp .Ar commit .
939 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
940 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
941 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
942 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
943 1ff8e573 2018-08-02 stsp .It Fl r Ar repository-path
944 1ff8e573 2018-08-02 stsp Use the repository at the specified path.
945 1ff8e573 2018-08-02 stsp If not specified, assume the repository is located at or above the current
946 1ff8e573 2018-08-02 stsp working directory.
947 0c06baac 2019-02-05 stsp If this directory is a
949 0c06baac 2019-02-05 stsp work tree, use the repository path associated with this work tree.
952 dfc23429 2019-08-11 stsp .It Cm tree Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Oo Fl i Oc Oo Fl R Oc Op Ar path
953 4683a10b 2021-11-04 kn .Dl Pq alias: Cm tr
954 5de5890b 2018-10-18 stsp Display a listing of files and directories at the specified
955 5de5890b 2018-10-18 stsp directory path in the repository.
956 db0c2996 2019-02-10 stsp Entries shown in this listing may carry one of the following trailing
957 db0c2996 2019-02-10 stsp annotations:
958 db0c2996 2019-02-10 stsp .Bl -column YXZ description
959 848d6979 2019-08-12 stsp .It @ Ta entry is a symbolic link
960 db0c2996 2019-02-10 stsp .It / Ta entry is a directory
961 db0c2996 2019-02-10 stsp .It * Ta entry is an executable file
962 63c5ca5d 2019-08-24 stsp .It $ Ta entry is a Git submodule
965 0d6c6ee3 2020-05-20 stsp Symbolic link entries are also annotated with the target path of the link.
969 0c849583 2019-02-05 stsp is specified, list the repository path corresponding to the current
970 0c849583 2019-02-05 stsp directory of the work tree, or the root directory of the repository
971 0c849583 2019-02-05 stsp if there is no work tree.
973 5de5890b 2018-10-18 stsp The options for
974 5de5890b 2018-10-18 stsp .Cm got tree
975 5de5890b 2018-10-18 stsp are as follows:
976 5de5890b 2018-10-18 stsp .Bl -tag -width Ds
977 5de5890b 2018-10-18 stsp .It Fl c Ar commit
978 5de5890b 2018-10-18 stsp List files and directories as they appear in the specified
979 5de5890b 2018-10-18 stsp .Ar commit .
980 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
981 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
982 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
983 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
984 5de5890b 2018-10-18 stsp .It Fl r Ar repository-path
985 5de5890b 2018-10-18 stsp Use the repository at the specified path.
986 5de5890b 2018-10-18 stsp If not specified, assume the repository is located at or above the current
987 5de5890b 2018-10-18 stsp working directory.
988 0c849583 2019-02-05 stsp If this directory is a
990 0c849583 2019-02-05 stsp work tree, use the repository path associated with this work tree.
992 5de5890b 2018-10-18 stsp Show object IDs of files (blob objects) and directories (tree objects).
994 0c849583 2019-02-05 stsp Recurse into sub-directories in the repository.
996 0f104432 2021-11-20 stsp .It Cm ref Oo Fl r Ar repository-path Oc Oo Fl l Oc Oo Fl t Oc Oo Fl c Ar object Oc Oo Fl s Ar reference Oc Oo Fl d Oc Op Ar name
997 d0eebce4 2019-03-11 stsp Manage references in a repository.
999 e31abbf2 2020-03-22 stsp References may be listed, created, deleted, and changed.
1000 e31abbf2 2020-03-22 stsp When creating, deleting, or changing a reference the specified
1002 e31abbf2 2020-03-22 stsp must be an absolute reference name, i.e. it must begin with
1003 f16e4044 2019-10-09 stsp .Dq refs/ .
1005 d0eebce4 2019-03-11 stsp The options for
1006 d0eebce4 2019-03-11 stsp .Cm got ref
1007 d0eebce4 2019-03-11 stsp are as follows:
1008 d0eebce4 2019-03-11 stsp .Bl -tag -width Ds
1009 d0eebce4 2019-03-11 stsp .It Fl r Ar repository-path
1010 d0eebce4 2019-03-11 stsp Use the repository at the specified path.
1011 d0eebce4 2019-03-11 stsp If not specified, assume the repository is located at or above the current
1012 d0eebce4 2019-03-11 stsp working directory.
1013 d0eebce4 2019-03-11 stsp If this directory is a
1015 d0eebce4 2019-03-11 stsp work tree, use the repository path associated with this work tree.
1017 b2070a3f 2020-03-22 stsp List references in the repository.
1020 b2070a3f 2020-03-22 stsp is specified, list all existing references in the repository.
1023 b2070a3f 2020-03-22 stsp is a reference namespace, list all references in this namespace.
1024 b2070a3f 2020-03-22 stsp Otherwise, show only the reference with the given
1025 b2070a3f 2020-03-22 stsp .Ar name .
1026 e31abbf2 2020-03-22 stsp Cannot be used together with any other options except
1031 0f104432 2021-11-20 stsp Sort listed references by modification time (most recently modified first)
1032 0f104432 2021-11-20 stsp instead of sorting by lexicographical order.
1033 0f104432 2021-11-20 stsp Use of this option requires the
1035 0f104432 2021-11-20 stsp option to be used as well.
1036 e31abbf2 2020-03-22 stsp .It Fl c Ar object
1037 e31abbf2 2020-03-22 stsp Create a reference or change an existing reference.
1038 e31abbf2 2020-03-22 stsp The reference with the specified
1040 e31abbf2 2020-03-22 stsp will point at the specified
1041 1795b260 2021-04-02 kn .Ar object .
1042 e31abbf2 2020-03-22 stsp The expected
1043 e31abbf2 2020-03-22 stsp .Ar object
1044 e31abbf2 2020-03-22 stsp argument is a ID SHA1 hash or an existing reference or tag name which will
1045 e31abbf2 2020-03-22 stsp be resolved to the ID of a corresponding commit, tree, tag, or blob object.
1046 e31abbf2 2020-03-22 stsp Cannot be used together with any other options except
1048 e31abbf2 2020-03-22 stsp .It Fl s Ar reference
1049 e31abbf2 2020-03-22 stsp Create a symbolic reference, or change an existing symbolic reference.
1050 e31abbf2 2020-03-22 stsp The symbolic reference with the specified
1052 e31abbf2 2020-03-22 stsp will point at the specified
1053 e31abbf2 2020-03-22 stsp .Ar reference
1054 e31abbf2 2020-03-22 stsp which must already exist in the repository.
1055 d1c1ae5f 2019-08-12 stsp Care should be taken not to create loops between references when
1056 d1c1ae5f 2019-08-12 stsp this option is used.
1057 e31abbf2 2020-03-22 stsp Cannot be used together with any other options except
1060 e31abbf2 2020-03-22 stsp Delete the reference with the specified
1062 e31abbf2 2020-03-22 stsp from the repository.
1063 601aba22 2021-03-21 stsp Any commit, tree, tag, and blob objects belonging to deleted references
1064 601aba22 2021-03-21 stsp remain in the repository and may be removed separately with
1065 e6786710 2021-07-03 stsp Git's garbage collector or
1066 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
1067 e31abbf2 2020-03-22 stsp Cannot be used together with any other options except
1071 ef2f551e 2022-01-12 stsp .It Cm branch Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Oo Fl l Oc Oo Fl t Oc Oo Fl d Ar name Oc Oo Fl n Oc Op Ar name
1072 4683a10b 2021-11-04 kn .Dl Pq alias: Cm br
1073 da76fce2 2020-02-24 stsp Create, list, or delete branches.
1075 34d4e04c 2021-02-08 stsp Local branches are managed via references which live in the
1076 4e759de4 2019-06-26 stsp .Dq refs/heads/
1077 4e759de4 2019-06-26 stsp reference namespace.
1079 4e759de4 2019-06-26 stsp .Cm got branch
1080 2f1457c6 2021-08-27 stsp command creates references in this namespace only.
1082 e38d4cde 2022-03-21 naddy When deleting branches, the specified
1084 2f1457c6 2021-08-27 stsp is searched in the
1085 2f1457c6 2021-08-27 stsp .Dq refs/heads
1086 2f1457c6 2021-08-27 stsp reference namespace first.
1087 e38d4cde 2022-03-21 naddy If no corresponding branch is found, the
1088 2f1457c6 2021-08-27 stsp .Dq refs/remotes
1089 2f1457c6 2021-08-27 stsp namespace will be searched next.
1091 ad89fa31 2019-10-04 stsp If invoked in a work tree without any arguments, print the name of the
1092 ad89fa31 2019-10-04 stsp work tree's current branch.
1096 a74f7e83 2019-11-10 stsp argument is passed, attempt to create a branch reference with the given name.
1097 a74f7e83 2019-11-10 stsp By default the new branch reference will point at the latest commit on the
1098 a74f7e83 2019-11-10 stsp work tree's current branch if invoked in a work tree, and otherwise to a commit
1099 a74f7e83 2019-11-10 stsp resolved via the repository's HEAD reference.
1101 da76fce2 2020-02-24 stsp If invoked in a work tree, once the branch was created successfully
1102 da76fce2 2020-02-24 stsp switch the work tree's head reference to the newly created branch and
1103 da76fce2 2020-02-24 stsp update files across the entire work tree, just like
1104 da76fce2 2020-02-24 stsp .Cm got update -b Ar name
1106 da76fce2 2020-02-24 stsp Show the status of each affected file, using the following status codes:
1107 da76fce2 2020-02-24 stsp .Bl -column YXZ description
1108 da76fce2 2020-02-24 stsp .It U Ta file was updated and contained no local changes
1109 da76fce2 2020-02-24 stsp .It G Ta file was updated and local changes were merged cleanly
1110 da76fce2 2020-02-24 stsp .It C Ta file was updated and conflicts occurred during merge
1111 da76fce2 2020-02-24 stsp .It D Ta file was deleted
1112 da76fce2 2020-02-24 stsp .It A Ta new file was added
1113 da76fce2 2020-02-24 stsp .It \(a~ Ta versioned file is obstructed by a non-regular file
1114 da76fce2 2020-02-24 stsp .It ! Ta a missing versioned file was restored
1117 4e759de4 2019-06-26 stsp The options for
1118 4e759de4 2019-06-26 stsp .Cm got branch
1119 4e759de4 2019-06-26 stsp are as follows:
1120 4e759de4 2019-06-26 stsp .Bl -tag -width Ds
1121 a74f7e83 2019-11-10 stsp .It Fl c Ar commit
1122 a74f7e83 2019-11-10 stsp Make a newly created branch reference point at the specified
1123 a74f7e83 2019-11-10 stsp .Ar commit .
1124 a74f7e83 2019-11-10 stsp The expected
1125 a74f7e83 2019-11-10 stsp .Ar commit
1126 a74f7e83 2019-11-10 stsp argument is a commit ID SHA1 hash or an existing reference
1127 a74f7e83 2019-11-10 stsp or tag name which will be resolved to a commit ID.
1128 4e759de4 2019-06-26 stsp .It Fl r Ar repository-path
1129 4e759de4 2019-06-26 stsp Use the repository at the specified path.
1130 4e759de4 2019-06-26 stsp If not specified, assume the repository is located at or above the current
1131 4e759de4 2019-06-26 stsp working directory.
1132 4e759de4 2019-06-26 stsp If this directory is a
1134 4e759de4 2019-06-26 stsp work tree, use the repository path associated with this work tree.
1136 34d4e04c 2021-02-08 stsp List all existing branches in the repository, including copies of remote
1137 34d4e04c 2021-02-08 stsp repositories' branches in the
1138 34d4e04c 2021-02-08 stsp .Dq refs/remotes/
1139 34d4e04c 2021-02-08 stsp reference namespace.
1141 ba882ee3 2019-07-11 stsp If invoked in a work tree, the work tree's current branch is shown
1142 ba882ee3 2019-07-11 stsp with one the following annotations:
1143 ba882ee3 2019-07-11 stsp .Bl -column YXZ description
1144 ba882ee3 2019-07-11 stsp .It * Ta work tree's base commit matches the branch tip
1145 1dd86744 2019-08-12 anthony .It \(a~ Ta work tree's base commit is out-of-date
1148 f76670f0 2021-11-20 stsp Sort listed branches by modification time (most recently modified first)
1149 f76670f0 2021-11-20 stsp instead of sorting by lexicographical order.
1150 f76670f0 2021-11-20 stsp Branches in the
1151 f76670f0 2021-11-20 stsp .Dq refs/heads/
1152 f76670f0 2021-11-20 stsp reference namespace are listed before branches in
1153 f76670f0 2021-11-20 stsp .Dq refs/remotes/
1154 f76670f0 2021-11-20 stsp regardless.
1155 f76670f0 2021-11-20 stsp Use of this option requires the
1157 f76670f0 2021-11-20 stsp option to be used as well.
1158 4e759de4 2019-06-26 stsp .It Fl d Ar name
1159 2f1457c6 2021-08-27 stsp Delete the branch with the specified
1162 2f1457c6 2021-08-27 stsp .Dq refs/heads
1164 2f1457c6 2021-08-27 stsp .Dq refs/remotes
1165 2f1457c6 2021-08-27 stsp reference namespace.
1167 7acfb25b 2019-07-11 stsp Only the branch reference is deleted.
1168 7acfb25b 2019-07-11 stsp Any commit, tree, and blob objects belonging to the branch
1169 74d012d1 2019-07-11 stsp remain in the repository and may be removed separately with
1170 e6786710 2021-07-03 stsp Git's garbage collector or
1171 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
1173 da76fce2 2020-02-24 stsp Do not switch and update the work tree after creating a new branch.
1175 10c4445c 2022-07-04 stsp .It Cm tag Oo Fl c Ar commit Oc Oo Fl m Ar message Oc Oo Fl r Ar repository-path Oc Oo Fl l Oc Oo Fl s Ar signer-id Oc Oo Fl v Oc Oo Fl V Oc Ar name
1176 8e7bd50a 2019-08-22 stsp Manage tags in a repository.
1178 8e7bd50a 2019-08-22 stsp Tags are managed via references which live in the
1179 8e7bd50a 2019-08-22 stsp .Dq refs/tags/
1180 8e7bd50a 2019-08-22 stsp reference namespace.
1182 8e7bd50a 2019-08-22 stsp .Cm got tag
1183 8e7bd50a 2019-08-22 stsp command operates on references in this namespace only.
1184 b3cd068e 2019-08-22 stsp References in this namespace point at tag objects which contain a pointer
1185 b3cd068e 2019-08-22 stsp to another object, a tag message, as well as author and timestamp information.
1187 80106605 2020-02-24 stsp Attempt to create a tag with the given
1188 8e7bd50a 2019-08-22 stsp .Ar name ,
1189 8e7bd50a 2019-08-22 stsp and make this tag point at the given
1190 8e7bd50a 2019-08-22 stsp .Ar commit .
1191 8e7bd50a 2019-08-22 stsp If no commit is specified, default to the latest commit on the work tree's
1192 8e7bd50a 2019-08-22 stsp current branch if invoked in a work tree, and to a commit resolved via
1193 8e7bd50a 2019-08-22 stsp the repository's HEAD reference otherwise.
1195 8e7bd50a 2019-08-22 stsp The options for
1196 8e7bd50a 2019-08-22 stsp .Cm got tag
1197 8e7bd50a 2019-08-22 stsp are as follows:
1198 8e7bd50a 2019-08-22 stsp .Bl -tag -width Ds
1199 80106605 2020-02-24 stsp .It Fl c Ar commit
1200 80106605 2020-02-24 stsp Make the newly created tag reference point at the specified
1201 80106605 2020-02-24 stsp .Ar commit .
1202 80106605 2020-02-24 stsp The expected
1203 80106605 2020-02-24 stsp .Ar commit
1204 80106605 2020-02-24 stsp argument is a commit ID SHA1 hash or an existing reference or tag name which
1205 80106605 2020-02-24 stsp will be resolved to a commit ID.
1206 80106605 2020-02-24 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1207 80106605 2020-02-24 stsp automatically, provided the abbreviation is unique.
1208 8e7bd50a 2019-08-22 stsp .It Fl m Ar message
1209 80106605 2020-02-24 stsp Use the specified tag message when creating the new tag.
1210 8e7bd50a 2019-08-22 stsp Without the
1213 3a62228f 2019-11-08 stsp .Cm got tag
1214 8e7bd50a 2019-08-22 stsp opens a temporary file in an editor where a tag message can be written.
1215 8e7bd50a 2019-08-22 stsp .It Fl r Ar repository-path
1216 8e7bd50a 2019-08-22 stsp Use the repository at the specified path.
1217 8e7bd50a 2019-08-22 stsp If not specified, assume the repository is located at or above the current
1218 8e7bd50a 2019-08-22 stsp working directory.
1219 8e7bd50a 2019-08-22 stsp If this directory is a
1221 8e7bd50a 2019-08-22 stsp work tree, use the repository path associated with this work tree.
1223 8e7bd50a 2019-08-22 stsp List all existing tags in the repository instead of creating a new tag.
1226 8c4a6db8 2022-06-29 stsp argument is passed, show only the tag with the given
1227 8c4a6db8 2022-06-29 stsp .Ar name .
1228 10c4445c 2022-07-04 stsp .It Fl s Ar signer-id
1229 10c4445c 2022-07-04 stsp While creating a new tag, sign this tag with the identity given in
1230 10c4445c 2022-07-04 stsp .Ar signer-id .
1232 10c4445c 2022-07-04 stsp For SSH-based signatures,
1233 10c4445c 2022-07-04 stsp .Ar signer-id
1234 10c4445c 2022-07-04 stsp is the path to a file which may refer to either a private SSH key,
1235 10c4445c 2022-07-04 stsp or a public SSH key with the private half available via
1236 10c4445c 2022-07-04 stsp .Xr ssh-agent 1 .
1237 10c4445c 2022-07-04 stsp .Cm got tag
1238 10c4445c 2022-07-04 stsp will sign the tag object by invoking
1239 10c4445c 2022-07-04 stsp .Xr ssh-keygen 1
1241 10c4445c 2022-07-04 stsp .Fl Y Ar sign
1242 10c4445c 2022-07-04 stsp command, using the signature namespace
1244 10c4445c 2022-07-04 stsp for compatibility with
1245 10c4445c 2022-07-04 stsp .Xr git 1 .
1247 10c4445c 2022-07-04 stsp Verbose mode.
1248 10c4445c 2022-07-04 stsp During SSH signature creation and verification this option will be passed to
1249 10c4445c 2022-07-04 stsp .Xr ssh-keygen 1 .
1250 10c4445c 2022-07-04 stsp Multiple -v options increase the verbosity.
1251 10c4445c 2022-07-04 stsp The maximum is 3.
1253 10c4445c 2022-07-04 stsp Verify tag object signatures.
1256 10c4445c 2022-07-04 stsp is specified, show and verify the tag object with the provided name.
1257 10c4445c 2022-07-04 stsp Otherwise, list all tag objects and verify signatures where present.
1259 10c4445c 2022-07-04 stsp .Cm got tag
1260 10c4445c 2022-07-04 stsp verifies SSH-based signatures by invoking
1261 10c4445c 2022-07-04 stsp .Xr ssh-keygen 1
1262 10c4445c 2022-07-04 stsp with the options
1263 10c4445c 2022-07-04 stsp .Fl Y Ar verify Fl f Ar allowed_signers .
1264 10c4445c 2022-07-04 stsp A path to the
1265 10c4445c 2022-07-04 stsp .Ar allowed_signers
1266 10c4445c 2022-07-04 stsp file must be set in
1267 10c4445c 2022-07-04 stsp .Xr got.conf 5 ,
1268 10c4445c 2022-07-04 stsp otherwise verification is impossible.
1271 8e7bd50a 2019-08-22 stsp By design, the
1272 8e7bd50a 2019-08-22 stsp .Cm got tag
1273 8e7bd50a 2019-08-22 stsp command will not delete tags or change existing tags.
1274 8e7bd50a 2019-08-22 stsp If a tag must be deleted, the
1275 8e7bd50a 2019-08-22 stsp .Cm got ref
1276 8e7bd50a 2019-08-22 stsp command may be used to delete a tag's reference.
1277 8e7bd50a 2019-08-22 stsp This should only be done if the tag has not already been copied to
1278 8e7bd50a 2019-08-22 stsp another repository.
1279 022fae89 2019-12-06 tracey .It Cm add Oo Fl R Oc Oo Fl I Oc Ar path ...
1280 8125ddca 2019-05-11 stsp Schedule unversioned files in a work tree for addition to the
1281 d00136be 2019-03-26 stsp repository in the next commit.
1282 ff56836b 2021-07-08 stsp By default, files which match a
1283 ff56836b 2021-07-08 stsp .Cm got status
1284 ff56836b 2021-07-08 stsp ignore pattern will not be added.
1286 4e68cba3 2019-11-23 stsp The options for
1287 4e68cba3 2019-11-23 stsp .Cm got add
1288 4e68cba3 2019-11-23 stsp are as follows:
1289 4e68cba3 2019-11-23 stsp .Bl -tag -width Ds
1291 4e68cba3 2019-11-23 stsp Permit recursion into directories.
1292 4e68cba3 2019-11-23 stsp If this option is not specified,
1293 4e68cba3 2019-11-23 stsp .Cm got add
1294 4e68cba3 2019-11-23 stsp will refuse to run if a specified
1296 4e68cba3 2019-11-23 stsp is a directory.
1297 022fae89 2019-12-06 tracey .It Fl I
1298 ff56836b 2021-07-08 stsp Add files even if they match a
1299 022fae89 2019-12-06 tracey .Cm got status
1300 022fae89 2019-12-06 tracey ignore pattern.
1303 766841c2 2020-08-13 stsp .It Cm remove Oo Fl f Oc Oo Fl k Oc Oo Fl R Oc Oo Fl s Ar status-codes Oc Ar path ...
1304 4683a10b 2021-11-04 kn .Dl Pq alias: Cm rm
1305 17ed4618 2019-06-02 stsp Remove versioned files from a work tree and schedule them for deletion
1306 2ec1f75b 2019-03-26 stsp from the repository in the next commit.
1308 2ec1f75b 2019-03-26 stsp The options for
1309 86d25a1b 2019-07-11 stsp .Cm got remove
1310 2ec1f75b 2019-03-26 stsp are as follows:
1311 2ec1f75b 2019-03-26 stsp .Bl -tag -width Ds
1313 4e12cd97 2022-01-25 stsp Perform the operation even if a file contains local modifications,
1314 4e12cd97 2022-01-25 stsp and do not raise an error if a specified
1316 4e12cd97 2022-01-25 stsp does not exist on disk.
1317 70e3e7f5 2019-12-13 tracey .It Fl k
1318 70e3e7f5 2019-12-13 tracey Keep affected files on disk.
1319 f2a9dc41 2019-12-13 tracey .It Fl R
1320 f2a9dc41 2019-12-13 tracey Permit recursion into directories.
1321 f2a9dc41 2019-12-13 tracey If this option is not specified,
1322 f2a9dc41 2019-12-13 tracey .Cm got remove
1323 f2a9dc41 2019-12-13 tracey will refuse to run if a specified
1324 f2a9dc41 2019-12-13 tracey .Ar path
1325 f2a9dc41 2019-12-13 tracey is a directory.
1326 766841c2 2020-08-13 stsp .It Fl s Ar status-codes
1327 766841c2 2020-08-13 stsp Only delete files with a modification status matching one of the
1328 766841c2 2020-08-13 stsp single-character status codes contained in the
1329 766841c2 2020-08-13 stsp .Ar status-codes
1331 766841c2 2020-08-13 stsp The following status codes may be specified:
1332 766841c2 2020-08-13 stsp .Bl -column YXZ description
1333 766841c2 2020-08-13 stsp .It M Ta modified file (this implies the
1336 766841c2 2020-08-13 stsp .It ! Ta versioned file expected on disk but missing
1340 bad961bf 2022-04-23 op .It Cm patch Oo Fl n Oc Oo Fl p Ar strip-count Oc Oo Fl R Oc Op Ar patchfile
1341 e9ce266e 2022-03-07 op .Dl Pq alias: Cm pa
1342 e9ce266e 2022-03-07 op Apply changes from
1343 e9ce266e 2022-03-07 op .Ar patchfile
1344 750a3093 2022-03-13 stsp to files in a work tree.
1345 986288a6 2022-03-13 stsp Files added or removed by a patch will be scheduled for addition or removal in
1346 986288a6 2022-03-13 stsp the work tree.
1348 750a3093 2022-03-13 stsp The patch must be in the unified diff format as produced by
1349 750a3093 2022-03-13 stsp .Cm got diff ,
1350 3f3a6472 2022-03-22 stsp .Xr git-diff 1 ,
1352 750a3093 2022-03-13 stsp .Xr diff 1
1355 1a7a534e 2022-03-22 stsp diff when invoked with their
1359 e9ce266e 2022-03-07 op .Ar patchfile
1360 750a3093 2022-03-13 stsp argument is provided, read unified diff data from standard input instead.
1363 750a3093 2022-03-13 stsp .Ar patchfile
1364 e38d4cde 2022-03-21 naddy contains multiple patches, then attempt to apply each of them in sequence.
1366 3e72b288 2022-03-13 stsp Show the status of each affected file, using the following status codes:
1367 e9ce266e 2022-03-07 op .Bl -column XYZ description
1368 750a3093 2022-03-13 stsp .It M Ta file was modified
1369 9802c41c 2022-06-21 op .It G Ta file was merged using a merge-base found in the repository
1370 9802c41c 2022-06-21 op .It C Ta file was merged and conflicts occurred during merge
1371 750a3093 2022-03-13 stsp .It D Ta file was deleted
1372 750a3093 2022-03-13 stsp .It A Ta file was added
1373 60aa1fa0 2022-03-17 op .It # Ta failed to patch the file
1376 750a3093 2022-03-13 stsp If a change does not match at its exact line number, attempt to
1377 3e72b288 2022-03-13 stsp apply it somewhere else in the file if a good spot can be found.
1378 3e72b288 2022-03-13 stsp Otherwise, the patch will fail to apply.
1382 dd6c3779 2022-03-13 op will refuse to apply a patch if certain preconditions are not met.
1383 3e72b288 2022-03-13 stsp Files to be deleted must already be under version control, and must
1384 3e72b288 2022-03-13 stsp not have been scheduled for deletion already.
1385 3e72b288 2022-03-13 stsp Files to be added must not yet be under version control and must not
1386 3e72b288 2022-03-13 stsp already be present on disk.
1387 3e72b288 2022-03-13 stsp Files to be modified must already be under version control and may not
1388 3e72b288 2022-03-13 stsp contain conflict markers.
1390 dd6c3779 2022-03-13 op If an error occurs, the
1392 dd6c3779 2022-03-13 op operation will be aborted.
1393 dd6c3779 2022-03-13 op Any changes made to the work tree up to this point will be left behind.
1394 750a3093 2022-03-13 stsp Such changes can be viewed with
1395 dd6c3779 2022-03-13 op .Cm got diff
1396 dd6c3779 2022-03-13 op and can be reverted with
1397 dd6c3779 2022-03-13 op .Cm got revert
1400 899fcfdf 2022-03-13 op The options for
1401 899fcfdf 2022-03-13 op .Cm got patch
1402 899fcfdf 2022-03-13 op are as follows:
1403 899fcfdf 2022-03-13 op .Bl -tag -width Ds
1405 899fcfdf 2022-03-13 op Do not make any modifications to the work tree.
1406 899fcfdf 2022-03-13 op This can be used to check whether a patch would apply without issues.
1408 899fcfdf 2022-03-13 op .Ar patchfile
1409 e38d4cde 2022-03-21 naddy contains diffs that affect the same file multiple times, the results
1410 899fcfdf 2022-03-13 op displayed may be incorrect.
1411 9d6cabd5 2022-04-07 op .It Fl p Ar strip-count
1412 9d6cabd5 2022-04-07 op Specify the number of leading path components to strip from paths
1414 9d6cabd5 2022-04-07 op .Ar patchfile .
1417 9d6cabd5 2022-04-07 op option is not used,
1421 9d6cabd5 2022-04-07 op path prefixes generated by
1422 9d6cabd5 2022-04-07 op .Xr git-diff 1
1423 9d6cabd5 2022-04-07 op will be recognized and stripped automatically.
1425 bad961bf 2022-04-23 op Reverse the patch before applying it.
1428 dfc23429 2019-08-11 stsp .It Cm revert Oo Fl p Oc Oo Fl F Ar response-script Oc Oo Fl R Oc Ar path ...
1429 4683a10b 2021-11-04 kn .Dl Pq alias: Cm rv
1430 bd81cfb7 2020-04-19 stsp Revert any local changes in files at the specified paths in a work tree.
1431 a129376b 2019-03-28 stsp File contents will be overwritten with those contained in the
1432 1dd86744 2019-08-12 anthony work tree's base commit.
1433 1dd86744 2019-08-12 anthony There is no way to bring discarded changes back after
1434 a129376b 2019-03-28 stsp .Cm got revert !
1436 e20a8b6f 2019-06-04 stsp If a file was added with
1437 e38d4cde 2022-03-21 naddy .Cm got add ,
1438 a129376b 2019-03-28 stsp it will become an unversioned file again.
1439 e20a8b6f 2019-06-04 stsp If a file was deleted with
1440 e38d4cde 2022-03-21 naddy .Cm got remove ,
1441 a129376b 2019-03-28 stsp it will be restored.
1443 0f6d7415 2019-08-08 stsp The options for
1444 0f6d7415 2019-08-08 stsp .Cm got revert
1445 0f6d7415 2019-08-08 stsp are as follows:
1446 0f6d7415 2019-08-08 stsp .Bl -tag -width Ds
1448 33aa809d 2019-08-08 stsp Instead of reverting all changes in files, interactively select or reject
1449 33aa809d 2019-08-08 stsp changes to revert based on
1451 33aa809d 2019-08-08 stsp (revert change),
1453 33aa809d 2019-08-08 stsp (keep change), and
1455 33aa809d 2019-08-08 stsp (quit reverting this file) responses.
1456 33aa809d 2019-08-08 stsp If a file is in modified status, individual patches derived from the
1457 33aa809d 2019-08-08 stsp modified file content can be reverted.
1458 33aa809d 2019-08-08 stsp Files in added or deleted status may only be reverted in their entirety.
1459 33aa809d 2019-08-08 stsp .It Fl F Ar response-script
1462 33aa809d 2019-08-08 stsp option, read
1467 33aa809d 2019-08-08 stsp responses line-by-line from the specified
1468 33aa809d 2019-08-08 stsp .Ar response-script
1469 33aa809d 2019-08-08 stsp file instead of prompting interactively.
1471 0f6d7415 2019-08-08 stsp Permit recursion into directories.
1472 0f6d7415 2019-08-08 stsp If this option is not specified,
1473 0f6d7415 2019-08-08 stsp .Cm got revert
1474 0f6d7415 2019-08-08 stsp will refuse to run if a specified
1476 0f6d7415 2019-08-08 stsp is a directory.
1479 62b21d33 2022-07-19 op .It Cm commit Oo Fl A Ar author Oc Oo Fl F Ar path Oc Oo Fl m Ar message Oc Oo Fl N Oc Oo Fl S Oc Op Ar path ...
1480 4683a10b 2021-11-04 kn .Dl Pq alias: Cm ci
1481 4ed9f614 2019-08-04 stsp Create a new commit in the repository from changes in a work tree
1482 15cd91f7 2019-05-12 stsp and use this commit as the new base commit for the work tree.
1485 4ed9f614 2019-08-04 stsp is specified, commit all changes in the work tree.
1486 4ed9f614 2019-08-04 stsp Otherwise, commit changes at or within the specified paths.
1488 4ed9f614 2019-08-04 stsp If changes have been explicitly staged for commit with
1489 1dd86744 2019-08-12 anthony .Cm got stage ,
1490 4ed9f614 2019-08-04 stsp only commit staged changes and reject any specified paths which
1491 4ed9f614 2019-08-04 stsp have not been staged.
1493 28cf319f 2021-01-28 stsp .Cm got commit
1494 28cf319f 2021-01-28 stsp opens a temporary file in an editor where a log message can be written
1495 28cf319f 2021-01-28 stsp unless the
1497 28cf319f 2021-01-28 stsp option is used
1502 28cf319f 2021-01-28 stsp options are used together.
1504 15cd91f7 2019-05-12 stsp Show the status of each affected file, using the following status codes:
1505 15cd91f7 2019-05-12 stsp .Bl -column YXZ description
1506 15cd91f7 2019-05-12 stsp .It M Ta modified file
1507 15cd91f7 2019-05-12 stsp .It D Ta file was deleted
1508 15cd91f7 2019-05-12 stsp .It A Ta new file was added
1509 1ebedb77 2019-10-19 stsp .It m Ta modified file modes (executable bit only)
1512 996d5ccd 2019-08-05 stsp Files which are not part of the new commit will retain their previously
1513 996d5ccd 2019-08-05 stsp recorded base commit.
1516 15cd91f7 2019-05-12 stsp commands may refuse to run while the work tree contains files from
1517 15cd91f7 2019-05-12 stsp multiple base commits.
1518 15cd91f7 2019-05-12 stsp The base commit of such a work tree can be made consistent by running
1519 47ec7be7 2019-05-12 stsp .Cm got update
1520 47ec7be7 2019-05-12 stsp across the entire work tree.
1523 15cd91f7 2019-05-12 stsp .Cm got commit
1524 15cd91f7 2019-05-12 stsp command requires the
1525 74416c47 2019-05-09 stsp .Ev GOT_AUTHOR
1526 aba9c984 2019-09-08 stsp environment variable to be set,
1527 257add31 2020-09-09 stsp unless an author has been configured in
1528 257add31 2020-09-09 stsp .Xr got.conf 5
1530 aba9c984 2019-09-08 stsp .Dv user.name
1532 709ae9eb 2019-09-08 stsp .Dv user.email
1533 709ae9eb 2019-09-08 stsp configuration settings can be
1534 aba9c984 2019-09-08 stsp obtained from the repository's
1535 aba9c984 2019-09-08 stsp .Pa .git/config
1536 c9956ddf 2019-09-08 stsp file or from Git's global
1537 c9956ddf 2019-09-08 stsp .Pa ~/.gitconfig
1538 c9956ddf 2019-09-08 stsp configuration file.
1540 74416c47 2019-05-09 stsp The options for
1541 74416c47 2019-05-09 stsp .Cm got commit
1542 74416c47 2019-05-09 stsp are as follows:
1543 74416c47 2019-05-09 stsp .Bl -tag -width Ds
1544 62b21d33 2022-07-19 op .It Fl A Ar author
1545 62b21d33 2022-07-19 op Set author information in the newly created commit to
1546 62b21d33 2022-07-19 op .Ar author .
1547 62b21d33 2022-07-19 op This is useful when committing changes which were written by someone
1551 62b21d33 2022-07-19 op argument must use the same format as the
1552 62b21d33 2022-07-19 op .Ev GOT_AUTHOR
1553 62b21d33 2022-07-19 op environment variable.
1555 62b21d33 2022-07-19 op In addition to storing author information, the newly created commit
1556 62b21d33 2022-07-19 op object will retain
1557 62b21d33 2022-07-19 op .Dq committer
1558 62b21d33 2022-07-19 op information which is obtained, as usual, from the
1559 62b21d33 2022-07-19 op .Ev GOT_AUTHOR
1560 62b21d33 2022-07-19 op environment variable, or
1561 62b21d33 2022-07-19 op .Xr got.conf 5 ,
1562 62b21d33 2022-07-19 op or Git configuration settings.
1563 28cf319f 2021-01-28 stsp .It Fl F Ar path
1564 28cf319f 2021-01-28 stsp Use the prepared log message stored in the file found at
1566 28cf319f 2021-01-28 stsp when creating the new commit.
1567 28cf319f 2021-01-28 stsp .Cm got commit
1568 28cf319f 2021-01-28 stsp opens a temporary file in an editor where the prepared log message can be
1569 28cf319f 2021-01-28 stsp reviewed and edited further if needed.
1570 28cf319f 2021-01-28 stsp Cannot be used together with the
1573 28cf319f 2021-01-28 stsp .It Fl m Ar message
1574 28cf319f 2021-01-28 stsp Use the specified log message when creating the new commit.
1575 28cf319f 2021-01-28 stsp Cannot be used together with the
1579 28cf319f 2021-01-28 stsp This option prevents
1580 23594da9 2019-05-13 stsp .Cm got commit
1581 28cf319f 2021-01-28 stsp from opening the commit message in an editor.
1582 28cf319f 2021-01-28 stsp It has no effect unless it is used together with the
1584 28cf319f 2021-01-28 stsp option and is intended for non-interactive use such as scripting.
1586 af358f55 2020-07-23 stsp Allow the addition of symbolic links which point outside of the path space
1587 af358f55 2020-07-23 stsp that is under version control.
1588 af358f55 2020-07-23 stsp By default,
1589 af358f55 2020-07-23 stsp .Cm got commit
1590 af358f55 2020-07-23 stsp will reject such symbolic links due to safety concerns.
1591 35213c7c 2020-07-23 stsp As a precaution,
1593 af358f55 2020-07-23 stsp may decide to represent such a symbolic link as a regular file which contains
1594 af358f55 2020-07-23 stsp the link's target path, rather than creating an actual symbolic link which
1595 af358f55 2020-07-23 stsp points outside of the work tree.
1596 af358f55 2020-07-23 stsp Use of this option is discouraged because external mechanisms such as
1597 af358f55 2020-07-23 stsp .Dq make obj
1598 af358f55 2020-07-23 stsp are better suited for managing symbolic links to paths not under
1599 af358f55 2020-07-23 stsp version control.
1602 cfce0458 2019-07-28 stsp .Cm got commit
1603 cfce0458 2019-07-28 stsp will refuse to run if certain preconditions are not met.
1604 916f288c 2019-07-30 stsp If the work tree's current branch is not in the
1605 916f288c 2019-07-30 stsp .Dq refs/heads/
1606 916f288c 2019-07-30 stsp reference namespace, new commits may not be created on this branch.
1607 cfce0458 2019-07-28 stsp Local changes may only be committed if they are based on file content
1608 cfce0458 2019-07-28 stsp found in the most recent commit on the work tree's branch.
1609 cfce0458 2019-07-28 stsp If a path is found to be out of date,
1610 cfce0458 2019-07-28 stsp .Cm got update
1611 cfce0458 2019-07-28 stsp must be used first in order to merge local changes with changes made
1612 cfce0458 2019-07-28 stsp in the repository.
1614 f8a36e22 2021-08-26 stsp .It Cm send Oo Fl a Oc Oo Fl b Ar branch Oc Oo Fl d Ar branch Oc Oo Fl f Oc Oo Fl r Ar repository-path Oc Oo Fl t Ar tag Oc Oo Fl T Oc Oo Fl q Oc Oo Fl v Oc Op Ar remote-repository
1615 4683a10b 2021-11-04 kn .Dl Pq alias: Cm se
1616 f8a36e22 2021-08-26 stsp Send new changes to a remote repository.
1618 f8a36e22 2021-08-26 stsp .Ar remote-repository
1619 f8a36e22 2021-08-26 stsp is specified,
1620 f8a36e22 2021-08-26 stsp .Dq origin
1621 f8a36e22 2021-08-26 stsp will be used.
1622 f8a36e22 2021-08-26 stsp The remote repository's URL is obtained from the corresponding entry in
1623 f8a36e22 2021-08-26 stsp .Xr got.conf 5
1625 f8a36e22 2021-08-26 stsp .Pa config
1626 f8a36e22 2021-08-26 stsp file of the local repository, as created by
1627 f8a36e22 2021-08-26 stsp .Cm got clone .
1629 f8a36e22 2021-08-26 stsp All objects corresponding to new changes will be written to a temporary
1630 f8a36e22 2021-08-26 stsp pack file which is then uploaded to the server.
1631 f8a36e22 2021-08-26 stsp Upon success, references in the
1632 f8a36e22 2021-08-26 stsp .Dq refs/remotes/
1633 f8a36e22 2021-08-26 stsp reference namespace of the local repository will be updated to point at
1634 f8a36e22 2021-08-26 stsp the commits which have been sent.
1636 f8a36e22 2021-08-26 stsp By default, changes will only be sent if they are based on up-to-date
1637 f8a36e22 2021-08-26 stsp copies of relevant branches in the remote repository.
1638 fd44090b 2021-08-26 stsp If any changes to be sent are based on out-of-date copies or would
1639 fd44090b 2021-08-26 stsp otherwise break linear history of existing branches, new changes must
1640 fd44090b 2021-08-26 stsp be fetched from the server with
1641 f8a36e22 2021-08-26 stsp .Cm got fetch
1642 f8a36e22 2021-08-26 stsp and local branches must be rebased with
1643 f8a36e22 2021-08-26 stsp .Cm got rebase
1645 f8a36e22 2021-08-26 stsp .Cm got send
1646 f8a36e22 2021-08-26 stsp can succeed.
1649 fd44090b 2021-08-26 stsp option can be used to make exceptions to these requirements.
1651 f8a36e22 2021-08-26 stsp The options for
1652 f8a36e22 2021-08-26 stsp .Cm got send
1653 f8a36e22 2021-08-26 stsp are as follows:
1654 f8a36e22 2021-08-26 stsp .Bl -tag -width Ds
1656 f8a36e22 2021-08-26 stsp Send all branches from the local repository's
1657 f8a36e22 2021-08-26 stsp .Dq refs/heads/
1658 f8a36e22 2021-08-26 stsp reference namespace.
1661 f8a36e22 2021-08-26 stsp option is equivalent to listing all branches with multiple
1664 f8a36e22 2021-08-26 stsp Cannot be used together with the
1667 f8a36e22 2021-08-26 stsp .It Fl b Ar branch
1668 f8a36e22 2021-08-26 stsp Send the specified
1669 f8a36e22 2021-08-26 stsp .Ar branch
1670 f8a36e22 2021-08-26 stsp from the local repository's
1671 f8a36e22 2021-08-26 stsp .Dq refs/heads/
1672 f8a36e22 2021-08-26 stsp reference namespace.
1673 f8a36e22 2021-08-26 stsp This option may be specified multiple times to build a list of branches
1675 f8a36e22 2021-08-26 stsp If this option is not specified, default to the work tree's current branch
1676 f8a36e22 2021-08-26 stsp if invoked in a work tree, or to the repository's HEAD reference.
1677 f8a36e22 2021-08-26 stsp Cannot be used together with the
1680 f8a36e22 2021-08-26 stsp .It Fl d Ar branch
1681 f8a36e22 2021-08-26 stsp Delete the specified
1682 f8a36e22 2021-08-26 stsp .Ar branch
1683 f8a36e22 2021-08-26 stsp from the remote repository's
1684 f8a36e22 2021-08-26 stsp .Dq refs/heads/
1685 f8a36e22 2021-08-26 stsp reference namespace.
1686 f8a36e22 2021-08-26 stsp This option may be specified multiple times to build a list of branches
1687 f8a36e22 2021-08-26 stsp to delete.
1689 f8a36e22 2021-08-26 stsp Only references are deleted.
1690 f8a36e22 2021-08-26 stsp Any commit, tree, tag, and blob objects belonging to deleted branches
1691 f8a36e22 2021-08-26 stsp may become subject to deletion by Git's garbage collector running on
1692 f8a36e22 2021-08-26 stsp the server.
1694 f8a36e22 2021-08-26 stsp Requesting deletion of branches results in an error if the server
1695 fd44090b 2021-08-26 stsp does not support this feature or disallows the deletion of branches
1696 fd44090b 2021-08-26 stsp based on its configuration.
1698 fd44090b 2021-08-26 stsp Attempt to force the server to overwrite existing branches or tags
1699 fd44090b 2021-08-26 stsp in the remote repository, even when
1700 fd44090b 2021-08-26 stsp .Cm got fetch
1702 fd44090b 2021-08-26 stsp .Cm got rebase
1703 fd44090b 2021-08-26 stsp would usually be required before changes can be sent.
1704 f8a36e22 2021-08-26 stsp The server may reject forced requests regardless, depending on its
1705 f8a36e22 2021-08-26 stsp configuration.
1707 f8a36e22 2021-08-26 stsp Any commit, tree, tag, and blob objects belonging to overwritten branches
1708 f8a36e22 2021-08-26 stsp or tags may become subject to deletion by Git's garbage collector running
1709 f8a36e22 2021-08-26 stsp on the server.
1712 f8a36e22 2021-08-26 stsp .Dq refs/tags
1713 f8a36e22 2021-08-26 stsp reference namespace is globally shared between all repositories.
1714 f8a36e22 2021-08-26 stsp Use of the
1716 f8a36e22 2021-08-26 stsp option to overwrite tags is discouraged because it can lead to
1717 f8a36e22 2021-08-26 stsp inconsistencies between the tags present in different repositories.
1718 f8a36e22 2021-08-26 stsp In general, creating a new tag with a different name is recommended
1719 f8a36e22 2021-08-26 stsp instead of overwriting an existing tag.
1721 f8a36e22 2021-08-26 stsp Use of the
1723 f8a36e22 2021-08-26 stsp option is particularly discouraged if changes being sent are based
1724 f8a36e22 2021-08-26 stsp on an out-of-date copy of a branch in the remote repository.
1725 f8a36e22 2021-08-26 stsp Instead of using the
1727 f8a36e22 2021-08-26 stsp option, new changes should
1728 f8a36e22 2021-08-26 stsp be fetched with
1729 f8a36e22 2021-08-26 stsp .Cm got fetch
1730 f8a36e22 2021-08-26 stsp and local branches should be rebased with
1731 f8a36e22 2021-08-26 stsp .Cm got rebase ,
1732 f8a36e22 2021-08-26 stsp followed by another attempt to send the changes.
1736 f8a36e22 2021-08-26 stsp option should only be needed in situations where the remote repository's
1737 f8a36e22 2021-08-26 stsp copy of a branch or tag is known to be out-of-date and is considered
1738 f8a36e22 2021-08-26 stsp disposable.
1739 f8a36e22 2021-08-26 stsp The risks of creating inconsistencies between different repositories
1740 f8a36e22 2021-08-26 stsp should also be taken into account.
1741 f8a36e22 2021-08-26 stsp .It Fl r Ar repository-path
1742 f8a36e22 2021-08-26 stsp Use the repository at the specified path.
1743 f8a36e22 2021-08-26 stsp If not specified, assume the repository is located at or above the current
1744 f8a36e22 2021-08-26 stsp working directory.
1745 f8a36e22 2021-08-26 stsp If this directory is a
1747 f8a36e22 2021-08-26 stsp work tree, use the repository path associated with this work tree.
1748 f8a36e22 2021-08-26 stsp .It Fl t Ar tag
1749 f8a36e22 2021-08-26 stsp Send the specified
1751 f8a36e22 2021-08-26 stsp from the local repository's
1752 f8a36e22 2021-08-26 stsp .Dq refs/tags/
1753 f8a36e22 2021-08-26 stsp reference namespace, in addition to any branches that are being sent.
1756 f8a36e22 2021-08-26 stsp option may be specified multiple times to build a list of tags to send.
1757 f8a36e22 2021-08-26 stsp No tags will be sent if the
1759 f8a36e22 2021-08-26 stsp option is not used.
1761 f8a36e22 2021-08-26 stsp Raise an error if the specified
1763 f8a36e22 2021-08-26 stsp already exists in the remote repository, unless the
1765 93a300b2 2021-08-26 stsp option is used to overwrite the server's copy of the tag.
1766 f8a36e22 2021-08-26 stsp In general, creating a new tag with a different name is recommended
1767 f8a36e22 2021-08-26 stsp instead of overwriting an existing tag.
1769 f8a36e22 2021-08-26 stsp Cannot be used together with the
1773 f8a36e22 2021-08-26 stsp Attempt to send all tags from the local repository's
1774 f8a36e22 2021-08-26 stsp .Dq refs/tags/
1775 f8a36e22 2021-08-26 stsp reference namespace.
1778 f8a36e22 2021-08-26 stsp option is equivalent to listing all tags with multiple
1781 f8a36e22 2021-08-26 stsp Cannot be used together with the
1785 f8a36e22 2021-08-26 stsp Suppress progress reporting output.
1786 f8a36e22 2021-08-26 stsp The same option will be passed to
1788 f8a36e22 2021-08-26 stsp if applicable.
1790 f8a36e22 2021-08-26 stsp Verbose mode.
1792 f8a36e22 2021-08-26 stsp .Cm got send
1793 f8a36e22 2021-08-26 stsp to print debugging messages to standard error output.
1794 f8a36e22 2021-08-26 stsp The same option will be passed to
1796 f8a36e22 2021-08-26 stsp if applicable.
1797 f8a36e22 2021-08-26 stsp Multiple -v options increase the verbosity.
1798 f8a36e22 2021-08-26 stsp The maximum is 3.
1801 234035bc 2019-06-01 stsp .It Cm cherrypick Ar commit
1802 4683a10b 2021-11-04 kn .Dl Pq alias: Cm cy
1803 234035bc 2019-06-01 stsp Merge changes from a single
1804 234035bc 2019-06-01 stsp .Ar commit
1805 234035bc 2019-06-01 stsp into the work tree.
1806 234035bc 2019-06-01 stsp The specified
1807 234035bc 2019-06-01 stsp .Ar commit
1808 a16d97bd 2021-09-02 stsp should be on a different branch than the work tree's base commit.
1809 a54b6686 2019-06-28 stsp The expected argument is a reference or a commit ID SHA1 hash.
1810 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1811 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
1813 234035bc 2019-06-01 stsp Show the status of each affected file, using the following status codes:
1814 234035bc 2019-06-01 stsp .Bl -column YXZ description
1815 234035bc 2019-06-01 stsp .It G Ta file was merged
1816 234035bc 2019-06-01 stsp .It C Ta file was merged and conflicts occurred during merge
1817 234035bc 2019-06-01 stsp .It ! Ta changes destined for a missing file were not merged
1818 234035bc 2019-06-01 stsp .It D Ta file was deleted
1819 f365d762 2021-09-24 stsp .It d Ta file's deletion was prevented by local modifications
1820 234035bc 2019-06-01 stsp .It A Ta new file was added
1821 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1822 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
1825 234035bc 2019-06-01 stsp The merged changes will appear as local changes in the work tree, which
1826 234035bc 2019-06-01 stsp may be viewed with
1827 234035bc 2019-06-01 stsp .Cm got diff ,
1828 234035bc 2019-06-01 stsp amended manually or with further
1829 234035bc 2019-06-01 stsp .Cm got cherrypick
1831 234035bc 2019-06-01 stsp committed with
1832 234035bc 2019-06-01 stsp .Cm got commit ,
1833 234035bc 2019-06-01 stsp or discarded again with
1834 234035bc 2019-06-01 stsp .Cm got revert .
1836 234035bc 2019-06-01 stsp .Cm got cherrypick
1837 234035bc 2019-06-01 stsp will refuse to run if certain preconditions are not met.
1838 e38d4cde 2022-03-21 naddy If the work tree contains multiple base commits, it must first be updated
1839 234035bc 2019-06-01 stsp to a single base commit with
1840 234035bc 2019-06-01 stsp .Cm got update .
1841 69de9dd4 2021-09-03 stsp If any relevant files already contain merge conflicts, these
1842 234035bc 2019-06-01 stsp conflicts must be resolved first.
1844 5ef14e63 2019-06-02 stsp .It Cm backout Ar commit
1845 4683a10b 2021-11-04 kn .Dl Pq alias: Cm bo
1846 5ef14e63 2019-06-02 stsp Reverse-merge changes from a single
1847 5ef14e63 2019-06-02 stsp .Ar commit
1848 5ef14e63 2019-06-02 stsp into the work tree.
1849 5ef14e63 2019-06-02 stsp The specified
1850 5ef14e63 2019-06-02 stsp .Ar commit
1851 a16d97bd 2021-09-02 stsp should be on the same branch as the work tree's base commit.
1852 a54b6686 2019-06-28 stsp The expected argument is a reference or a commit ID SHA1 hash.
1853 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1854 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
1856 5ef14e63 2019-06-02 stsp Show the status of each affected file, using the following status codes:
1857 5ef14e63 2019-06-02 stsp .Bl -column YXZ description
1858 5ef14e63 2019-06-02 stsp .It G Ta file was merged
1859 5ef14e63 2019-06-02 stsp .It C Ta file was merged and conflicts occurred during merge
1860 5ef14e63 2019-06-02 stsp .It ! Ta changes destined for a missing file were not merged
1861 5ef14e63 2019-06-02 stsp .It D Ta file was deleted
1862 f365d762 2021-09-24 stsp .It d Ta file's deletion was prevented by local modifications
1863 5ef14e63 2019-06-02 stsp .It A Ta new file was added
1864 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1865 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
1868 5ef14e63 2019-06-02 stsp The reverse-merged changes will appear as local changes in the work tree,
1869 5ef14e63 2019-06-02 stsp which may be viewed with
1870 5ef14e63 2019-06-02 stsp .Cm got diff ,
1871 5ef14e63 2019-06-02 stsp amended manually or with further
1872 778a73c2 2019-07-12 stsp .Cm got backout
1874 5ef14e63 2019-06-02 stsp committed with
1875 5ef14e63 2019-06-02 stsp .Cm got commit ,
1876 5ef14e63 2019-06-02 stsp or discarded again with
1877 5ef14e63 2019-06-02 stsp .Cm got revert .
1879 92228c38 2019-06-02 stsp .Cm got backout
1880 92228c38 2019-06-02 stsp will refuse to run if certain preconditions are not met.
1881 e38d4cde 2022-03-21 naddy If the work tree contains multiple base commits, it must first be updated
1882 92228c38 2019-06-02 stsp to a single base commit with
1883 92228c38 2019-06-02 stsp .Cm got update .
1884 69de9dd4 2021-09-03 stsp If any relevant files already contain merge conflicts, these
1885 92228c38 2019-06-02 stsp conflicts must be resolved first.
1887 643b85bc 2021-07-16 stsp .It Cm rebase Oo Fl a Oc Oo Fl c Oc Oo Fl l Oc Oo Fl X Oc Op Ar branch
1888 4683a10b 2021-11-04 kn .Dl Pq alias: Cm rb
1889 818c7501 2019-07-11 stsp Rebase commits on the specified
1890 818c7501 2019-07-11 stsp .Ar branch
1891 818c7501 2019-07-11 stsp onto the tip of the current branch of the work tree.
1893 818c7501 2019-07-11 stsp .Ar branch
1894 818c7501 2019-07-11 stsp must share common ancestry with the work tree's current branch.
1895 bc3056e3 2019-08-18 stsp Rebasing begins with the first descendant commit of the youngest
1896 f09e2405 2019-07-11 stsp common ancestor commit shared by the specified
1897 818c7501 2019-07-11 stsp .Ar branch
1898 818c7501 2019-07-11 stsp and the work tree's current branch, and stops once the tip commit
1899 f09e2405 2019-07-11 stsp of the specified
1900 818c7501 2019-07-11 stsp .Ar branch
1901 f09e2405 2019-07-11 stsp has been rebased.
1904 2b6826ba 2020-02-24 stsp .Cm got rebase
1905 2b6826ba 2020-02-24 stsp is used as intended, the specified
1906 2b6826ba 2020-02-24 stsp .Ar branch
1907 c10890ce 2020-02-25 stsp represents a local commit history and may already contain changes
1908 c10890ce 2020-02-25 stsp that are not yet visible in any other repositories.
1909 2b6826ba 2020-02-24 stsp The work tree's current branch, which must be set with
1910 2b6826ba 2020-02-24 stsp .Cm got update -b
1911 2b6826ba 2020-02-24 stsp before starting the
1912 2b6826ba 2020-02-24 stsp .Cm rebase
1913 2b6826ba 2020-02-24 stsp operation, represents a branch from a remote repository which shares
1914 2b6826ba 2020-02-24 stsp a common history with the specified
1915 2b6826ba 2020-02-24 stsp .Ar branch
1916 c10890ce 2020-02-25 stsp but has progressed, and perhaps diverged, due to commits added to the
1917 c10890ce 2020-02-25 stsp remote repository.
1919 c6b4581b 2019-07-28 stsp Rebased commits are accumulated on a temporary branch which the work tree
1920 c6b4581b 2019-07-28 stsp will remain switched to throughout the entire rebase operation.
1921 c6b4581b 2019-07-28 stsp Commits on this branch represent the same changes with the same log
1922 c6b4581b 2019-07-28 stsp messages as their counterparts on the original
1923 818c7501 2019-07-11 stsp .Ar branch ,
1924 818c7501 2019-07-11 stsp but with different commit IDs.
1925 818c7501 2019-07-11 stsp Once rebasing has completed successfully, the temporary branch becomes
1926 f09e2405 2019-07-11 stsp the new version of the specified
1927 818c7501 2019-07-11 stsp .Ar branch
1928 818c7501 2019-07-11 stsp and the work tree is automatically switched to it.
1930 1795b260 2021-04-02 kn Old commits in their pre-rebase state are automatically backed up in the
1931 e600f124 2021-03-21 stsp .Dq refs/got/backup/rebase
1932 e600f124 2021-03-21 stsp reference namespace.
1933 e600f124 2021-03-21 stsp As long as these references are not removed older versions of rebased
1934 e600f124 2021-03-21 stsp commits will remain in the repository and can be viewed with the
1935 e600f124 2021-03-21 stsp .Cm got rebase -l
1937 e600f124 2021-03-21 stsp Removal of these references makes objects which become unreachable via
1938 e6786710 2021-07-03 stsp any reference subject to removal by Git's garbage collector or
1939 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
1941 818c7501 2019-07-11 stsp While rebasing commits, show the status of each affected file,
1942 818c7501 2019-07-11 stsp using the following status codes:
1943 818c7501 2019-07-11 stsp .Bl -column YXZ description
1944 818c7501 2019-07-11 stsp .It G Ta file was merged
1945 818c7501 2019-07-11 stsp .It C Ta file was merged and conflicts occurred during merge
1946 818c7501 2019-07-11 stsp .It ! Ta changes destined for a missing file were not merged
1947 818c7501 2019-07-11 stsp .It D Ta file was deleted
1948 f365d762 2021-09-24 stsp .It d Ta file's deletion was prevented by local modifications
1949 818c7501 2019-07-11 stsp .It A Ta new file was added
1950 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1951 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
1954 e38d4cde 2022-03-21 naddy If merge conflicts occur, the rebase operation is interrupted and may
1955 f09e2405 2019-07-11 stsp be continued once conflicts have been resolved.
1956 1fa49072 2021-09-28 stsp If any files with destined changes are found to be missing or unversioned,
1957 1fa49072 2021-09-28 stsp or if files could not be deleted due to differences in deleted content,
1958 1fa49072 2021-09-28 stsp the rebase operation will be interrupted to prevent potentially incomplete
1959 1fa49072 2021-09-28 stsp changes from being committed to the repository without user intervention.
1960 1fa49072 2021-09-28 stsp The work tree may be modified as desired and the rebase operation can be
1961 1fa49072 2021-09-28 stsp continued once the changes present in the work tree are considered complete.
1962 818c7501 2019-07-11 stsp Alternatively, the rebase operation may be aborted which will leave
1963 818c7501 2019-07-11 stsp .Ar branch
1964 818c7501 2019-07-11 stsp unmodified and the work tree switched back to its original branch.
1966 ff0d2220 2019-07-11 stsp If a merge conflict is resolved in a way which renders the merged
1967 f09e2405 2019-07-11 stsp change into a no-op change, the corresponding commit will be elided
1968 f09e2405 2019-07-11 stsp when the rebase operation continues.
1970 818c7501 2019-07-11 stsp .Cm got rebase
1971 818c7501 2019-07-11 stsp will refuse to run if certain preconditions are not met.
1972 a85446b2 2020-01-04 stsp If the work tree is not yet fully updated to the tip commit of its
1973 e38d4cde 2022-03-21 naddy branch, then the work tree must first be updated with
1974 818c7501 2019-07-11 stsp .Cm got update .
1975 4ed9f614 2019-08-04 stsp If changes have been staged with
1976 4ed9f614 2019-08-04 stsp .Cm got stage ,
1977 bc3056e3 2019-08-18 stsp these changes must first be committed with
1978 4ed9f614 2019-08-04 stsp .Cm got commit
1979 4ed9f614 2019-08-04 stsp or unstaged with
1980 4ed9f614 2019-08-04 stsp .Cm got unstage .
1981 f09e2405 2019-07-11 stsp If the work tree contains local changes, these changes must first be
1982 f09e2405 2019-07-11 stsp committed with
1983 f09e2405 2019-07-11 stsp .Cm got commit
1984 f09e2405 2019-07-11 stsp or reverted with
1985 f09e2405 2019-07-11 stsp .Cm got revert .
1987 64c6d990 2019-07-11 stsp .Ar branch
1988 64c6d990 2019-07-11 stsp contains changes to files outside of the work tree's path prefix,
1989 64c6d990 2019-07-11 stsp the work tree cannot be used to rebase this branch.
1992 7d5807f4 2019-07-11 stsp .Cm got update
1994 7d5807f4 2019-07-11 stsp .Cm got commit
1995 7d5807f4 2019-07-11 stsp commands will refuse to run while a rebase operation is in progress.
1996 7d5807f4 2019-07-11 stsp Other commands which manipulate the work tree may be used for
1997 7d5807f4 2019-07-11 stsp conflict resolution purposes.
1999 2af61735 2021-11-03 stsp If the specified
2000 2af61735 2021-11-03 stsp .Ar branch
2001 e38d4cde 2022-03-21 naddy is already based on the work tree's current branch, then no commits
2002 2af61735 2021-11-03 stsp need to be rebased and
2003 2af61735 2021-11-03 stsp .Cm got rebase
2004 2af61735 2021-11-03 stsp will simply switch the work tree to the specified
2005 2af61735 2021-11-03 stsp .Ar branch
2006 2af61735 2021-11-03 stsp and update files in the work tree accordingly.
2008 818c7501 2019-07-11 stsp The options for
2009 818c7501 2019-07-11 stsp .Cm got rebase
2010 818c7501 2019-07-11 stsp are as follows:
2011 818c7501 2019-07-11 stsp .Bl -tag -width Ds
2013 818c7501 2019-07-11 stsp Abort an interrupted rebase operation.
2014 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
2016 06067b48 2019-07-11 stsp Continue an interrupted rebase operation.
2017 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
2019 e600f124 2021-03-21 stsp Show a list of past rebase operations, represented by references in the
2020 e600f124 2021-03-21 stsp .Dq refs/got/backup/rebase
2021 e600f124 2021-03-21 stsp reference namespace.
2023 e600f124 2021-03-21 stsp Display the author, date, and log message of each backed up commit,
2024 e600f124 2021-03-21 stsp the object ID of the corresponding post-rebase commit, and
2025 e600f124 2021-03-21 stsp the object ID of their common ancestor commit.
2026 e600f124 2021-03-21 stsp Given these object IDs,
2028 e600f124 2021-03-21 stsp .Cm got log
2029 e600f124 2021-03-21 stsp command with the
2033 e600f124 2021-03-21 stsp options can be used to examine the history of either version of the branch,
2035 e600f124 2021-03-21 stsp .Cm got branch
2036 e600f124 2021-03-21 stsp command with the
2038 e600f124 2021-03-21 stsp option can be used to create a new branch from a pre-rebase state if desired.
2041 e600f124 2021-03-21 stsp .Ar branch
2042 e600f124 2021-03-21 stsp is specified, only show commits which at some point in time represented this
2044 e600f124 2021-03-21 stsp Otherwise, list all backed up commits for any branches.
2046 e600f124 2021-03-21 stsp If this option is used,
2047 e600f124 2021-03-21 stsp .Cm got rebase
2048 e600f124 2021-03-21 stsp does not require a work tree.
2049 e600f124 2021-03-21 stsp None of the other options can be used together with
2052 643b85bc 2021-07-16 stsp Delete backups created by past rebase operations, represented by references
2054 643b85bc 2021-07-16 stsp .Dq refs/got/backup/rebase
2055 643b85bc 2021-07-16 stsp reference namespace.
2058 643b85bc 2021-07-16 stsp .Ar branch
2059 643b85bc 2021-07-16 stsp is specified, only delete backups which at some point in time represented
2060 643b85bc 2021-07-16 stsp this branch.
2061 643b85bc 2021-07-16 stsp Otherwise, delete all references found within
2062 643b85bc 2021-07-16 stsp .Dq refs/got/backup/rebase .
2064 643b85bc 2021-07-16 stsp Any commit, tree, tag, and blob objects belonging to deleted backups
2065 643b85bc 2021-07-16 stsp remain in the repository and may be removed separately with
2066 643b85bc 2021-07-16 stsp Git's garbage collector or
2067 643b85bc 2021-07-16 stsp .Cm gotadmin cleanup .
2069 643b85bc 2021-07-16 stsp If this option is used,
2070 643b85bc 2021-07-16 stsp .Cm got rebase
2071 643b85bc 2021-07-16 stsp does not require a work tree.
2072 643b85bc 2021-07-16 stsp None of the other options can be used together with
2076 b93c7142 2021-10-01 stsp .It Cm histedit Oo Fl a Oc Oo Fl c Oc Oo Fl e Oc Oo Fl f Oc Oo Fl F Ar histedit-script Oc Oo Fl m Oc Oo Fl l Oc Oo Fl X Oc Op Ar branch
2077 4683a10b 2021-11-04 kn .Dl Pq alias: Cm he
2078 0ebf8283 2019-07-24 stsp Edit commit history between the work tree's current base commit and
2079 0ebf8283 2019-07-24 stsp the tip commit of the work tree's current branch.
2081 6e54d307 2020-02-24 stsp Before starting a
2082 6e54d307 2020-02-24 stsp .Cm histedit
2083 e38d4cde 2022-03-21 naddy operation, the work tree's current branch must be set with
2084 6e54d307 2020-02-24 stsp .Cm got update -b
2085 6e54d307 2020-02-24 stsp to the branch which should be edited, unless this branch is already the
2086 6e54d307 2020-02-24 stsp current branch of the work tree.
2087 6e54d307 2020-02-24 stsp The tip of this branch represents the upper bound (inclusive) of commits
2088 6e54d307 2020-02-24 stsp touched by the
2089 6e54d307 2020-02-24 stsp .Cm histedit
2090 6e54d307 2020-02-24 stsp operation.
2092 6e54d307 2020-02-24 stsp Furthermore, the work tree's base commit
2093 6e54d307 2020-02-24 stsp must be set with
2094 6e54d307 2020-02-24 stsp .Cm got update -c
2095 6e54d307 2020-02-24 stsp to a point in this branch's commit history where editing should begin.
2096 6e54d307 2020-02-24 stsp This commit represents the lower bound (non-inclusive) of commits touched
2098 6e54d307 2020-02-24 stsp .Cm histedit
2099 6e54d307 2020-02-24 stsp operation.
2101 0ebf8283 2019-07-24 stsp Editing of commit history is controlled via a
2102 0ebf8283 2019-07-24 stsp .Ar histedit script
2103 46fa4c83 2020-02-24 stsp which can be written in an editor based on a template, passed on the
2104 46fa4c83 2020-02-24 stsp command line, or generated with the
2110 0ebf8283 2019-07-24 stsp The format of the histedit script is line-based.
2111 0ebf8283 2019-07-24 stsp Each line in the script begins with a command name, followed by
2112 0ebf8283 2019-07-24 stsp whitespace and an argument.
2113 0ebf8283 2019-07-24 stsp For most commands, the expected argument is a commit ID SHA1 hash.
2114 0ebf8283 2019-07-24 stsp Any remaining text on the line is ignored.
2115 0ebf8283 2019-07-24 stsp Lines which begin with the
2117 0ebf8283 2019-07-24 stsp character are ignored entirely.
2119 d42bbff9 2022-07-12 stsp The available histedit script commands are as follows:
2120 0ebf8283 2019-07-24 stsp .Bl -column YXZ pick-commit
2121 d42bbff9 2022-07-12 stsp .It Cm pick Ar commit Ta Use the specified commit as it is.
2122 d42bbff9 2022-07-12 stsp .It Cm edit Ar commit Ta Use the specified commit but once changes have been
2123 0ebf8283 2019-07-24 stsp merged into the work tree interrupt the histedit operation for amending.
2124 d42bbff9 2022-07-12 stsp .It Cm fold Ar commit Ta Combine the specified commit with the next commit
2125 0ebf8283 2019-07-24 stsp listed further below that will be used.
2126 d42bbff9 2022-07-12 stsp .It Cm drop Ar commit Ta Remove this commit from the edited history.
2127 d42bbff9 2022-07-12 stsp .It Cm mesg Oo Ar log-message Oc Ta Create a new log message for the commit of
2128 d42bbff9 2022-07-12 stsp a preceding
2132 d42bbff9 2022-07-12 stsp command on the previous line of the histedit script.
2133 c5d51f20 2022-07-11 stsp The optional
2134 c5d51f20 2022-07-11 stsp .Ar log-message
2135 c5d51f20 2022-07-11 stsp argument provides a new single-line log message to use.
2137 c5d51f20 2022-07-11 stsp .Ar log-message
2138 c5d51f20 2022-07-11 stsp argument is omitted, open an editor where a new log message can be written.
2141 ba67992e 2019-07-25 stsp Every commit in the history being edited must be mentioned in the script.
2142 0ebf8283 2019-07-24 stsp Lines may be re-ordered to change the order of commits in the edited history.
2143 5b87815e 2020-03-05 stsp No commit may be listed more than once.
2145 c6b4581b 2019-07-28 stsp Edited commits are accumulated on a temporary branch which the work tree
2146 c6b4581b 2019-07-28 stsp will remain switched to throughout the entire histedit operation.
2147 0ebf8283 2019-07-24 stsp Once history editing has completed successfully, the temporary branch becomes
2148 498a90b7 2019-07-25 stsp the new version of the work tree's branch and the work tree is automatically
2149 498a90b7 2019-07-25 stsp switched to it.
2151 1795b260 2021-04-02 kn Old commits in their pre-histedit state are automatically backed up in the
2152 e600f124 2021-03-21 stsp .Dq refs/got/backup/histedit
2153 e600f124 2021-03-21 stsp reference namespace.
2154 e600f124 2021-03-21 stsp As long as these references are not removed older versions of edited
2155 e600f124 2021-03-21 stsp commits will remain in the repository and can be viewed with the
2156 e600f124 2021-03-21 stsp .Cm got histedit -l
2158 e600f124 2021-03-21 stsp Removal of these references makes objects which become unreachable via
2159 e6786710 2021-07-03 stsp any reference subject to removal by Git's garbage collector or
2160 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
2162 0ebf8283 2019-07-24 stsp While merging commits, show the status of each affected file,
2163 0ebf8283 2019-07-24 stsp using the following status codes:
2164 0ebf8283 2019-07-24 stsp .Bl -column YXZ description
2165 0ebf8283 2019-07-24 stsp .It G Ta file was merged
2166 0ebf8283 2019-07-24 stsp .It C Ta file was merged and conflicts occurred during merge
2167 0ebf8283 2019-07-24 stsp .It ! Ta changes destined for a missing file were not merged
2168 0ebf8283 2019-07-24 stsp .It D Ta file was deleted
2169 f365d762 2021-09-24 stsp .It d Ta file's deletion was prevented by local modifications
2170 0ebf8283 2019-07-24 stsp .It A Ta new file was added
2171 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
2172 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
2175 e38d4cde 2022-03-21 naddy If merge conflicts occur, the histedit operation is interrupted and may
2176 0ebf8283 2019-07-24 stsp be continued once conflicts have been resolved.
2177 cd33da48 2021-09-28 stsp If any files with destined changes are found to be missing or unversioned,
2178 cd33da48 2021-09-28 stsp or if files could not be deleted due to differences in deleted content,
2179 cd33da48 2021-09-28 stsp the histedit operation will be interrupted to prevent potentially incomplete
2180 cd33da48 2021-09-28 stsp changes from being committed to the repository without user intervention.
2181 cd33da48 2021-09-28 stsp The work tree may be modified as desired and the histedit operation can be
2182 cd33da48 2021-09-28 stsp continued once the changes present in the work tree are considered complete.
2183 0ebf8283 2019-07-24 stsp Alternatively, the histedit operation may be aborted which will leave
2184 0ebf8283 2019-07-24 stsp the work tree switched back to its original branch.
2186 0ebf8283 2019-07-24 stsp If a merge conflict is resolved in a way which renders the merged
2187 0ebf8283 2019-07-24 stsp change into a no-op change, the corresponding commit will be elided
2188 0ebf8283 2019-07-24 stsp when the histedit operation continues.
2190 0ebf8283 2019-07-24 stsp .Cm got histedit
2191 0ebf8283 2019-07-24 stsp will refuse to run if certain preconditions are not met.
2192 c7d20a3f 2019-07-30 stsp If the work tree's current branch is not in the
2193 c7d20a3f 2019-07-30 stsp .Dq refs/heads/
2194 c7d20a3f 2019-07-30 stsp reference namespace, the history of the branch may not be edited.
2195 e38d4cde 2022-03-21 naddy If the work tree contains multiple base commits, it must first be updated
2196 0ebf8283 2019-07-24 stsp to a single base commit with
2197 0ebf8283 2019-07-24 stsp .Cm got update .
2198 4ed9f614 2019-08-04 stsp If changes have been staged with
2199 4ed9f614 2019-08-04 stsp .Cm got stage ,
2200 bc3056e3 2019-08-18 stsp these changes must first be committed with
2201 4ed9f614 2019-08-04 stsp .Cm got commit
2202 4ed9f614 2019-08-04 stsp or unstaged with
2203 4ed9f614 2019-08-04 stsp .Cm got unstage .
2204 0ebf8283 2019-07-24 stsp If the work tree contains local changes, these changes must first be
2205 0ebf8283 2019-07-24 stsp committed with
2206 0ebf8283 2019-07-24 stsp .Cm got commit
2207 0ebf8283 2019-07-24 stsp or reverted with
2208 0ebf8283 2019-07-24 stsp .Cm got revert .
2209 0ebf8283 2019-07-24 stsp If the edited history contains changes to files outside of the work tree's
2210 0ebf8283 2019-07-24 stsp path prefix, the work tree cannot be used to edit the history of this branch.
2213 7ef62c4e 2020-02-24 stsp .Cm got update ,
2214 7ef62c4e 2020-02-24 stsp .Cm got rebase ,
2216 65db4ffb 2020-02-24 stsp .Cm got integrate
2217 65db4ffb 2020-02-24 stsp commands will refuse to run while a histedit operation is in progress.
2218 a698f62e 2019-07-25 stsp Other commands which manipulate the work tree may be used, and the
2219 0ebf8283 2019-07-24 stsp .Cm got commit
2220 a698f62e 2019-07-25 stsp command may be used to commit arbitrary changes to the temporary branch
2221 a698f62e 2019-07-25 stsp while the histedit operation is interrupted.
2223 0ebf8283 2019-07-24 stsp The options for
2224 0ebf8283 2019-07-24 stsp .Cm got histedit
2225 0ebf8283 2019-07-24 stsp are as follows:
2226 0ebf8283 2019-07-24 stsp .Bl -tag -width Ds
2228 0ebf8283 2019-07-24 stsp Abort an interrupted histedit operation.
2229 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
2231 0ebf8283 2019-07-24 stsp Continue an interrupted histedit operation.
2232 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
2234 b93c7142 2021-10-01 stsp Interrupt the histedit operation for editing after merging each commit.
2235 b93c7142 2021-10-01 stsp This option is a quick equivalent to a histedit script which uses the
2237 b93c7142 2021-10-01 stsp command for all commits.
2240 b93c7142 2021-10-01 stsp option can only be used when starting a new histedit operation.
2241 b93c7142 2021-10-01 stsp If this option is used, no other command-line arguments are allowed.
2243 466785b9 2020-12-10 jrick Fold all commits into a single commit.
2244 466785b9 2020-12-10 jrick This option is a quick equivalent to a histedit script which folds all
2245 466785b9 2020-12-10 jrick commits, combining them all into one commit.
2248 2a78779e 2020-12-11 stsp option can only be used when starting a new histedit operation.
2249 466785b9 2020-12-10 jrick If this option is used, no other command-line arguments are allowed.
2250 ddbfac99 2020-02-24 stsp .It Fl F Ar histedit-script
2251 ddbfac99 2020-02-24 stsp Use the specified
2252 ddbfac99 2020-02-24 stsp .Ar histedit-script
2253 ddbfac99 2020-02-24 stsp instead of opening a temporary file in an editor where a histedit script
2254 ddbfac99 2020-02-24 stsp can be written.
2256 083957f4 2020-02-24 stsp Edit log messages only.
2257 083957f4 2020-02-24 stsp This option is a quick equivalent to a histedit script which edits
2258 2bdefe56 2020-02-24 tracey only log messages but otherwise leaves every picked commit as-is.
2261 083957f4 2020-02-24 stsp option can only be used when starting a new histedit operation.
2262 083957f4 2020-02-24 stsp If this option is used, no other command-line arguments are allowed.
2264 e600f124 2021-03-21 stsp Show a list of past histedit operations, represented by references in the
2265 e600f124 2021-03-21 stsp .Dq refs/got/backup/histedit
2266 e600f124 2021-03-21 stsp reference namespace.
2268 e600f124 2021-03-21 stsp Display the author, date, and log message of each backed up commit,
2269 e600f124 2021-03-21 stsp the object ID of the corresponding post-histedit commit, and
2270 e600f124 2021-03-21 stsp the object ID of their common ancestor commit.
2271 e600f124 2021-03-21 stsp Given these object IDs,
2273 e600f124 2021-03-21 stsp .Cm got log
2274 e600f124 2021-03-21 stsp command with the
2278 e600f124 2021-03-21 stsp options can be used to examine the history of either version of the branch,
2280 e600f124 2021-03-21 stsp .Cm got branch
2281 e600f124 2021-03-21 stsp command with the
2283 e600f124 2021-03-21 stsp option can be used to create a new branch from a pre-histedit state if desired.
2286 e600f124 2021-03-21 stsp .Ar branch
2287 e600f124 2021-03-21 stsp is specified, only show commits which at some point in time represented this
2289 e600f124 2021-03-21 stsp Otherwise, list all backed up commits for any branches.
2291 e600f124 2021-03-21 stsp If this option is used,
2292 e600f124 2021-03-21 stsp .Cm got histedit
2293 e600f124 2021-03-21 stsp does not require a work tree.
2294 e600f124 2021-03-21 stsp None of the other options can be used together with
2297 643b85bc 2021-07-16 stsp Delete backups created by past histedit operations, represented by references
2299 643b85bc 2021-07-16 stsp .Dq refs/got/backup/histedit
2300 643b85bc 2021-07-16 stsp reference namespace.
2303 643b85bc 2021-07-16 stsp .Ar branch
2304 643b85bc 2021-07-16 stsp is specified, only delete backups which at some point in time represented
2305 643b85bc 2021-07-16 stsp this branch.
2306 643b85bc 2021-07-16 stsp Otherwise, delete all references found within
2307 643b85bc 2021-07-16 stsp .Dq refs/got/backup/histedit .
2309 643b85bc 2021-07-16 stsp Any commit, tree, tag, and blob objects belonging to deleted backups
2310 643b85bc 2021-07-16 stsp remain in the repository and may be removed separately with
2311 643b85bc 2021-07-16 stsp Git's garbage collector or
2312 643b85bc 2021-07-16 stsp .Cm gotadmin cleanup .
2314 643b85bc 2021-07-16 stsp If this option is used,
2315 643b85bc 2021-07-16 stsp .Cm got histedit
2316 643b85bc 2021-07-16 stsp does not require a work tree.
2317 643b85bc 2021-07-16 stsp None of the other options can be used together with
2321 2822a352 2019-10-15 stsp .It Cm integrate Ar branch
2322 4683a10b 2021-11-04 kn .Dl Pq alias: Cm ig
2323 2822a352 2019-10-15 stsp Integrate the specified
2324 2822a352 2019-10-15 stsp .Ar branch
2325 2822a352 2019-10-15 stsp into the work tree's current branch.
2326 2822a352 2019-10-15 stsp Files in the work tree are updated to match the contents on the integrated
2327 2822a352 2019-10-15 stsp .Ar branch ,
2328 2822a352 2019-10-15 stsp and the reference of the work tree's branch is changed to point at the
2329 2822a352 2019-10-15 stsp head commit of the integrated
2330 2822a352 2019-10-15 stsp .Ar branch .
2332 2822a352 2019-10-15 stsp Both branches can be considered equivalent after integration since they
2333 2822a352 2019-10-15 stsp will be pointing at the same commit.
2334 2822a352 2019-10-15 stsp Both branches remain available for future work, if desired.
2335 2822a352 2019-10-15 stsp In case the integrated
2336 2822a352 2019-10-15 stsp .Ar branch
2337 2822a352 2019-10-15 stsp is no longer needed it may be deleted with
2338 2822a352 2019-10-15 stsp .Cm got branch -d .
2340 2822a352 2019-10-15 stsp Show the status of each affected file, using the following status codes:
2341 2822a352 2019-10-15 stsp .Bl -column YXZ description
2342 2822a352 2019-10-15 stsp .It U Ta file was updated
2343 2822a352 2019-10-15 stsp .It D Ta file was deleted
2344 2822a352 2019-10-15 stsp .It A Ta new file was added
2345 2822a352 2019-10-15 stsp .It \(a~ Ta versioned file is obstructed by a non-regular file
2346 2822a352 2019-10-15 stsp .It ! Ta a missing versioned file was restored
2349 2822a352 2019-10-15 stsp .Cm got integrate
2350 2822a352 2019-10-15 stsp will refuse to run if certain preconditions are not met.
2351 2822a352 2019-10-15 stsp Most importantly, the
2352 2822a352 2019-10-15 stsp .Ar branch
2353 2822a352 2019-10-15 stsp must have been rebased onto the work tree's current branch with
2354 2822a352 2019-10-15 stsp .Cm got rebase
2355 2822a352 2019-10-15 stsp before it can be integrated, in order to linearize commit history and
2356 2822a352 2019-10-15 stsp resolve merge conflicts.
2357 e38d4cde 2022-03-21 naddy If the work tree contains multiple base commits, it must first be updated
2358 2822a352 2019-10-15 stsp to a single base commit with
2359 2822a352 2019-10-15 stsp .Cm got update .
2360 2822a352 2019-10-15 stsp If changes have been staged with
2361 2822a352 2019-10-15 stsp .Cm got stage ,
2362 2822a352 2019-10-15 stsp these changes must first be committed with
2363 2822a352 2019-10-15 stsp .Cm got commit
2364 2822a352 2019-10-15 stsp or unstaged with
2365 2822a352 2019-10-15 stsp .Cm got unstage .
2366 2822a352 2019-10-15 stsp If the work tree contains local changes, these changes must first be
2367 2822a352 2019-10-15 stsp committed with
2368 2822a352 2019-10-15 stsp .Cm got commit
2369 2822a352 2019-10-15 stsp or reverted with
2370 2822a352 2019-10-15 stsp .Cm got revert .
2372 088449d3 2021-09-26 stsp .It Cm merge Oo Fl a Oc Oo Fl c Oc Oo Fl n Oc Op Ar branch
2373 4683a10b 2021-11-04 kn .Dl Pq alias: Cm mg
2374 f259c4c1 2021-09-24 stsp Create a merge commit based on the current branch of the work tree and
2375 f259c4c1 2021-09-24 stsp the specified
2376 f259c4c1 2021-09-24 stsp .Ar branch .
2377 f259c4c1 2021-09-24 stsp If a linear project history is desired, then use of
2378 f259c4c1 2021-09-24 stsp .Cm got rebase
2379 f259c4c1 2021-09-24 stsp should be preferred over
2380 f259c4c1 2021-09-24 stsp .Cm got merge .
2381 f259c4c1 2021-09-24 stsp However, even strictly linear projects may require merge commits in order
2382 4e91ef15 2021-09-26 stsp to merge in new versions of third-party code stored on vendor branches
2383 4e91ef15 2021-09-26 stsp created with
2384 4e91ef15 2021-09-26 stsp .Cm got import .
2386 f259c4c1 2021-09-24 stsp Merge commits are commits based on multiple parent commits.
2387 f259c4c1 2021-09-24 stsp The tip commit of the work tree's current branch, which must be set with
2388 f259c4c1 2021-09-24 stsp .Cm got update -b
2389 f259c4c1 2021-09-24 stsp before starting the
2391 f259c4c1 2021-09-24 stsp operation, will be used as the first parent.
2392 f259c4c1 2021-09-24 stsp The tip commit of the specified
2393 f259c4c1 2021-09-24 stsp .Ar branch
2394 f259c4c1 2021-09-24 stsp will be used as the second parent.
2396 4e91ef15 2021-09-26 stsp No ancestral relationship between the two branches is required.
2397 4e91ef15 2021-09-26 stsp If the two branches have already been merged previously, only new changes
2398 4e91ef15 2021-09-26 stsp will be merged.
2400 f259c4c1 2021-09-24 stsp It is not possible to create merge commits with more than two parents.
2401 f259c4c1 2021-09-24 stsp If more than one branch needs to be merged, then multiple merge commits
2402 f259c4c1 2021-09-24 stsp with two parents each can be created in sequence.
2404 f259c4c1 2021-09-24 stsp While merging changes found on the
2405 f259c4c1 2021-09-24 stsp .Ar branch
2406 f259c4c1 2021-09-24 stsp into the work tree, show the status of each affected file,
2407 f259c4c1 2021-09-24 stsp using the following status codes:
2408 f259c4c1 2021-09-24 stsp .Bl -column YXZ description
2409 f259c4c1 2021-09-24 stsp .It G Ta file was merged
2410 f259c4c1 2021-09-24 stsp .It C Ta file was merged and conflicts occurred during merge
2411 f259c4c1 2021-09-24 stsp .It ! Ta changes destined for a missing file were not merged
2412 f259c4c1 2021-09-24 stsp .It D Ta file was deleted
2413 f365d762 2021-09-24 stsp .It d Ta file's deletion was prevented by local modifications
2414 f259c4c1 2021-09-24 stsp .It A Ta new file was added
2415 f259c4c1 2021-09-24 stsp .It \(a~ Ta changes destined for a non-regular file were not merged
2416 f259c4c1 2021-09-24 stsp .It ? Ta changes destined for an unversioned file were not merged
2419 f259c4c1 2021-09-24 stsp If merge conflicts occur, the merge operation is interrupted and conflicts
2420 f259c4c1 2021-09-24 stsp must be resolved before the merge operation can continue.
2421 606719cd 2021-09-28 stsp If any files with destined changes are found to be missing or unversioned,
2422 606719cd 2021-09-28 stsp or if files could not be deleted due to differences in deleted content,
2423 f259c4c1 2021-09-24 stsp the merge operation will be interrupted to prevent potentially incomplete
2424 f259c4c1 2021-09-24 stsp changes from being committed to the repository without user intervention.
2425 f259c4c1 2021-09-24 stsp The work tree may be modified as desired and the merge can be continued
2426 f259c4c1 2021-09-24 stsp once the changes present in the work tree are considered complete.
2427 f259c4c1 2021-09-24 stsp Alternatively, the merge operation may be aborted which will leave
2428 f259c4c1 2021-09-24 stsp the work tree's current branch unmodified.
2430 f259c4c1 2021-09-24 stsp If a merge conflict is resolved in a way which renders all merged
2431 f259c4c1 2021-09-24 stsp changes into no-op changes, the merge operation cannot continue
2432 f259c4c1 2021-09-24 stsp and must be aborted.
2434 f259c4c1 2021-09-24 stsp .Cm got merge
2435 f259c4c1 2021-09-24 stsp will refuse to run if certain preconditions are not met.
2436 f259c4c1 2021-09-24 stsp If history of the
2437 f259c4c1 2021-09-24 stsp .Ar branch
2438 f259c4c1 2021-09-24 stsp is based on the work tree's current branch, then no merge commit can
2439 f259c4c1 2021-09-24 stsp be created and
2440 f259c4c1 2021-09-24 stsp .Cm got integrate
2441 f259c4c1 2021-09-24 stsp may be used to integrate the
2442 f259c4c1 2021-09-24 stsp .Ar branch
2444 f259c4c1 2021-09-24 stsp If the work tree is not yet fully updated to the tip commit of its
2445 f259c4c1 2021-09-24 stsp branch, then the work tree must first be updated with
2446 f259c4c1 2021-09-24 stsp .Cm got update .
2447 e38d4cde 2022-03-21 naddy If the work tree contains multiple base commits, it must first be updated
2448 f259c4c1 2021-09-24 stsp to a single base commit with
2449 f259c4c1 2021-09-24 stsp .Cm got update .
2450 f259c4c1 2021-09-24 stsp If changes have been staged with
2451 f259c4c1 2021-09-24 stsp .Cm got stage ,
2452 f259c4c1 2021-09-24 stsp these changes must first be committed with
2453 f259c4c1 2021-09-24 stsp .Cm got commit
2454 f259c4c1 2021-09-24 stsp or unstaged with
2455 f259c4c1 2021-09-24 stsp .Cm got unstage .
2456 f259c4c1 2021-09-24 stsp If the work tree contains local changes, these changes must first be
2457 f259c4c1 2021-09-24 stsp committed with
2458 f259c4c1 2021-09-24 stsp .Cm got commit
2459 f259c4c1 2021-09-24 stsp or reverted with
2460 f259c4c1 2021-09-24 stsp .Cm got revert .
2462 f259c4c1 2021-09-24 stsp .Ar branch
2463 f259c4c1 2021-09-24 stsp contains changes to files outside of the work tree's path prefix,
2464 f259c4c1 2021-09-24 stsp the work tree cannot be used to merge this branch.
2467 f259c4c1 2021-09-24 stsp .Cm got update ,
2468 f259c4c1 2021-09-24 stsp .Cm got commit ,
2469 f259c4c1 2021-09-24 stsp .Cm got rebase ,
2470 90e6e620 2021-10-04 kn .Cm got histedit ,
2471 f259c4c1 2021-09-24 stsp .Cm got integrate ,
2473 f259c4c1 2021-09-24 stsp .Cm got stage
2474 f259c4c1 2021-09-24 stsp commands will refuse to run while a merge operation is in progress.
2475 f259c4c1 2021-09-24 stsp Other commands which manipulate the work tree may be used for
2476 f259c4c1 2021-09-24 stsp conflict resolution purposes.
2478 f259c4c1 2021-09-24 stsp The options for
2479 f259c4c1 2021-09-24 stsp .Cm got merge
2480 f259c4c1 2021-09-24 stsp are as follows:
2481 f259c4c1 2021-09-24 stsp .Bl -tag -width Ds
2483 f259c4c1 2021-09-24 stsp Abort an interrupted merge operation.
2484 f259c4c1 2021-09-24 stsp If this option is used, no other command-line arguments are allowed.
2486 f259c4c1 2021-09-24 stsp Continue an interrupted merge operation.
2487 f259c4c1 2021-09-24 stsp If this option is used, no other command-line arguments are allowed.
2489 088449d3 2021-09-26 stsp Merge changes into the work tree as usual but do not create a merge
2490 088449d3 2021-09-26 stsp commit immediately.
2491 088449d3 2021-09-26 stsp The merge result can be adjusted as desired before a merge commit is
2492 088449d3 2021-09-26 stsp created with
2493 088449d3 2021-09-26 stsp .Cm got merge -c .
2494 088449d3 2021-09-26 stsp Alternatively, the merge may be aborted with
2495 088449d3 2021-09-26 stsp .Cm got merge -a .
2498 35213c7c 2020-07-23 stsp .It Cm stage Oo Fl l Oc Oo Fl p Oc Oo Fl F Ar response-script Oc Oo Fl S Oc Op Ar path ...
2499 4683a10b 2021-11-04 kn .Dl Pq alias: Cm sg
2500 2db2652d 2019-08-07 stsp Stage local changes for inclusion in the next commit.
2503 2db2652d 2019-08-07 stsp is specified, stage all changes in the work tree.
2504 2db2652d 2019-08-07 stsp Otherwise, stage changes at or within the specified paths.
2505 4ed9f614 2019-08-04 stsp Paths may be staged if they are added, modified, or deleted according to
2506 4ed9f614 2019-08-04 stsp .Cm got status .
2508 9d8b19a4 2019-08-04 stsp Show the status of each affected file, using the following status codes:
2509 9d8b19a4 2019-08-04 stsp .Bl -column YXZ description
2510 9d8b19a4 2019-08-04 stsp .It A Ta file addition has been staged
2511 9d8b19a4 2019-08-04 stsp .It M Ta file modification has been staged
2512 9d8b19a4 2019-08-04 stsp .It D Ta file deletion has been staged
2515 9d8b19a4 2019-08-04 stsp Staged file contents are saved in newly created blob objects in the repository.
2516 52c8d4ac 2019-08-04 stsp These blobs will be referred to by tree objects once staged changes have been
2517 9d8b19a4 2019-08-04 stsp committed.
2519 890ea719 2019-08-04 stsp Staged changes affect the behaviour of
2520 4ed9f614 2019-08-04 stsp .Cm got commit ,
2521 4ed9f614 2019-08-04 stsp .Cm got status ,
2523 4ed9f614 2019-08-04 stsp .Cm got diff .
2524 4ed9f614 2019-08-04 stsp While paths with staged changes exist, the
2525 4ed9f614 2019-08-04 stsp .Cm got commit
2526 4ed9f614 2019-08-04 stsp command will refuse to commit any paths which do not have staged changes.
2527 4ed9f614 2019-08-04 stsp Local changes created on top of staged changes can only be committed if
2528 4ed9f614 2019-08-04 stsp the path is staged again, or if the staged changes are committed first.
2530 4ed9f614 2019-08-04 stsp .Cm got status
2531 4ed9f614 2019-08-04 stsp command will show both local changes and staged changes.
2533 4ed9f614 2019-08-04 stsp .Cm got diff
2534 ecf14362 2019-08-04 stsp command is able to display local changes relative to staged changes,
2535 ecf14362 2019-08-04 stsp and to display staged changes relative to the repository.
2537 4ed9f614 2019-08-04 stsp .Cm got revert
2538 4ed9f614 2019-08-04 stsp command cannot revert staged changes but may be used to revert
2539 4f2494e6 2019-08-08 stsp local changes created on top of staged changes.
2541 4ed9f614 2019-08-04 stsp The options for
2542 4ed9f614 2019-08-04 stsp .Cm got stage
2543 4ed9f614 2019-08-04 stsp are as follows:
2544 4ed9f614 2019-08-04 stsp .Bl -tag -width Ds
2546 4ed9f614 2019-08-04 stsp Instead of staging new changes, list paths which are already staged,
2547 9d8b19a4 2019-08-04 stsp along with the IDs of staged blob objects and stage status codes.
2548 e38d4cde 2022-03-21 naddy If paths were provided on the command line, show the staged paths
2549 1dd86744 2019-08-12 anthony among the specified paths.
2550 1dd86744 2019-08-12 anthony Otherwise, show all staged paths.
2552 dc424a06 2019-08-07 stsp Instead of staging the entire content of a changed file, interactively
2553 dc424a06 2019-08-07 stsp select or reject changes for staging based on
2555 6d23ec10 2019-08-08 stsp (stage change),
2557 6d23ec10 2019-08-08 stsp (reject change), and
2559 6d23ec10 2019-08-08 stsp (quit staging this file) responses.
2560 dc424a06 2019-08-07 stsp If a file is in modified status, individual patches derived from the
2561 dc424a06 2019-08-07 stsp modified file content can be staged.
2562 6d23ec10 2019-08-08 stsp Files in added or deleted status may only be staged or rejected in
2563 6d23ec10 2019-08-08 stsp their entirety.
2564 3a070a2b 2019-08-07 stsp .It Fl F Ar response-script
2567 3a070a2b 2019-08-07 stsp option, read
2572 0e2f5884 2019-08-07 stsp responses line-by-line from the specified
2573 0e2f5884 2019-08-07 stsp .Ar response-script
2574 0e2f5884 2019-08-07 stsp file instead of prompting interactively.
2576 af358f55 2020-07-23 stsp Allow staging of symbolic links which point outside of the path space
2577 af358f55 2020-07-23 stsp that is under version control.
2578 af358f55 2020-07-23 stsp By default,
2579 af358f55 2020-07-23 stsp .Cm got stage
2580 af358f55 2020-07-23 stsp will reject such symbolic links due to safety concerns.
2581 35213c7c 2020-07-23 stsp As a precaution,
2583 af358f55 2020-07-23 stsp may decide to represent such a symbolic link as a regular file which contains
2584 af358f55 2020-07-23 stsp the link's target path, rather than creating an actual symbolic link which
2585 af358f55 2020-07-23 stsp points outside of the work tree.
2586 af358f55 2020-07-23 stsp Use of this option is discouraged because external mechanisms such as
2587 af358f55 2020-07-23 stsp .Dq make obj
2588 af358f55 2020-07-23 stsp are better suited for managing symbolic links to paths not under
2589 af358f55 2020-07-23 stsp version control.
2592 4ed9f614 2019-08-04 stsp .Cm got stage
2593 4ed9f614 2019-08-04 stsp will refuse to run if certain preconditions are not met.
2594 4ed9f614 2019-08-04 stsp If a file contains merge conflicts, these conflicts must be resolved first.
2595 4ed9f614 2019-08-04 stsp If a file is found to be out of date relative to the head commit on the
2596 4ed9f614 2019-08-04 stsp work tree's current branch, the file must be updated with
2597 4ed9f614 2019-08-04 stsp .Cm got update
2598 4ed9f614 2019-08-04 stsp before it can be staged (however, this does not prevent the file from
2599 4ed9f614 2019-08-04 stsp becoming out-of-date at some point after having been staged).
2602 4ed9f614 2019-08-04 stsp .Cm got update ,
2603 4ed9f614 2019-08-04 stsp .Cm got rebase ,
2605 4ed9f614 2019-08-04 stsp .Cm got histedit
2606 4ed9f614 2019-08-04 stsp commands will refuse to run while staged changes exist.
2607 4ed9f614 2019-08-04 stsp If staged changes cannot be committed because a staged path
2608 4ed9f614 2019-08-04 stsp is out of date, the path must be unstaged with
2609 4ed9f614 2019-08-04 stsp .Cm got unstage
2610 4ed9f614 2019-08-04 stsp before it can be updated with
2611 4ed9f614 2019-08-04 stsp .Cm got update ,
2612 4ed9f614 2019-08-04 stsp and may then be staged again if necessary.
2614 dfc23429 2019-08-11 stsp .It Cm unstage Oo Fl p Oc Oo Fl F Ar response-script Oc Op Ar path ...
2615 4683a10b 2021-11-04 kn .Dl Pq alias: Cm ug
2616 4ed9f614 2019-08-04 stsp Merge staged changes back into the work tree and put affected paths
2617 4ed9f614 2019-08-04 stsp back into non-staged status.
2620 4ed9f614 2019-08-04 stsp is specified, unstage all staged changes across the entire work tree.
2621 2db2652d 2019-08-07 stsp Otherwise, unstage changes at or within the specified paths.
2623 4ed9f614 2019-08-04 stsp Show the status of each affected file, using the following status codes:
2624 4ed9f614 2019-08-04 stsp .Bl -column YXZ description
2625 4ed9f614 2019-08-04 stsp .It G Ta file was unstaged
2626 4ed9f614 2019-08-04 stsp .It C Ta file was unstaged and conflicts occurred during merge
2627 4ed9f614 2019-08-04 stsp .It ! Ta changes destined for a missing file were not merged
2628 4ed9f614 2019-08-04 stsp .It D Ta file was staged as deleted and still is deleted
2629 f365d762 2021-09-24 stsp .It d Ta file's deletion was prevented by local modifications
2630 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
2633 2e1f37b0 2019-08-08 stsp The options for
2634 2e1f37b0 2019-08-08 stsp .Cm got unstage
2635 2e1f37b0 2019-08-08 stsp are as follows:
2636 2e1f37b0 2019-08-08 stsp .Bl -tag -width Ds
2638 2e1f37b0 2019-08-08 stsp Instead of unstaging the entire content of a changed file, interactively
2639 2e1f37b0 2019-08-08 stsp select or reject changes for unstaging based on
2641 2e1f37b0 2019-08-08 stsp (unstage change),
2643 2e1f37b0 2019-08-08 stsp (keep change staged), and
2645 2e1f37b0 2019-08-08 stsp (quit unstaging this file) responses.
2646 2e1f37b0 2019-08-08 stsp If a file is staged in modified status, individual patches derived from the
2647 2e1f37b0 2019-08-08 stsp staged file content can be unstaged.
2648 2e1f37b0 2019-08-08 stsp Files staged in added or deleted status may only be unstaged in their entirety.
2649 2e1f37b0 2019-08-08 stsp .It Fl F Ar response-script
2652 2e1f37b0 2019-08-08 stsp option, read
2657 2e1f37b0 2019-08-08 stsp responses line-by-line from the specified
2658 2e1f37b0 2019-08-08 stsp .Ar response-script
2659 2e1f37b0 2019-08-08 stsp file instead of prompting interactively.
2661 5be72254 2019-08-26 stsp .It Cm cat Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Oo Fl P Oc Ar arg ...
2662 896e9b6f 2019-08-26 stsp Parse and print contents of objects to standard output in a line-based
2663 896e9b6f 2019-08-26 stsp text format.
2664 896e9b6f 2019-08-26 stsp Content of commit, tree, and tag objects is printed in a way similar
2665 896e9b6f 2019-08-26 stsp to the actual content stored in such objects.
2666 896e9b6f 2019-08-26 stsp Blob object contents are printed as they would appear in files on disk.
2668 896e9b6f 2019-08-26 stsp Attempt to interpret each argument as a reference, a tag name, or
2669 896e9b6f 2019-08-26 stsp an object ID SHA1 hash.
2670 01073a5d 2019-08-22 stsp References will be resolved to an object ID.
2671 01073a5d 2019-08-22 stsp Tag names will resolved to a tag object.
2672 01073a5d 2019-08-22 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
2673 01073a5d 2019-08-22 stsp automatically, provided the abbreviation is unique.
2675 896e9b6f 2019-08-26 stsp If none of the above interpretations produce a valid result, or if the
2677 896e9b6f 2019-08-26 stsp option is used, attempt to interpret the argument as a path which will
2678 896e9b6f 2019-08-26 stsp be resolved to the ID of an object found at this path in the repository.
2680 01073a5d 2019-08-22 stsp The options for
2681 01073a5d 2019-08-22 stsp .Cm got cat
2682 01073a5d 2019-08-22 stsp are as follows:
2683 01073a5d 2019-08-22 stsp .Bl -tag -width Ds
2684 896e9b6f 2019-08-26 stsp .It Fl c Ar commit
2685 896e9b6f 2019-08-26 stsp Look up paths in the specified
2686 896e9b6f 2019-08-26 stsp .Ar commit .
2687 896e9b6f 2019-08-26 stsp If this option is not used, paths are looked up in the commit resolved
2688 896e9b6f 2019-08-26 stsp via the repository's HEAD reference.
2689 896e9b6f 2019-08-26 stsp The expected argument is a commit ID SHA1 hash or an existing reference
2690 896e9b6f 2019-08-26 stsp or tag name which will be resolved to a commit ID.
2691 896e9b6f 2019-08-26 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
2692 896e9b6f 2019-08-26 stsp automatically, provided the abbreviation is unique.
2693 01073a5d 2019-08-22 stsp .It Fl r Ar repository-path
2694 01073a5d 2019-08-22 stsp Use the repository at the specified path.
2695 01073a5d 2019-08-22 stsp If not specified, assume the repository is located at or above the current
2696 01073a5d 2019-08-22 stsp working directory.
2697 01073a5d 2019-08-22 stsp If this directory is a
2699 01073a5d 2019-08-22 stsp work tree, use the repository path associated with this work tree.
2701 896e9b6f 2019-08-26 stsp Interpret all arguments as paths only.
2702 896e9b6f 2019-08-26 stsp This option can be used to resolve ambiguity in cases where paths
2703 896e9b6f 2019-08-26 stsp look like tag names, reference names, or object IDs.
2705 b2118c49 2020-07-28 stsp .It Cm info Op Ar path ...
2706 b2118c49 2020-07-28 stsp Display meta-data stored in a work tree.
2708 b2118c49 2020-07-28 stsp .Xr got-worktree 5
2709 b2118c49 2020-07-28 stsp for details.
2711 b2118c49 2020-07-28 stsp The work tree to use is resolved implicitly by walking upwards from the
2712 b2118c49 2020-07-28 stsp current working directory.
2714 b2118c49 2020-07-28 stsp If one or more
2716 b2118c49 2020-07-28 stsp arguments are specified, show additional per-file information for tracked
2717 b2118c49 2020-07-28 stsp files located at or within these paths.
2720 b2118c49 2020-07-28 stsp argument corresponds to the work tree's root directory, display information
2721 b2118c49 2020-07-28 stsp for all tracked files.
2723 74416c47 2019-05-09 stsp .Sh ENVIRONMENT
2724 74416c47 2019-05-09 stsp .Bl -tag -width GOT_AUTHOR
2725 74416c47 2019-05-09 stsp .It Ev GOT_AUTHOR
2726 74416c47 2019-05-09 stsp The author's name and email address for
2727 21a44f98 2019-07-15 stsp .Cm got commit
2729 21a44f98 2019-07-15 stsp .Cm got import ,
2730 74416c47 2019-05-09 stsp for example:
2731 aba9c984 2019-09-08 stsp .Dq An Flan Hacker Aq Mt flan_hacker@openbsd.org .
2734 84792843 2019-08-09 stsp may fail to parse commits without an email address in author data,
2736 84792843 2019-08-09 stsp attempts to reject
2737 0e444aba 2019-08-08 stsp .Ev GOT_AUTHOR
2738 84792843 2019-08-09 stsp environment variables with a missing email address.
2740 93a300b2 2021-08-26 stsp .Ev GOT_AUTHOR will be overridden by configuration settings in
2741 50b0790e 2020-09-11 stsp .Xr got.conf 5
2742 50b0790e 2020-09-11 stsp or by Git's
2743 aba9c984 2019-09-08 stsp .Dv user.name
2745 709ae9eb 2019-09-08 stsp .Dv user.email
2746 709ae9eb 2019-09-08 stsp configuration settings in the repository's
2747 aba9c984 2019-09-08 stsp .Pa .git/config
2750 c9956ddf 2019-09-08 stsp .Dv user.name
2752 c9956ddf 2019-09-08 stsp .Dv user.email
2753 c9956ddf 2019-09-08 stsp configuration settings contained in Git's global
2754 c9956ddf 2019-09-08 stsp .Pa ~/.gitconfig
2755 257add31 2020-09-09 stsp configuration file will only be used if neither
2756 257add31 2020-09-09 stsp .Xr got.conf 5
2758 c9956ddf 2019-09-08 stsp .Ev GOT_AUTHOR
2759 257add31 2020-09-09 stsp environment variable provide author information.
2760 1dd86744 2019-08-12 anthony .It Ev VISUAL , EDITOR
2761 23594da9 2019-05-13 stsp The editor spawned by
2762 8e7bd50a 2019-08-22 stsp .Cm got commit ,
2763 46215d2a 2020-09-11 stsp .Cm got histedit ,
2764 8e7bd50a 2019-08-22 stsp .Cm got import ,
2766 8e7bd50a 2019-08-22 stsp .Cm got tag .
2767 5b735925 2020-09-15 stsp If not set, the
2769 5b735925 2020-09-15 stsp text editor will be spawned in order to give
2771 5b735925 2020-09-15 stsp the attention it deserves.
2772 b1ebc001 2019-08-13 stsp .It Ev GOT_LOG_DEFAULT_LIMIT
2773 b1ebc001 2019-08-13 stsp The default limit on the number of commits traversed by
2774 b1ebc001 2019-08-13 stsp .Cm got log .
2775 b1ebc001 2019-08-13 stsp If set to zero, the limit is unbounded.
2776 b1ebc001 2019-08-13 stsp This variable will be silently ignored if it is set to a non-numeric value.
2779 257add31 2020-09-09 stsp .Bl -tag -width packed-refs -compact
2780 257add31 2020-09-09 stsp .It Pa got.conf
2781 257add31 2020-09-09 stsp Repository-wide configuration settings for
2783 50b0790e 2020-09-11 stsp If present, a
2784 50b0790e 2020-09-11 stsp .Xr got.conf 5
2785 50b0790e 2020-09-11 stsp configuration file located in the root directory of a Git repository
2786 50b0790e 2020-09-11 stsp supersedes any relevant settings in Git's
2787 257add31 2020-09-09 stsp .Pa config
2790 50b0790e 2020-09-11 stsp .It Pa .got/got.conf
2791 50b0790e 2020-09-11 stsp Worktree-specific configuration settings for
2793 50b0790e 2020-09-11 stsp If present, a
2794 1795b260 2021-04-02 kn .Xr got.conf 5
2795 50b0790e 2020-09-11 stsp configuration file in the
2797 50b0790e 2020-09-11 stsp meta-data directory of a work tree supersedes any relevant settings in
2798 50b0790e 2020-09-11 stsp the repository's
2799 50b0790e 2020-09-11 stsp .Xr got.conf 5
2800 50b0790e 2020-09-11 stsp configuration file and Git's
2801 50b0790e 2020-09-11 stsp .Pa config
2804 5c860e29 2018-03-12 stsp .Sh EXIT STATUS
2805 5c860e29 2018-03-12 stsp .Ex -std got
2806 97925469 2018-03-17 stsp .Sh EXAMPLES
2807 43e4eb1b 2021-08-29 stsp Enable tab-completion of
2809 43e4eb1b 2021-08-29 stsp command names in
2810 43e4eb1b 2021-08-29 stsp .Xr ksh 1 :
2812 e1d27370 2021-09-01 stsp .Dl $ set -A complete_got_1 -- $(got -h 2>&1 | sed -n s/commands://p)
2814 fa6e0e48 2019-05-23 stsp Clone an existing Git repository for use with
2817 fd039d72 2020-03-18 stsp .Dl $ cd /var/git/
2818 fd039d72 2020-03-18 stsp .Dl $ got clone ssh://git@github.com/openbsd/src.git
2820 fd039d72 2020-03-18 stsp Use of HTTP URLs currently requires
2821 fa6e0e48 2019-05-23 stsp .Xr git 1 :
2823 fa6e0e48 2019-05-23 stsp .Dl $ cd /var/git/
2824 fa6e0e48 2019-05-23 stsp .Dl $ git clone --bare https://github.com/openbsd/src.git
2826 3ce1b845 2019-07-15 stsp Alternatively, for quick and dirty local testing of
2828 3ce1b845 2019-07-15 stsp a new Git repository could be created and populated with files,
2829 3ce1b845 2019-07-15 stsp e.g. from a temporary CVS checkout located at
2830 3ce1b845 2019-07-15 stsp .Pa /tmp/src :
2832 02a5c5d0 2022-07-04 stsp .Dl $ gotadmin init /var/git/src.git
2833 2930ef13 2019-07-15 stsp .Dl $ got import -r /var/git/src.git -I CVS -I obj /tmp/src
2835 3ce1b845 2019-07-15 stsp Check out a work tree from the Git repository to /usr/src:
2837 fa6e0e48 2019-05-23 stsp .Dl $ got checkout /var/git/src.git /usr/src
2839 e70c17ce 2019-05-22 stsp View local changes in a work tree directory:
2841 e70c17ce 2019-05-22 stsp .Dl $ got diff | less
2843 081470ac 2020-08-13 stsp In a work tree, display files in a potentially problematic state:
2845 081470ac 2020-08-13 stsp .Dl $ got status -s 'C!~?'
2847 33aa809d 2019-08-08 stsp Interactively revert selected local changes in a work tree directory:
2849 33aa809d 2019-08-08 stsp .Dl $ got revert -p -R\ .
2851 e70c17ce 2019-05-22 stsp In a work tree or a git repository directory, list all branch references:
2853 4e759de4 2019-06-26 stsp .Dl $ got branch -l
2855 fa6e0e48 2019-05-23 stsp In a work tree or a git repository directory, create a new branch called
2856 e70c17ce 2019-05-22 stsp .Dq unified-buffer-cache
2857 d83d9d5c 2019-05-13 stsp which is forked off the
2858 d83d9d5c 2019-05-13 stsp .Dq master
2861 7b4f1fcb 2021-01-27 stsp .Dl $ got branch -c master unified-buffer-cache
2863 e70c17ce 2019-05-22 stsp Switch an existing work tree to the branch
2864 e70c17ce 2019-05-22 stsp .Dq unified-buffer-cache .
2865 e70c17ce 2019-05-22 stsp Local changes in the work tree will be preserved and merged if necessary:
2867 e70c17ce 2019-05-22 stsp .Dl $ got update -b unified-buffer-cache
2869 fa6e0e48 2019-05-23 stsp Create a new commit from local changes in a work tree directory.
2870 fa6e0e48 2019-05-23 stsp This new commit will become the head commit of the work tree's current branch:
2872 fa6e0e48 2019-05-23 stsp .Dl $ got commit
2874 fa6e0e48 2019-05-23 stsp In a work tree or a git repository directory, view changes committed in
2875 fa6e0e48 2019-05-23 stsp the 3 most recent commits to the work tree's branch, or the branch resolved
2876 fa6e0e48 2019-05-23 stsp via the repository's HEAD reference, respectively:
2878 48c8c60d 2020-01-27 stsp .Dl $ got log -p -l 3
2880 3d0ac559 2020-04-18 stsp As above, but display changes in the order in which
2881 04e9dcf3 2020-04-18 stsp .Xr patch 1
2882 04e9dcf3 2020-04-18 stsp could apply them in sequence:
2884 04e9dcf3 2020-04-18 stsp .Dl $ got log -p -l 3 -R
2886 5b666081 2020-02-24 stsp In a work tree or a git repository directory, log the history of a subdirectory:
2888 5b666081 2020-02-24 stsp .Dl $ got log sys/uvm
2890 5b666081 2020-02-24 stsp While operating inside a work tree, paths are specified relative to the current
2891 5b666081 2020-02-24 stsp working directory, so this command will log the subdirectory
2892 5b666081 2020-02-24 stsp .Pa sys/uvm :
2894 cf07f22b 2020-07-25 stsp .Dl $ cd sys/uvm && got log\ .
2896 5b666081 2020-02-24 stsp And this command has the same effect:
2898 5b666081 2020-02-24 stsp .Dl $ cd sys/dev/usb && got log ../../uvm
2900 b2118c49 2020-07-28 stsp And this command displays work tree meta-data about all tracked files:
2902 b2118c49 2020-07-28 stsp .Dl $ cd /usr/src
2903 b2118c49 2020-07-28 stsp .Dl $ got info\ . | less
2905 e70c17ce 2019-05-22 stsp Add new files and remove obsolete files in a work tree directory:
2907 fa6e0e48 2019-05-23 stsp .Dl $ got add sys/uvm/uvm_ubc.c
2908 86d25a1b 2019-07-11 stsp .Dl $ got remove sys/uvm/uvm_vnode.c
2910 e70c17ce 2019-05-22 stsp Create a new commit from local changes in a work tree directory
2911 e70c17ce 2019-05-22 stsp with a pre-defined log message.
2913 e70c17ce 2019-05-22 stsp .Dl $ got commit -m 'unify the buffer cache'
2915 bcbc2272 2020-05-20 stsp Alternatively, create a new commit from local changes in a work tree
2916 bcbc2272 2020-05-20 stsp directory with a log message that has been prepared in the file
2917 1795b260 2021-04-02 kn .Pa /tmp/msg :
2919 28cf319f 2021-01-28 stsp .Dl $ got commit -F /tmp/msg
2921 95fc3404 2019-07-15 stsp Update any work tree checked out from the
2922 95fc3404 2019-07-15 stsp .Dq unified-buffer-cache
2923 95fc3404 2019-07-15 stsp branch to the latest commit on this branch:
2925 95fc3404 2019-07-15 stsp .Dl $ got update
2927 c991308a 2019-07-15 stsp Roll file content on the unified-buffer-cache branch back by one commit,
2928 c991308a 2019-07-15 stsp and then fetch the rolled-back change into the work tree as a local change
2929 ac90e726 2019-07-15 stsp to be amended and perhaps committed again:
2931 ac90e726 2019-07-15 stsp .Dl $ got backout unified-buffer-cache
2932 ac90e726 2019-07-15 stsp .Dl $ got commit -m 'roll back previous'
2933 59d52b88 2019-07-15 stsp .Dl $ # now back out the previous backout :-)
2934 ac90e726 2019-07-15 stsp .Dl $ got backout unified-buffer-cache
2936 a099809f 2021-08-27 stsp Fetch new changes on the remote repository's
2937 a099809f 2021-08-27 stsp .Dq master
2938 a099809f 2021-08-27 stsp branch, making them visible on the local repository's
2939 469dd726 2020-03-20 stsp .Dq origin/master
2942 469dd726 2020-03-20 stsp .Dl $ cd /usr/src
2943 469dd726 2020-03-20 stsp .Dl $ got fetch
2945 469dd726 2020-03-20 stsp In a repository created with a HTTP URL and
2946 469dd726 2020-03-20 stsp .Cm git clone --bare
2948 469dd726 2020-03-20 stsp .Xr git-fetch 1
2949 469dd726 2020-03-20 stsp command must be used instead:
2951 fa6e0e48 2019-05-23 stsp .Dl $ cd /var/git/src.git
2952 469dd726 2020-03-20 stsp .Dl $ git fetch origin master:refs/remotes/origin/master
2954 469dd726 2020-03-20 stsp Rebase the local
2955 469dd726 2020-03-20 stsp .Dq master
2956 469dd726 2020-03-20 stsp branch to merge the new changes that are now visible on the
2957 469dd726 2020-03-20 stsp .Dq origin/master
2960 469dd726 2020-03-20 stsp .Dl $ cd /usr/src
2961 469dd726 2020-03-20 stsp .Dl $ got update -b origin/master
2962 469dd726 2020-03-20 stsp .Dl $ got rebase master
2964 fa6e0e48 2019-05-23 stsp Rebase the
2965 fa6e0e48 2019-05-23 stsp .Dq unified-buffer-cache
2966 fa6e0e48 2019-05-23 stsp branch on top of the new head commit of the
2967 fa6e0e48 2019-05-23 stsp .Dq master
2970 818c7501 2019-07-11 stsp .Dl $ got update -b master
2971 818c7501 2019-07-11 stsp .Dl $ got rebase unified-buffer-cache
2973 7d7ffedb 2019-07-14 stsp Create a patch from all changes on the unified-buffer-cache branch.
2974 1dd86744 2019-08-12 anthony The patch can be mailed out for review and applied to
2975 1dd86744 2019-08-12 anthony .Ox Ns 's
2976 1dd86744 2019-08-12 anthony CVS tree:
2978 7d7ffedb 2019-07-14 stsp .Dl $ got diff master unified-buffer-cache > /tmp/ubc.diff
2980 0ebf8283 2019-07-24 stsp Edit the entire commit history of the
2981 0ebf8283 2019-07-24 stsp .Dq unified-buffer-cache
2984 0ebf8283 2019-07-24 stsp .Dl $ got update -b unified-buffer-cache
2985 0ebf8283 2019-07-24 stsp .Dl $ got update -c master
2986 0ebf8283 2019-07-24 stsp .Dl $ got histedit
2988 ff2cf171 2019-07-28 stsp Before working against existing branches in a repository cloned with
2989 469dd726 2020-03-20 stsp .Cm git clone --bare
2990 7848a0e1 2020-03-19 stsp instead of
2991 7848a0e1 2020-03-19 stsp .Cm got clone ,
2993 ff2cf171 2019-07-28 stsp .Dq refspec
2994 ff2cf171 2019-07-28 stsp must be configured to map all references in the remote repository
2996 ff2cf171 2019-07-28 stsp .Dq refs/remotes
2997 ff2cf171 2019-07-28 stsp namespace of the local repository.
2998 1795b260 2021-04-02 kn This can be achieved by setting Git's
2999 ff2cf171 2019-07-28 stsp .Pa remote.origin.fetch
3000 ff2cf171 2019-07-28 stsp configuration variable to the value
3001 ff2cf171 2019-07-28 stsp .Dq +refs/heads/*:refs/remotes/origin/*
3003 ff2cf171 2019-07-28 stsp .Cm git config
3006 ff2cf171 2019-07-28 stsp .Dl $ cd /var/git/repo
3007 ff2cf171 2019-07-28 stsp .Dl $ git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
3009 469dd726 2020-03-20 stsp Additionally, the
3010 469dd726 2020-03-20 stsp .Dq mirror
3011 469dd726 2020-03-20 stsp option must be disabled:
3013 469dd726 2020-03-20 stsp .Dl $ cd /var/git/repo
3014 469dd726 2020-03-20 stsp .Dl $ git config remote.origin.mirror false
3016 ff2cf171 2019-07-28 stsp Alternatively, the following
3017 469dd726 2020-03-20 stsp .Xr git-fetch 1
3018 ff2cf171 2019-07-28 stsp configuration item can be added manually to the Git repository's
3019 ff2cf171 2019-07-28 stsp .Pa config
3022 91c82228 2021-04-18 stsp .Dl [remote \&"origin\&"]
3023 ff2cf171 2019-07-28 stsp .Dl url = ...
3024 ff2cf171 2019-07-28 stsp .Dl fetch = +refs/heads/*:refs/remotes/origin/*
3025 469dd726 2020-03-20 stsp .Dl mirror = false
3027 fe307c9b 2019-07-28 stsp This configuration leaves the local repository's
3028 ff2cf171 2019-07-28 stsp .Dq refs/heads
3029 ff2cf171 2019-07-28 stsp namespace free for use by local branches checked out with
3030 ff2cf171 2019-07-28 stsp .Cm got checkout
3031 ff2cf171 2019-07-28 stsp and, if needed, created with
3032 ff2cf171 2019-07-28 stsp .Cm got branch .
3033 ff2cf171 2019-07-28 stsp Branches in the
3034 a099809f 2021-08-27 stsp .Dq refs/remotes/origin
3035 469dd726 2020-03-20 stsp namespace can now be updated with incoming changes from the remote
3036 ff2cf171 2019-07-28 stsp repository with
3037 469dd726 2020-03-20 stsp .Cm got fetch
3039 469dd726 2020-03-20 stsp .Xr git-fetch 1
3040 a099809f 2021-08-27 stsp without extra command line arguments.
3041 a099809f 2021-08-27 stsp Newly fetched changes can be examined with
3042 a099809f 2021-08-27 stsp .Cm got log .
3044 a099809f 2021-08-27 stsp Display changes on the remote repository's version of the
3045 ff2cf171 2019-07-28 stsp .Dq master
3046 a099809f 2021-08-27 stsp branch, as of the last time
3047 a099809f 2021-08-27 stsp .Cm got fetch
3050 a099809f 2021-08-27 stsp .Dl $ got log -c origin/master | less
3052 a099809f 2021-08-27 stsp As shown here, most commands accept abbreviated reference names such as
3053 ff2cf171 2019-07-28 stsp .Dq origin/master
3054 a099809f 2021-08-27 stsp instead of
3055 a099809f 2021-08-27 stsp .Dq refs/remotes/origin/master .
3056 a099809f 2021-08-27 stsp The latter is only needed in case of ambiguity.
3058 a099809f 2021-08-27 stsp .Cm got rebase
3059 a099809f 2021-08-27 stsp must be used to merge changes which are visible on the
3060 a099809f 2021-08-27 stsp .Dq origin/master
3061 a099809f 2021-08-27 stsp branch into the
3062 a099809f 2021-08-27 stsp .Dq master
3064 7b0db533 2020-02-04 stsp This will also merge local changes, if any, with the incoming changes:
3066 ff2cf171 2019-07-28 stsp .Dl $ got update -b origin/master
3067 ff2cf171 2019-07-28 stsp .Dl $ got rebase master
3069 a099809f 2021-08-27 stsp In order to make changes committed to the
3070 a099809f 2021-08-27 stsp .Dq unified-buffer-cache
3071 a099809f 2021-08-27 stsp visible on the
3072 a099809f 2021-08-27 stsp .Dq master
3073 a099809f 2021-08-27 stsp branch, the
3074 a099809f 2021-08-27 stsp .Dq unified-buffer-cache
3075 a099809f 2021-08-27 stsp branch must first be rebased onto the
3076 a099809f 2021-08-27 stsp .Dq master
3079 a099809f 2021-08-27 stsp .Dl $ got update -b master
3080 a099809f 2021-08-27 stsp .Dl $ got rebase unified-buffer-cache
3082 a099809f 2021-08-27 stsp Changes on the
3083 a099809f 2021-08-27 stsp .Dq unified-buffer-cache
3084 a099809f 2021-08-27 stsp branch can now be made visible on the
3085 a099809f 2021-08-27 stsp .Dq master
3086 a099809f 2021-08-27 stsp branch with
3087 a099809f 2021-08-27 stsp .Cm got integrate .
3088 a099809f 2021-08-27 stsp Because the rebase operation switched the work tree to the
3089 a099809f 2021-08-27 stsp .Dq unified-buffer-cache
3090 e38d4cde 2022-03-21 naddy branch, the work tree must be switched back to the
3091 a099809f 2021-08-27 stsp .Dq master
3092 a099809f 2021-08-27 stsp branch first:
3094 a099809f 2021-08-27 stsp .Dl $ got update -b master
3095 a099809f 2021-08-27 stsp .Dl $ got integrate unified-buffer-cache
3098 083957f4 2020-02-24 stsp .Dq master
3099 083957f4 2020-02-24 stsp branch, log messages for local changes can now be amended with
3101 083957f4 2020-02-24 stsp by other developers and any other important new information:
3103 083957f4 2020-02-24 stsp .Dl $ got update -c origin/master
3104 083957f4 2020-02-24 stsp .Dl $ got histedit -m
3106 e38d4cde 2022-03-21 naddy If the remote repository offers write access, local changes on the
3107 ff2cf171 2019-07-28 stsp .Dq master
3108 a099809f 2021-08-27 stsp branch can be sent to the remote repository with
3109 90e6e620 2021-10-04 kn .Cm got send .
3111 a099809f 2021-08-27 stsp .Cm got send
3112 a099809f 2021-08-27 stsp can be run without further arguments.
3113 a099809f 2021-08-27 stsp The arguments shown here match defaults, provided the work tree's
3114 a099809f 2021-08-27 stsp current branch is the
3115 a099809f 2021-08-27 stsp .Dq master
3118 a099809f 2021-08-27 stsp .Dl $ got send -b master origin
3120 e38d4cde 2022-03-21 naddy If the remote repository requires the HTTPS protocol, the
3121 a099809f 2021-08-27 stsp .Xr git-push 1
3122 a099809f 2021-08-27 stsp command must be used instead:
3124 a099809f 2021-08-27 stsp .Dl $ cd /var/git/src.git
3125 ff2cf171 2019-07-28 stsp .Dl $ git push origin master
3127 8978dfde 2022-07-20 stsp When making contributions to projects which use the
3128 8978dfde 2022-07-20 stsp .Dq pull request
3129 8978dfde 2022-07-20 stsp workflow, SSH protocol repository access needs to be set up first.
3130 8978dfde 2022-07-20 stsp Once an account has been created on a Git hosting site it should
3131 8978dfde 2022-07-20 stsp be possible to upload a public SSH key for repository access
3132 8978dfde 2022-07-20 stsp authentication.
3135 8978dfde 2022-07-20 stsp .Dq pull request
3136 8978dfde 2022-07-20 stsp workflow will usually involve two remote repositories.
3137 8978dfde 2022-07-20 stsp In the real-life example below, the
3138 8978dfde 2022-07-20 stsp .Dq origin
3139 8978dfde 2022-07-20 stsp repository was forked from the
3140 8978dfde 2022-07-20 stsp .Dq upstream
3141 8978dfde 2022-07-20 stsp repository by using the Git hosting site's web interface.
3143 8978dfde 2022-07-20 stsp .Xr got.conf 5
3144 8978dfde 2022-07-20 stsp file in the local repository describes both remote repositories:
3145 8978dfde 2022-07-20 stsp .Bd -literal -offset indent
3146 8978dfde 2022-07-20 stsp # Jelmers's repository, which accepts pull requests
3147 8978dfde 2022-07-20 stsp remote "upstream" {
3148 8978dfde 2022-07-20 stsp server git@github.com
3149 8978dfde 2022-07-20 stsp protocol ssh
3150 8978dfde 2022-07-20 stsp repository "/jelmer/dulwich"
3151 8978dfde 2022-07-20 stsp branch { "master" }
3154 8978dfde 2022-07-20 stsp # Stefan's fork, used as the default remote repository
3155 8978dfde 2022-07-20 stsp remote "origin" {
3156 8978dfde 2022-07-20 stsp server git@github.com
3157 8978dfde 2022-07-20 stsp protocol ssh
3158 8978dfde 2022-07-20 stsp repository "/stspdotname/dulwich"
3159 8978dfde 2022-07-20 stsp branch { "master" }
3163 8978dfde 2022-07-20 stsp With this configuration, Stefan can create commits on
3164 8978dfde 2022-07-20 stsp .Dq refs/heads/master
3165 8978dfde 2022-07-20 stsp and send them to the
3166 8978dfde 2022-07-20 stsp .Dq origin
3167 8978dfde 2022-07-20 stsp repository by running:
3169 8978dfde 2022-07-20 stsp .Dl $ got send -b master origin
3171 8978dfde 2022-07-20 stsp The changes can now be proposed to Jelmer by opening a pull request
3172 8978dfde 2022-07-20 stsp via the Git hosting site's web interface.
3173 8978dfde 2022-07-20 stsp If Jelmer requests further changes to be made, additional commits
3174 8978dfde 2022-07-20 stsp can be created on the
3175 8978dfde 2022-07-20 stsp .Dq master
3176 8978dfde 2022-07-20 stsp branch and be added to the pull request by running
3177 8978dfde 2022-07-20 stsp .Cd got send
3180 8978dfde 2022-07-20 stsp If Jelmer prefers additional commits to be
3181 8978dfde 2022-07-20 stsp .Dq squashed
3182 8978dfde 2022-07-20 stsp then the following commands can be used to achieve this:
3184 8978dfde 2022-07-20 stsp .Dl $ got update -b master
3185 8978dfde 2022-07-20 stsp .Dl $ got update -c origin/master
3186 8978dfde 2022-07-20 stsp .Dl $ got histedit -f
3187 8978dfde 2022-07-20 stsp .Dl $ got send -f -b master origin
3189 8978dfde 2022-07-20 stsp Once Jelmer has accepted the pull request, Stefan can fetch the
3190 8978dfde 2022-07-20 stsp merged changes, and possibly several other new changes, by running:
3192 8978dfde 2022-07-20 stsp .Dl $ got fetch upstream
3194 8978dfde 2022-07-20 stsp The merged changes will now be visible under the reference
3195 8978dfde 2022-07-20 stsp .Dq refs/remotes/upstream/master .
3197 8978dfde 2022-07-20 stsp .Dq master
3198 8978dfde 2022-07-20 stsp branch can now be rebased on top of the latest changes
3199 8978dfde 2022-07-20 stsp from upstream:
3201 8978dfde 2022-07-20 stsp .Dl $ got update -b upstream/master
3202 8978dfde 2022-07-20 stsp .Dl $ got rebase master
3204 8978dfde 2022-07-20 stsp As a final step, the forked repository's copy of the master branch needs
3205 8978dfde 2022-07-20 stsp to be kept in sync by sending the new changes there:
3207 8978dfde 2022-07-20 stsp .Dl $ got send -f -b master origin
3209 8978dfde 2022-07-20 stsp If multiple pull requests need to be managed in parallel, a separate branch
3210 8978dfde 2022-07-20 stsp must be created for each pull request with
3211 8978dfde 2022-07-20 stsp .Cm got branch .
3212 8978dfde 2022-07-20 stsp Each such branch can then be used as above, in place of
3213 8978dfde 2022-07-20 stsp .Dq refs/heads/master .
3214 8978dfde 2022-07-20 stsp Changes for any accepted pull requests will still appear under
3215 8978dfde 2022-07-20 stsp .Dq refs/remotes/upstream/master,
3216 8978dfde 2022-07-20 stsp regardless of which branch was used in the forked repository to
3217 8978dfde 2022-07-20 stsp create a pull request.
3218 5c860e29 2018-03-12 stsp .Sh SEE ALSO
3219 0a79feb1 2021-04-10 stsp .Xr gotadmin 1 ,
3220 2312fc47 2019-07-15 stsp .Xr tog 1 ,
3221 2312fc47 2019-07-15 stsp .Xr git-repository 5 ,
3222 257add31 2020-09-09 stsp .Xr got-worktree 5 ,
3223 2b16c2bc 2022-07-05 stsp .Xr got.conf 5 ,
3224 2b16c2bc 2022-07-05 stsp .Xr gotweb 8
3225 1a208aaf 2018-04-01 stsp .Sh AUTHORS
3226 8ca658b9 2022-07-05 stsp .An Anthony J. Bentley Aq Mt bentley@openbsd.org
3227 8ca658b9 2022-07-05 stsp .An Christian Weisgerber Aq Mt naddy@openbsd.org
3228 8ca658b9 2022-07-05 stsp .An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org
3229 8ca658b9 2022-07-05 stsp .An Josh Rickmar Aq Mt jrick@zettaport.com
3230 bc3056e3 2019-08-18 stsp .An Joshua Stein Aq Mt jcs@openbsd.org
3231 8ca658b9 2022-07-05 stsp .An Klemens Nanni Aq Mt kn@openbsd.org
3232 8ca658b9 2022-07-05 stsp .An Martin Pieuchot Aq Mt mpi@openbsd.org
3233 49be94bd 2022-07-05 stsp .An Neels Hofmeyr Aq Mt neels@hofmeyr.de
3234 8ca658b9 2022-07-05 stsp .An Omar Polo Aq Mt op@openbsd.org
3235 83b416ed 2020-03-18 stsp .An Ori Bernstein Aq Mt ori@openbsd.org
3236 8ca658b9 2022-07-05 stsp .An Sebastien Marie Aq Mt semarie@openbsd.org
3237 8ca658b9 2022-07-05 stsp .An Stefan Sperling Aq Mt stsp@openbsd.org
3238 ad8bd524 2022-07-05 stsp .An Steven McDonald Aq Mt steven@steven-mcdonald.id.au
3239 8ca658b9 2022-07-05 stsp .An Theo Buehler Aq Mt tb@openbsd.org
3240 8ca658b9 2022-07-05 stsp .An Thomas Adam Aq Mt thomas@xteddy.org
3241 8ca658b9 2022-07-05 stsp .An Tracey Emery Aq Mt tracey@traceyemery.net
3242 8ca658b9 2022-07-05 stsp .An Yang Zhong Aq Mt yzhong@freebsdfoundation.org
3246 cc63cb4e 2022-07-05 stsp .Xr tog 1 ,
3248 cc63cb4e 2022-07-05 stsp .Xr gotweb 8
3249 cc63cb4e 2022-07-05 stsp were derived from code under copyright by:
3251 cc63cb4e 2022-07-05 stsp .An Caldera International Inc.
3252 cc63cb4e 2022-07-05 stsp .An Daniel Hartmeier
3253 cc63cb4e 2022-07-05 stsp .An Esben Norby
3254 cc63cb4e 2022-07-05 stsp .An Henning Brauer
3255 cc63cb4e 2022-07-05 stsp .An Håkan Olsson
3256 cc63cb4e 2022-07-05 stsp .An Ingo Schwarze
3257 cc63cb4e 2022-07-05 stsp .An Jean-Francois Brousseau
3258 cc63cb4e 2022-07-05 stsp .An Joris Vink
3259 cc63cb4e 2022-07-05 stsp .An Jyri J. Virkki
3260 cc63cb4e 2022-07-05 stsp .An Larry Wall
3261 cc63cb4e 2022-07-05 stsp .An Markus Friedl
3262 cc63cb4e 2022-07-05 stsp .An Niall O'Higgins
3263 cc63cb4e 2022-07-05 stsp .An Niklas Hallqvist
3264 cc63cb4e 2022-07-05 stsp .An Ray Lai
3265 cc63cb4e 2022-07-05 stsp .An Ryan McBride
3266 cc63cb4e 2022-07-05 stsp .An Theo de Raadt
3267 cc63cb4e 2022-07-05 stsp .An Todd C. Miller
3268 cc63cb4e 2022-07-05 stsp .An Xavier Santolaria
3271 bd957eac 2022-07-05 stsp contains code contributed to the public domain by
3272 bd957eac 2022-07-05 stsp .An Austin Appleby
3273 fa6e0e48 2019-05-23 stsp .Sh CAVEATS
3275 cc63216e 2020-12-26 stsp is a work-in-progress and some features remain to be implemented.
3277 fa6e0e48 2019-05-23 stsp At present, the user has to fall back on
3279 cc63216e 2020-12-26 stsp to perform some tasks.
3280 cc63216e 2020-12-26 stsp In particular:
3281 cc63216e 2020-12-26 stsp .Bl -bullet
3283 cc63216e 2020-12-26 stsp Reading from remote repositories over HTTP or HTTPS protocols requires
3284 cc63216e 2020-12-26 stsp .Xr git-clone 1
3286 cc63216e 2020-12-26 stsp .Xr git-fetch 1 .
3288 a099809f 2021-08-27 stsp Writing to remote repositories over HTTP or HTTPS protocols requires
3289 cc63216e 2020-12-26 stsp .Xr git-push 1 .
3291 fa161f0b 2021-09-28 stsp The creation of merge commits with more than two parent commits requires
3292 cc63216e 2020-12-26 stsp .Xr git-merge 1 .
3294 cc63216e 2020-12-26 stsp In situations where files or directories were moved around
3296 cc63216e 2020-12-26 stsp will not automatically merge changes to new locations and
3298 cc63216e 2020-12-26 stsp will usually produce better results.