Blob


1 .\"
2 .\" Copyright (c) 2017 Martin Pieuchot
3 .\" Copyright (c) 2018, 2019, 2020 Stefan Sperling
4 .\"
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
8 .\"
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 .\"
17 .Dd $Mdocdate$
18 .Dt GOT 1
19 .Os
20 .Sh NAME
21 .Nm got
22 .Nd Game of Trees
23 .Sh SYNOPSIS
24 .Nm
25 .Op Fl hV
26 .Ar command
27 .Op Ar arg ...
28 .Sh DESCRIPTION
29 .Nm
30 is a version control system which stores the history of tracked files
31 in a Git repository, as used by the Git version control system.
32 This repository format is described in
33 .Xr git-repository 5 .
34 .Pp
35 .Nm
36 is a
37 .Dq distributed
38 version control system because every copy of a repository is writeable.
39 Modifications made to files can be synchronized between repositories
40 at any time.
41 .Pp
42 Files managed by
43 .Nm
44 must be checked out from the repository for modification.
45 Checked out files are stored in a
46 .Em work tree
47 which can be placed at an arbitrary directory in the filesystem hierarchy.
48 The on-disk format of this work tree is described in
49 .Xr got-worktree 5 .
50 .Pp
51 .Nm
52 provides global and command-specific options.
53 Global options must precede the command name, and are as follows:
54 .Bl -tag -width tenletters
55 .It Fl h
56 Display usage information and exit immediately.
57 .It Fl V , -version
58 Display program version and exit immediately.
59 .El
60 .Pp
61 The commands for
62 .Nm
63 are as follows:
64 .Bl -tag -width checkout
65 .Tg im
66 .It Xo
67 .Cm import
68 .Op Fl b Ar branch
69 .Op Fl I Ar pattern
70 .Op Fl m Ar message
71 .Op Fl r Ar repository-path
72 .Ar directory
73 .Xc
74 .Dl Pq alias: Cm im
75 Create an initial commit in a repository from the file hierarchy
76 within the specified
77 .Ar directory .
78 The created commit will not have any parent commits, i.e. it will be a
79 root commit.
80 Also create a new reference which provides a branch name for the newly
81 created commit.
82 Show the path of each imported file to indicate progress.
83 .Pp
84 The
85 .Cm got import
86 command requires the
87 .Ev GOT_AUTHOR
88 environment variable to be set,
89 unless an author has been configured in
90 .Xr got.conf 5
91 or Git's
92 .Dv user.name
93 and
94 .Dv user.email
95 configuration settings can be obtained from the repository's
96 .Pa .git/config
97 file or from Git's global
98 .Pa ~/.gitconfig
99 configuration file.
100 .Pp
101 The options for
102 .Cm got import
103 are as follows:
104 .Bl -tag -width Ds
105 .It Fl b Ar branch
106 Create the specified
107 .Ar branch .
108 If this option is not specified, a branch corresponding to the repository's
109 HEAD reference will be used.
110 Use of this option is required if the branch resolved via the repository's
111 HEAD reference already exists.
112 .It Fl I Ar pattern
113 Ignore files or directories with a name which matches the specified
114 .Ar pattern .
115 This option may be specified multiple times to build a list of ignore patterns.
116 The
117 .Ar pattern
118 follows the globbing rules documented in
119 .Xr glob 7 .
120 Ignore patterns which end with a slash,
121 .Dq / ,
122 will only match directories.
123 .It Fl m Ar message
124 Use the specified log message when creating the new commit.
125 Without the
126 .Fl m
127 option,
128 .Cm got import
129 opens a temporary file in an editor where a log message can be written.
130 .It Fl r Ar repository-path
131 Use the repository at the specified path.
132 If not specified, assume the repository is located at or above the current
133 working directory.
134 .El
135 .Tg cl
136 .It Xo
137 .Cm clone
138 .Op Fl almqv
139 .Op Fl b Ar branch
140 .Op Fl R Ar reference
141 .Ar repository-URL
142 .Op Ar directory
143 .Xc
144 .Dl Pq alias: Cm cl
145 Clone a Git repository at the specified
146 .Ar repository-URL
147 into the specified
148 .Ar directory .
149 If no
150 .Ar directory
151 is specified, the directory name will be derived from the name of the
152 cloned repository.
153 .Cm got clone
154 will refuse to run if the
155 .Ar directory
156 already exists.
157 .Pp
158 The
159 .Ar repository-URL
160 specifies a protocol scheme, a server hostname, an optional port number
161 separated from the hostname by a colon, and a path to the repository on
162 the server:
163 .Lk scheme://hostname:port/path/to/repository
164 .Pp
165 The following protocol schemes are supported:
166 .Bl -tag -width git+ssh
167 .It git
168 The Git protocol as implemented by the
169 .Xr git-daemon 1
170 server.
171 Use of this protocol is discouraged since it supports neither authentication
172 nor encryption.
173 .It git+ssh
174 The Git protocol wrapped in an authenticated and encrypted
175 .Xr ssh 1
176 tunnel.
177 With this protocol the hostname may contain an embedded username for
178 .Xr ssh 1
179 to use:
180 .Mt user@hostname
181 .It ssh
182 Short alias for git+ssh.
183 .El
184 .Pp
185 Objects in the cloned repository are stored in a pack file which is downloaded
186 from the server.
187 This pack file will then be indexed to facilitate access to the objects stored
188 within.
189 If any objects in the pack file are stored in deltified form, all deltas will
190 be fully resolved in order to compute the ID of such objects.
191 This can take some time.
192 More details about the pack file format are documented in
193 .Xr git-repository 5 .
194 .Pp
195 .Cm got clone
196 creates a remote repository entry in the
197 .Xr got.conf 5
198 and
199 .Pa config
200 files of the cloned repository to store the
201 .Ar repository-url
202 and any
203 .Ar branch
204 or
205 .Ar reference
206 arguments for future use by
207 .Cm got fetch
208 or
209 .Xr git-fetch 1 .
210 .Pp
211 The options for
212 .Cm got clone
213 are as follows:
214 .Bl -tag -width Ds
215 .It Fl a
216 Fetch all branches from the remote repository's
217 .Dq refs/heads/
218 reference namespace and set
219 .Cm fetch_all_branches
220 in the cloned repository's
221 .Xr got.conf 5
222 file for future use by
223 .Cm got fetch .
224 If this option is not specified, a branch resolved via the remote
225 repository's HEAD reference will be fetched.
226 Cannot be used together with the
227 .Fl b
228 option.
229 .It Fl b Ar branch
230 Fetch the specified
231 .Ar branch
232 from the remote repository's
233 .Dq refs/heads/
234 reference namespace.
235 This option may be specified multiple times to build a list of branches
236 to fetch.
237 If the branch corresponding to the remote repository's HEAD reference is not
238 in this list, the cloned repository's HEAD reference will be set to the first
239 branch which was fetched.
240 If this option is not specified, a branch resolved via the remote
241 repository's HEAD reference will be fetched.
242 Cannot be used together with the
243 .Fl a
244 option.
245 .It Fl l
246 List branches and tags available for fetching from the remote repository
247 and exit immediately.
248 Cannot be used together with any of the other options except
249 .Fl q
250 and
251 .Fl v .
252 .It Fl m
253 Create the cloned repository as a mirror of the original repository.
254 This is useful if the cloned repository will not be used to store
255 locally created commits.
256 .Pp
257 The repository's
258 .Xr got.conf 5
259 and
260 .Pa config
261 files will be set up with the
262 .Dq mirror
263 option enabled, such that
264 .Cm got fetch
265 or
266 .Xr git-fetch 1
267 will write incoming changes directly to branches in the
268 .Dq refs/heads/
269 reference namespace, rather than to branches in the
270 .Dq refs/remotes/
271 namespace.
272 This avoids the usual requirement of having to run
273 .Cm got rebase
274 after
275 .Cm got fetch
276 in order to make incoming changes appear on branches in the
277 .Dq refs/heads/
278 namespace.
279 But maintaining custom changes in the cloned repository becomes difficult
280 since such changes will be at risk of being discarded whenever incoming
281 changes are fetched.
282 .It Fl q
283 Suppress progress reporting output.
284 The same option will be passed to
285 .Xr ssh 1
286 if applicable.
287 .It Fl R Ar reference
288 In addition to the branches and tags that will be fetched, fetch an arbitrary
289 .Ar reference
290 from the remote repository's
291 .Dq refs/
292 namespace.
293 This option may be specified multiple times to build a list of additional
294 references to fetch.
295 The specified
296 .Ar reference
297 may either be a path to a specific reference, or a reference namespace
298 which will cause all references in this namespace to be fetched.
299 .Pp
300 Each reference will be mapped into the cloned repository's
301 .Dq refs/remotes/
302 namespace, unless the
303 .Fl m
304 option is used to mirror references directly into the cloned repository's
305 .Dq refs/
306 namespace.
307 .Pp
308 .Cm got clone
309 will refuse to fetch references from the remote repository's
310 .Dq refs/remotes/
311 or
312 .Dq refs/got/
313 namespace.
314 .It Fl v
315 Verbose mode.
316 Causes
317 .Cm got clone
318 to print debugging messages to standard error output.
319 This option will be passed to
320 .Xr ssh 1
321 if applicable.
322 Multiple -v options increase the verbosity.
323 The maximum is 3.
324 .El
325 .Tg fe
326 .It Xo
327 .Cm fetch
328 .Op Fl adlqtvX
329 .Op Fl b Ar branch
330 .Op Fl R Ar reference
331 .Op Fl r Ar repository-path
332 .Op Ar remote-repository
333 .Xc
334 .Dl Pq alias: Cm fe
335 Fetch new changes from a remote repository.
336 If no
337 .Ar remote-repository
338 is specified,
339 .Dq origin
340 will be used.
341 The remote repository's URL is obtained from the corresponding entry in
342 .Xr got.conf 5
343 or Git's
344 .Pa config
345 file of the local repository, as created by
346 .Cm got clone .
347 .Pp
348 By default, any branches configured in
349 .Xr got.conf 5
350 for the
351 .Ar remote-repository
352 will be fetched.
353 If
354 .Cm got fetch
355 is invoked in a work tree then this work tree's current branch will be
356 fetched, too, provided it is present on the server.
357 If no branches to fetch can be found in
358 .Xr got.conf 5
359 or via a work tree, or said branches are not found on the server, a branch
360 resolved via the remote repository's HEAD reference will be fetched.
361 Likewise, if a HEAD reference for the
362 .Ar remote-repository
363 exists but its target no longer matches the remote HEAD, then
364 the new target branch will be fetched.
365 This default behaviour can be overridden with the
366 .Fl a
367 and
368 .Fl b
369 options.
370 .Pp
371 New changes will be stored in a separate pack file downloaded from the server.
372 Optionally, separate pack files stored in the repository can be combined with
373 .Xr git-repack 1 .
374 .Pp
375 By default, branch references in the
376 .Dq refs/remotes/
377 reference namespace will be updated to point at the newly fetched commits.
378 The
379 .Cm got rebase
380 command can then be used to make new changes visible on branches in the
381 .Dq refs/heads/
382 namespace, merging incoming changes with the changes on those branches
383 as necessary.
384 .Pp
385 If the repository was created as a mirror with
386 .Cm got clone -m ,
387 then all branches in the
388 .Dq refs/heads/
389 namespace will be updated directly to match the corresponding branches in
390 the remote repository.
391 If those branches contained local commits, these commits will no longer be
392 reachable via a reference and will therefore be at risk of being discarded
393 by Git's garbage collector or
394 .Cm gotadmin cleanup .
395 Maintaining custom changes in a mirror repository is therefore discouraged.
396 .Pp
397 In any case, references in the
398 .Dq refs/tags/
399 namespace will always be fetched and mapped directly to local references
400 in the same namespace.
401 .Pp
402 The options for
403 .Cm got fetch
404 are as follows:
405 .Bl -tag -width Ds
406 .It Fl a
407 Fetch all branches from the remote repository's
408 .Dq refs/heads/
409 reference namespace.
410 This option can be enabled by default for specific repositories in
411 .Xr got.conf 5 .
412 Cannot be used together with the
413 .Fl b
414 option.
415 .It Fl b Ar branch
416 Fetch the specified
417 .Ar branch
418 from the remote repository's
419 .Dq refs/heads/
420 reference namespace.
421 This option may be specified multiple times to build a list of branches
422 to fetch.
423 Cannot be used together with the
424 .Fl a
425 option.
426 .It Fl d
427 Delete branches and tags from the local repository which are no longer
428 present in the remote repository.
429 Only references are deleted.
430 Any commit, tree, tag, and blob objects belonging to deleted branches or
431 tags remain in the repository and may be removed separately with
432 Git's garbage collector or
433 .Cm gotadmin cleanup .
434 .It Fl l
435 List branches and tags available for fetching from the remote repository
436 and exit immediately.
437 Cannot be used together with any of the other options except
438 .Fl v ,
439 .Fl q ,
440 and
441 .Fl r .
442 .It Fl q
443 Suppress progress reporting output.
444 The same option will be passed to
445 .Xr ssh 1
446 if applicable.
447 .It Fl R Ar reference
448 In addition to the branches and tags that will be fetched, fetch an arbitrary
449 .Ar reference
450 from the remote repository's
451 .Dq refs/
452 namespace.
453 This option may be specified multiple times to build a list of additional
454 references to fetch.
455 The specified
456 .Ar reference
457 may either be a path to a specific reference, or a reference namespace
458 which will cause all references in this namespace to be fetched.
459 .Pp
460 Each reference will be mapped into the local repository's
461 .Dq refs/remotes/
462 namespace, unless the local repository was created as a mirror with
463 .Cm got clone -m
464 in which case references will be mapped directly into the local repository's
465 .Dq refs/
466 namespace.
467 .Pp
468 Once a reference has been fetched, a branch based on it can be created with
469 .Cm got branch
470 if needed.
471 .Pp
472 .Cm got fetch
473 will refuse to fetch references from the remote repository's
474 .Dq refs/remotes/
475 or
476 .Dq refs/got/
477 namespace.
478 .It Fl r Ar repository-path
479 Use the repository at the specified path.
480 If not specified, assume the repository is located at or above the current
481 working directory.
482 If this directory is a
483 .Nm
484 work tree, use the repository path associated with this work tree.
485 .It Fl t
486 Allow existing references in the
487 .Dq refs/tags
488 namespace to be updated if they have changed on the server.
489 If not specified, only new tag references will be created.
490 .It Fl v
491 Verbose mode.
492 Causes
493 .Cm got fetch
494 to print debugging messages to standard error output.
495 The same option will be passed to
496 .Xr ssh 1
497 if applicable.
498 Multiple -v options increase the verbosity.
499 The maximum is 3.
500 .It Fl X
501 Delete all references which correspond to a particular
502 .Ar remote-repository
503 instead of fetching new changes.
504 This can be useful when a remote repository is being removed from
505 .Xr got.conf 5 .
506 .Pp
507 With
508 .Fl X ,
509 the
510 .Ar remote-repository
511 argument is mandatory and no other options except
512 .Fl r ,
513 .Fl v ,
514 and
515 .Fl q
516 are allowed.
517 .Pp
518 Only references are deleted.
519 Any commit, tree, tag, and blob objects fetched from a remote repository
520 will generally be stored in pack files and may be removed separately with
521 .Xr git-repack 1
522 and Git's garbage collector.
523 .El
524 .Tg co
525 .It Xo
526 .Cm checkout
527 .Op Fl Eq
528 .Op Fl b Ar branch
529 .Op Fl c Ar commit
530 .Op Fl p Ar path-prefix
531 .Ar repository-path
532 .Op Ar work-tree-path
533 .Xc
534 .Dl Pq alias: Cm co
535 Copy files from a repository into a new work tree.
536 Show the status of each affected file, using the following status codes:
537 .Bl -column YXZ description
538 .It A Ta new file was added
539 .It E Ta file already exists in work tree's meta-data
540 .El
541 .Pp
542 If the
543 .Ar work tree path
544 is not specified, either use the last component of
545 .Ar repository path ,
546 or if a
547 .Ar path prefix
548 was specified use the last component of
549 .Ar path prefix .
550 .Pp
551 The options for
552 .Cm got checkout
553 are as follows:
554 .Bl -tag -width Ds
555 .It Fl b Ar branch
556 Check out files from a commit on the specified
557 .Ar branch .
558 If this option is not specified, a branch resolved via the repository's HEAD
559 reference will be used.
560 .It Fl c Ar commit
561 Check out files from the specified
562 .Ar commit
563 on the selected branch.
564 The expected argument is a commit ID SHA1 hash or an existing reference
565 or tag name which will be resolved to a commit ID.
566 An abbreviated hash argument will be expanded to a full SHA1 hash
567 automatically, provided the abbreviation is unique.
568 If this option is not specified, the most recent commit on the selected
569 branch will be used.
570 .Pp
571 If the specified
572 .Ar commit
573 is not contained in the selected branch, a different branch which contains
574 this commit must be specified with the
575 .Fl b
576 option.
577 If no such branch is known, a new branch must be created for this
578 commit with
579 .Cm got branch
580 before
581 .Cm got checkout
582 can be used.
583 Checking out work trees with an unknown branch is intentionally not supported.
584 .It Fl E
585 Proceed with the checkout operation even if the directory at
586 .Ar work-tree-path
587 is not empty.
588 Existing files will be left intact.
589 .It Fl p Ar path-prefix
590 Restrict the work tree to a subset of the repository's tree hierarchy.
591 Only files beneath the specified
592 .Ar path-prefix
593 will be checked out.
594 .It Fl q
595 Silence progress output.
596 .El
597 .Tg up
598 .It Xo
599 .Cm update
600 .Op Fl q
601 .Op Fl b Ar branch
602 .Op Fl c Ar commit
603 .Op Ar path ...
604 .Xc
605 .Dl Pq alias: Cm up
606 Update an existing work tree to a different
607 .Ar commit .
608 Change existing files in the work tree as necessary to match file contents
609 of this commit.
610 Preserve any local changes in the work tree and merge them with the
611 incoming changes.
612 .Pp
613 Files which already contain merge conflicts will not be updated to avoid
614 further complications.
615 Such files will be updated when
616 .Cm got update
617 is run again after merge conflicts have been resolved.
618 If the conflicting changes are no longer needed, affected files can be
619 reverted with
620 .Cm got revert
621 before running
622 .Cm got update
623 again.
624 .Pp
625 Show the status of each affected file, using the following status codes:
626 .Bl -column YXZ description
627 .It U Ta file was updated and contained no local changes
628 .It G Ta file was updated and local changes were merged cleanly
629 .It C Ta file was updated and conflicts occurred during merge
630 .It D Ta file was deleted
631 .It d Ta file's deletion was prevented by local modifications
632 .It A Ta new file was added
633 .It \(a~ Ta versioned file is obstructed by a non-regular file
634 .It ! Ta a missing versioned file was restored
635 .It # Ta file was not updated because it contains merge conflicts
636 .It ? Ta changes destined for an unversioned file were not merged
637 .El
638 .Pp
639 If no
640 .Ar path
641 is specified, update the entire work tree.
642 Otherwise, restrict the update operation to files at or within the
643 specified paths.
644 Each path is required to exist in the update operation's target commit.
645 Files in the work tree outside specified paths will remain unchanged and
646 will retain their previously recorded base commit.
647 Some
648 .Nm
649 commands may refuse to run while the work tree contains files from
650 multiple base commits.
651 The base commit of such a work tree can be made consistent by running
652 .Cm got update
653 across the entire work tree.
654 Specifying a
655 .Ar path
656 is incompatible with the
657 .Fl b
658 option.
659 .Pp
660 .Cm got update
661 cannot update paths with staged changes.
662 If changes have been staged with
663 .Cm got stage ,
664 these changes must first be committed with
665 .Cm got commit
666 or unstaged with
667 .Cm got unstage .
668 .Pp
669 The options for
670 .Cm got update
671 are as follows:
672 .Bl -tag -width Ds
673 .It Fl b Ar branch
674 Switch the work tree's branch reference to the specified
675 .Ar branch
676 before updating the work tree.
677 This option requires that all paths in the work tree are updated.
678 .Pp
679 As usual, any local changes in the work tree will be preserved.
680 This can be useful when switching to a newly created branch in order
681 to commit existing local changes to this branch.
682 .Pp
683 Any local changes must be dealt with separately in order to obtain a
684 work tree with pristine file contents corresponding exactly to the specified
685 .Ar branch .
686 Such changes could first be committed to a different branch with
687 .Cm got commit ,
688 or could be discarded with
689 .Cm got revert .
690 .It Fl c Ar commit
691 Update the work tree to the specified
692 .Ar commit .
693 The expected argument is a commit ID SHA1 hash or an existing reference
694 or tag name which will be resolved to a commit ID.
695 An abbreviated hash argument will be expanded to a full SHA1 hash
696 automatically, provided the abbreviation is unique.
697 If this option is not specified, the most recent commit on the work tree's
698 branch will be used.
699 .It Fl q
700 Silence progress output.
701 .El
702 .Tg st
703 .It Xo
704 .Cm status
705 .Op Fl I
706 .Op Fl S Ar status-codes
707 .Op Fl s Ar status-codes
708 .Op Ar path ...
709 .Xc
710 .Dl Pq alias: Cm st
711 Show the current modification status of files in a work tree,
712 using the following status codes:
713 .Bl -column YXZ description
714 .It M Ta modified file
715 .It A Ta file scheduled for addition in next commit
716 .It D Ta file scheduled for deletion in next commit
717 .It C Ta modified or added file which contains merge conflicts
718 .It ! Ta versioned file was expected on disk but is missing
719 .It \(a~ Ta versioned file is obstructed by a non-regular file
720 .It ? Ta unversioned item not tracked by
721 .Nm
722 .It m Ta modified file modes (executable bit only)
723 .It N Ta non-existent
724 .Ar path
725 specified on the command line
726 .El
727 .Pp
728 If no
729 .Ar path
730 is specified, show modifications in the entire work tree.
731 Otherwise, show modifications at or within the specified paths.
732 .Pp
733 If changes have been staged with
734 .Cm got stage ,
735 staged changes are shown in the second output column, using the following
736 status codes:
737 .Bl -column YXZ description
738 .It M Ta file modification is staged
739 .It A Ta file addition is staged
740 .It D Ta file deletion is staged
741 .El
742 .Pp
743 Changes created on top of staged changes are indicated in the first column:
744 .Bl -column YXZ description
745 .It MM Ta file was modified after earlier changes have been staged
746 .It MA Ta file was modified after having been staged for addition
747 .El
748 .Pp
749 The options for
750 .Cm got status
751 are as follows:
752 .Bl -tag -width Ds
753 .It Fl I
754 Show unversioned files even if they match an ignore pattern.
755 .It Fl S Ar status-codes
756 Suppress the output of files with a modification status matching any of the
757 single-character status codes contained in the
758 .Ar status-codes
759 argument.
760 Any combination of codes from the above list of possible status codes
761 may be specified.
762 For staged files, status codes displayed in either column will be matched.
763 Cannot be used together with the
764 .Fl s
765 option.
766 .It Fl s Ar status-codes
767 Only show files with a modification status matching any of the
768 single-character status codes contained in the
769 .Ar status-codes
770 argument.
771 Any combination of codes from the above list of possible status codes
772 may be specified.
773 For staged files, status codes displayed in either column will be matched.
774 Cannot be used together with the
775 .Fl S
776 option.
777 .El
778 .Pp
779 For compatibility with
780 .Xr cvs 1
781 and
782 .Xr git 1 ,
783 .Cm got status
784 reads
785 .Xr glob 7
786 patterns from
787 .Pa .cvsignore
788 and
789 .Pa .gitignore
790 files in each traversed directory and will not display unversioned files
791 which match these patterns.
792 Ignore patterns which end with a slash,
793 .Dq / ,
794 will only match directories.
795 As an extension to
796 .Xr glob 7
797 matching rules,
798 .Cm got status
799 supports consecutive asterisks,
800 .Dq ** ,
801 which will match an arbitrary amount of directories.
802 Unlike
803 .Xr cvs 1 ,
804 .Cm got status
805 only supports a single ignore pattern per line.
806 Unlike
807 .Xr git 1 ,
808 .Cm got status
809 does not support negated ignore patterns prefixed with
810 .Dq \&! ,
811 and gives no special significance to the location of path component separators,
812 .Dq / ,
813 in a pattern.
814 .It Xo
815 .Cm log
816 .Op Fl bdPpRs
817 .Op Fl C Ar number
818 .Op Fl c Ar commit
819 .Op Fl l Ar N
820 .Op Fl r Ar repository-path
821 .Op Fl S Ar search-pattern
822 .Op Fl x Ar commit
823 .Op Ar path
824 .Xc
825 Display history of a repository.
826 If a
827 .Ar path
828 is specified, show only commits which modified this path.
829 If invoked in a work tree, the
830 .Ar path
831 is interpreted relative to the current working directory,
832 and the work tree's path prefix is implicitly prepended.
833 Otherwise, the path is interpreted relative to the repository root.
834 .Pp
835 The options for
836 .Cm got log
837 are as follows:
838 .Bl -tag -width Ds
839 .It Fl b
840 Display individual commits which were merged into the current branch
841 from other branches.
842 By default,
843 .Cm got log
844 shows the linear history of the current branch only.
845 .It Fl C Ar number
846 Set the number of context lines shown in diffs with
847 .Fl p .
848 By default, 3 lines of context are shown.
849 .It Fl c Ar commit
850 Start traversing history at the specified
851 .Ar commit .
852 The expected argument is a commit ID SHA1 hash or an existing reference
853 or tag name which will be resolved to a commit ID.
854 An abbreviated hash argument will be expanded to a full SHA1 hash
855 automatically, provided the abbreviation is unique.
856 If this option is not specified, default to the work tree's current branch
857 if invoked in a work tree, or to the repository's HEAD reference.
858 .It Fl d
859 Display diffstat of changes introduced in each commit.
860 Cannot be used with the
861 .Fl s
862 option.
863 .It Fl l Ar N
864 Limit history traversal to a given number of commits.
865 If this option is not specified, a default limit value of zero is used,
866 which is treated as an unbounded limit.
867 The
868 .Ev GOT_LOG_DEFAULT_LIMIT
869 environment variable may be set to change this default value.
870 .It Fl P
871 Display the list of file paths changed in each commit, using the following
872 status codes:
873 .Bl -column YXZ description
874 .It M Ta modified file
875 .It D Ta file was deleted
876 .It A Ta new file was added
877 .It m Ta modified file modes (executable bit only)
878 .El
879 .Pp
880 Cannot be used with the
881 .Fl s
882 option.
883 .It Fl p
884 Display the patch of modifications made in each commit.
885 If a
886 .Ar path
887 is specified, only show the patch of modifications at or within this path.
888 Cannot be used with the
889 .Fl s
890 option.
891 .It Fl R
892 Determine a set of commits to display as usual, but display these commits
893 in reverse order.
894 .It Fl r Ar repository-path
895 Use the repository at the specified path.
896 If not specified, assume the repository is located at or above the current
897 working directory.
898 If this directory is a
899 .Nm
900 work tree, use the repository path associated with this work tree.
901 .It Fl S Ar search-pattern
902 If specified, show only commits with a log message, author name,
903 committer name, or ID SHA1 hash matched by the extended regular
904 expression
905 .Ar search-pattern .
906 Lines in committed patches will be matched if
907 .Fl p
908 is specified.
909 File paths changed by a commit will be matched if
910 .Fl P
911 is specified.
912 Regular expression syntax is documented in
913 .Xr re_format 7 .
914 .It Fl s
915 Display a short one-line summary of each commit, instead of the default
916 history format.
917 Cannot be used together with the
918 .Fl p
919 or
920 .Fl P
921 option.
922 .It Fl x Ar commit
923 Stop traversing commit history immediately after the specified
924 .Ar commit
925 has been traversed.
926 This option has no effect if the specified
927 .Ar commit
928 is never traversed.
929 .El
930 .Tg di
931 .It Xo
932 .Cm diff
933 .Op Fl adPsw
934 .Op Fl C Ar number
935 .Op Fl c Ar commit
936 .Op Fl r Ar repository-path
937 .Op Ar object1 Ar object2 | Ar path ...
938 .Xc
939 .Dl Pq alias: Cm di
940 When invoked within a work tree without any arguments, display all
941 local changes in the work tree.
942 If one or more
943 .Ar path
944 arguments are specified, only show changes within the specified paths.
945 .Pp
946 If two arguments are provided, treat each argument as a reference, a tag
947 name, or an object ID SHA1 hash, and display differences between the
948 corresponding objects.
949 Both objects must be of the same type (blobs, trees, or commits).
950 An abbreviated hash argument will be expanded to a full SHA1 hash
951 automatically, provided the abbreviation is unique.
952 If none of these interpretations produce a valid result or if the
953 .Fl P
954 option is used,
955 and if
956 .Cm got diff
957 is running in a work tree, attempt to interpret the two arguments as paths.
958 .Pp
959 The options for
960 .Cm got diff
961 are as follows:
962 .Bl -tag -width Ds
963 .It Fl a
964 Treat file contents as ASCII text even if binary data is detected.
965 .It Fl C Ar number
966 Set the number of context lines shown in the diff.
967 By default, 3 lines of context are shown.
968 .It Fl c Ar commit
969 Show differences between commits in the repository.
970 This option may be used up to two times.
971 When used only once, show differences between the specified
972 .Ar commit
973 and its first parent commit.
974 When used twice, show differences between the two specified commits.
975 .Pp
976 The expected argument is a commit ID SHA1 hash or an existing reference
977 or tag name which will be resolved to a commit ID.
978 An abbreviated hash argument will be expanded to a full SHA1 hash
979 automatically, provided the abbreviation is unique.
980 .Pp
981 If the
982 .Fl c
983 option is used, all non-option arguments will be interpreted as paths.
984 If one or more such
985 .Ar path
986 arguments are provided, only show differences for the specified paths.
987 .Pp
988 Cannot be used together with the
989 .Fl P
990 option.
991 .It Fl d
992 Display diffstat of changes before the actual diff by annotating each file path
993 or blob hash being diffed with the total number of lines added and removed.
994 A summary line will display the total number of changes across all files.
995 .It Fl P
996 Interpret all arguments as paths only.
997 This option can be used to resolve ambiguity in cases where paths
998 look like tag names, reference names, or object IDs.
999 This option is only valid when
1000 .Cm got diff
1001 is invoked in a work tree.
1002 .It Fl r Ar repository-path
1003 Use the repository at the specified path.
1004 If not specified, assume the repository is located at or above the current
1005 working directory.
1006 If this directory is a
1007 .Nm
1008 work tree, use the repository path associated with this work tree.
1009 .It Fl s
1010 Show changes staged with
1011 .Cm got stage
1012 instead of showing local changes in the work tree.
1013 This option is only valid when
1014 .Cm got diff
1015 is invoked in a work tree.
1016 .It Fl w
1017 Ignore whitespace-only changes.
1018 .El
1019 .Tg bl
1020 .It Xo
1021 .Cm blame
1022 .Op Fl c Ar commit
1023 .Op Fl r Ar repository-path
1024 .Ar path
1025 .Xc
1026 .Dl Pq alias: Cm bl
1027 Display line-by-line history of a file at the specified path.
1028 .Pp
1029 The options for
1030 .Cm got blame
1031 are as follows:
1032 .Bl -tag -width Ds
1033 .It Fl c Ar commit
1034 Start traversing history at the specified
1035 .Ar commit .
1036 The expected argument is a commit ID SHA1 hash or an existing reference
1037 or tag name which will be resolved to a commit ID.
1038 An abbreviated hash argument will be expanded to a full SHA1 hash
1039 automatically, provided the abbreviation is unique.
1040 .It Fl r Ar repository-path
1041 Use the repository at the specified path.
1042 If not specified, assume the repository is located at or above the current
1043 working directory.
1044 If this directory is a
1045 .Nm
1046 work tree, use the repository path associated with this work tree.
1047 .El
1048 .Tg tr
1049 .It Xo
1050 .Cm tree
1051 .Op Fl iR
1052 .Op Fl c Ar commit
1053 .Op Fl r Ar repository-path
1054 .Op Ar path
1055 .Xc
1056 .Dl Pq alias: Cm tr
1057 Display a listing of files and directories at the specified
1058 directory path in the repository.
1059 Entries shown in this listing may carry one of the following trailing
1060 annotations:
1061 .Bl -column YXZ description
1062 .It @ Ta entry is a symbolic link
1063 .It / Ta entry is a directory
1064 .It * Ta entry is an executable file
1065 .It $ Ta entry is a Git submodule
1066 .El
1067 .Pp
1068 Symbolic link entries are also annotated with the target path of the link.
1069 .Pp
1070 If no
1071 .Ar path
1072 is specified, list the repository path corresponding to the current
1073 directory of the work tree, or the root directory of the repository
1074 if there is no work tree.
1075 .Pp
1076 The options for
1077 .Cm got tree
1078 are as follows:
1079 .Bl -tag -width Ds
1080 .It Fl c Ar commit
1081 List files and directories as they appear in the specified
1082 .Ar commit .
1083 The expected argument is a commit ID SHA1 hash or an existing reference
1084 or tag name which will be resolved to a commit ID.
1085 An abbreviated hash argument will be expanded to a full SHA1 hash
1086 automatically, provided the abbreviation is unique.
1087 .It Fl i
1088 Show object IDs of files (blob objects) and directories (tree objects).
1089 .It Fl R
1090 Recurse into sub-directories in the repository.
1091 .It Fl r Ar repository-path
1092 Use the repository at the specified path.
1093 If not specified, assume the repository is located at or above the current
1094 working directory.
1095 If this directory is a
1096 .Nm
1097 work tree, use the repository path associated with this work tree.
1098 .El
1099 .It Xo
1100 .Cm ref
1101 .Op Fl dlt
1102 .Op Fl c Ar object
1103 .Op Fl r Ar repository-path
1104 .Op Fl s Ar reference
1105 .Op Ar name
1106 .Xc
1107 Manage references in a repository.
1108 .Pp
1109 References may be listed, created, deleted, and changed.
1110 When creating, deleting, or changing a reference the specified
1111 .Ar name
1112 must be an absolute reference name, i.e. it must begin with
1113 .Dq refs/ .
1114 .Pp
1115 The options for
1116 .Cm got ref
1117 are as follows:
1118 .Bl -tag -width Ds
1119 .It Fl c Ar object
1120 Create a reference or change an existing reference.
1121 The reference with the specified
1122 .Ar name
1123 will point at the specified
1124 .Ar object .
1125 The expected
1126 .Ar object
1127 argument is a ID SHA1 hash or an existing reference or tag name which will
1128 be resolved to the ID of a corresponding commit, tree, tag, or blob object.
1129 Cannot be used together with any other options except
1130 .Fl r .
1131 .It Fl d
1132 Delete the reference with the specified
1133 .Ar name
1134 from the repository.
1135 Any commit, tree, tag, and blob objects belonging to deleted references
1136 remain in the repository and may be removed separately with
1137 Git's garbage collector or
1138 .Cm gotadmin cleanup .
1139 Cannot be used together with any other options except
1140 .Fl r .
1141 .It Fl l
1142 List references in the repository.
1143 If no
1144 .Ar name
1145 is specified, list all existing references in the repository.
1147 .Ar name
1148 is a reference namespace, list all references in this namespace.
1149 Otherwise, show only the reference with the given
1150 .Ar name .
1151 Cannot be used together with any other options except
1152 .Fl r
1153 and
1154 .Fl t .
1155 .It Fl r Ar repository-path
1156 Use the repository at the specified path.
1157 If not specified, assume the repository is located at or above the current
1158 working directory.
1159 If this directory is a
1160 .Nm
1161 work tree, use the repository path associated with this work tree.
1162 .It Fl s Ar reference
1163 Create a symbolic reference, or change an existing symbolic reference.
1164 The symbolic reference with the specified
1165 .Ar name
1166 will point at the specified
1167 .Ar reference
1168 which must already exist in the repository.
1169 Care should be taken not to create loops between references when
1170 this option is used.
1171 Cannot be used together with any other options except
1172 .Fl r .
1173 .It Fl t
1174 Sort listed references by modification time (most recently modified first)
1175 instead of sorting by lexicographical order.
1176 Use of this option requires the
1177 .Fl l
1178 option to be used as well.
1179 .El
1180 .Tg br
1181 .It Xo
1182 .Cm branch
1183 .Op Fl lnt
1184 .Op Fl c Ar commit
1185 .Op Fl d Ar name
1186 .Op Fl r Ar repository-path
1187 .Op Ar name
1188 .Xc
1189 .Dl Pq alias: Cm br
1190 Create, list, or delete branches.
1191 .Pp
1192 Local branches are managed via references which live in the
1193 .Dq refs/heads/
1194 reference namespace.
1195 The
1196 .Cm got branch
1197 command creates references in this namespace only.
1198 .Pp
1199 When deleting branches, the specified
1200 .Ar name
1201 is searched in the
1202 .Dq refs/heads
1203 reference namespace first.
1204 If no corresponding branch is found, the
1205 .Dq refs/remotes
1206 namespace will be searched next.
1207 .Pp
1208 If invoked in a work tree without any arguments, print the name of the
1209 work tree's current branch.
1210 .Pp
1211 If a
1212 .Ar name
1213 argument is passed, attempt to create a branch reference with the given name.
1214 By default the new branch reference will point at the latest commit on the
1215 work tree's current branch if invoked in a work tree, and otherwise to a commit
1216 resolved via the repository's HEAD reference.
1217 .Pp
1218 If invoked in a work tree, once the branch was created successfully
1219 switch the work tree's head reference to the newly created branch and
1220 update files across the entire work tree, just like
1221 .Cm got update -b Ar name
1222 would do.
1223 Show the status of each affected file, using the following status codes:
1224 .Bl -column YXZ description
1225 .It U Ta file was updated and contained no local changes
1226 .It G Ta file was updated and local changes were merged cleanly
1227 .It C Ta file was updated and conflicts occurred during merge
1228 .It D Ta file was deleted
1229 .It A Ta new file was added
1230 .It \(a~ Ta versioned file is obstructed by a non-regular file
1231 .It ! Ta a missing versioned file was restored
1232 .El
1233 .Pp
1234 The options for
1235 .Cm got branch
1236 are as follows:
1237 .Bl -tag -width Ds
1238 .It Fl c Ar commit
1239 Make a newly created branch reference point at the specified
1240 .Ar commit .
1241 The expected
1242 .Ar commit
1243 argument is a commit ID SHA1 hash or an existing reference
1244 or tag name which will be resolved to a commit ID.
1245 .It Fl d Ar name
1246 Delete the branch with the specified
1247 .Ar name
1248 from the
1249 .Dq refs/heads
1251 .Dq refs/remotes
1252 reference namespace.
1253 .Pp
1254 Only the branch reference is deleted.
1255 Any commit, tree, and blob objects belonging to the branch
1256 remain in the repository and may be removed separately with
1257 Git's garbage collector or
1258 .Cm gotadmin cleanup .
1259 .It Fl l
1260 List all existing branches in the repository, including copies of remote
1261 repositories' branches in the
1262 .Dq refs/remotes/
1263 reference namespace.
1264 .Pp
1265 If invoked in a work tree, the work tree's current branch is shown
1266 with one the following annotations:
1267 .Bl -column YXZ description
1268 .It * Ta work tree's base commit matches the branch tip
1269 .It \(a~ Ta work tree's base commit is out-of-date
1270 .El
1271 .It Fl n
1272 Do not switch and update the work tree after creating a new branch.
1273 .It Fl r Ar repository-path
1274 Use the repository at the specified path.
1275 If not specified, assume the repository is located at or above the current
1276 working directory.
1277 If this directory is a
1278 .Nm
1279 work tree, use the repository path associated with this work tree.
1280 .It Fl t
1281 Sort listed branches by modification time (most recently modified first)
1282 instead of sorting by lexicographical order.
1283 Branches in the
1284 .Dq refs/heads/
1285 reference namespace are listed before branches in
1286 .Dq refs/remotes/
1287 regardless.
1288 Use of this option requires the
1289 .Fl l
1290 option to be used as well.
1291 .El
1292 .It Xo
1293 .Cm tag
1294 .Op Fl lVv
1295 .Op Fl c Ar commit
1296 .Op Fl m Ar message
1297 .Op Fl r Ar repository-path
1298 .Op Fl s Ar signer-id
1299 .Ar name
1300 .Xc
1301 Manage tags in a repository.
1302 .Pp
1303 Tags are managed via references which live in the
1304 .Dq refs/tags/
1305 reference namespace.
1306 The
1307 .Cm got tag
1308 command operates on references in this namespace only.
1309 References in this namespace point at tag objects which contain a pointer
1310 to another object, a tag message, as well as author and timestamp information.
1311 .Pp
1312 Attempt to create a tag with the given
1313 .Ar name ,
1314 and make this tag point at the given
1315 .Ar commit .
1316 If no commit is specified, default to the latest commit on the work tree's
1317 current branch if invoked in a work tree, and to a commit resolved via
1318 the repository's HEAD reference otherwise.
1319 .Pp
1320 The options for
1321 .Cm got tag
1322 are as follows:
1323 .Bl -tag -width Ds
1324 .It Fl c Ar commit
1325 Make the newly created tag reference point at the specified
1326 .Ar commit .
1327 The expected
1328 .Ar commit
1329 argument is a commit ID SHA1 hash or an existing reference or tag name which
1330 will be resolved to a commit ID.
1331 An abbreviated hash argument will be expanded to a full SHA1 hash
1332 automatically, provided the abbreviation is unique.
1333 .It Fl l
1334 List all existing tags in the repository instead of creating a new tag.
1335 If a
1336 .Ar name
1337 argument is passed, show only the tag with the given
1338 .Ar name .
1339 .It Fl m Ar message
1340 Use the specified tag message when creating the new tag.
1341 Without the
1342 .Fl m
1343 option,
1344 .Cm got tag
1345 opens a temporary file in an editor where a tag message can be written.
1346 .It Fl r Ar repository-path
1347 Use the repository at the specified path.
1348 If not specified, assume the repository is located at or above the current
1349 working directory.
1350 If this directory is a
1351 .Nm
1352 work tree, use the repository path associated with this work tree.
1353 .It Fl s Ar signer-id
1354 While creating a new tag, sign this tag with the identity given in
1355 .Ar signer-id .
1356 .Pp
1357 For SSH-based signatures,
1358 .Ar signer-id
1359 is the path to a file which may refer to either a private SSH key,
1360 or a public SSH key with the private half available via
1361 .Xr ssh-agent 1 .
1362 .Cm got tag
1363 will sign the tag object by invoking
1364 .Xr ssh-keygen 1
1365 with the
1366 .Fl Y Cm sign
1367 command, using the signature namespace
1368 .Dq git
1369 for compatibility with
1370 .Xr git 1 .
1371 .It Fl V
1372 Verify tag object signatures.
1373 If a
1374 .Ar name
1375 is specified, show and verify the tag object with the provided name.
1376 Otherwise, list all tag objects and verify signatures where present.
1377 .Pp
1378 .Cm got tag
1379 verifies SSH-based signatures by invoking
1380 .Xr ssh-keygen 1
1381 with the options
1382 .Fl Y Cm verify Fl f Ar allowed_signers .
1383 A path to the
1384 .Ar allowed_signers
1385 file must be set in
1386 .Xr got.conf 5 ,
1387 otherwise verification is impossible.
1388 .It Fl v
1389 Verbose mode.
1390 During SSH signature creation and verification this option will be passed to
1391 .Xr ssh-keygen 1 .
1392 Multiple -v options increase the verbosity.
1393 The maximum is 3.
1394 .El
1395 .Pp
1396 By design, the
1397 .Cm got tag
1398 command will not delete tags or change existing tags.
1399 If a tag must be deleted, the
1400 .Cm got ref
1401 command may be used to delete a tag's reference.
1402 This should only be done if the tag has not already been copied to
1403 another repository.
1404 .It Xo
1405 .Cm add
1406 .Op Fl IR
1407 .Ar path ...
1408 .Xc
1409 Schedule unversioned files in a work tree for addition to the
1410 repository in the next commit.
1411 By default, files which match a
1412 .Cm got status
1413 ignore pattern will not be added.
1414 .Pp
1415 If a
1416 .Ar path
1417 mentioned in the command line is not an unversioned file then
1418 .Cm got add
1419 may raise an error.
1420 To avoid unnecessary errors from paths picked up by file globbing patterns
1421 in the shell, paths in the argument list will be silently ignored if they
1422 are not reported by
1423 .Cm got status
1424 at all, or if they are reported with one of the following status codes
1425 and do not have changes staged via
1426 .Cm got stage :
1427 .Bl -column YXZ description
1428 .It M Ta modified file
1429 .It A Ta file scheduled for addition in next commit
1430 .It C Ta modified or added file which contains merge conflicts
1431 .It m Ta modified file modes (executable bit only)
1432 .El
1433 .Pp
1434 The options for
1435 .Cm got add
1436 are as follows:
1437 .Bl -tag -width Ds
1438 .It Fl I
1439 Add files even if they match a
1440 .Cm got status
1441 ignore pattern.
1442 .It Fl R
1443 Permit recursion into directories.
1444 If this option is not specified,
1445 .Cm got add
1446 will refuse to run if a specified
1447 .Ar path
1448 is a directory.
1449 .El
1450 .Tg rm
1451 .It Xo
1452 .Cm remove
1453 .Op Fl fkR
1454 .Op Fl s Ar status-codes
1455 .Ar path ...
1456 .Xc
1457 .Dl Pq alias: Cm rm
1458 Remove versioned files from a work tree and schedule them for deletion
1459 from the repository in the next commit.
1460 .Pp
1461 The options for
1462 .Cm got remove
1463 are as follows:
1464 .Bl -tag -width Ds
1465 .It Fl f
1466 Perform the operation even if a file contains local modifications,
1467 and do not raise an error if a specified
1468 .Ar path
1469 does not exist on disk.
1470 .It Fl k
1471 Keep affected files on disk.
1472 .It Fl R
1473 Permit recursion into directories.
1474 If this option is not specified,
1475 .Cm got remove
1476 will refuse to run if a specified
1477 .Ar path
1478 is a directory.
1479 .It Fl s Ar status-codes
1480 Only delete files with a modification status matching one of the
1481 single-character status codes contained in the
1482 .Ar status-codes
1483 argument.
1484 The following status codes may be specified:
1485 .Bl -column YXZ description
1486 .It M Ta modified file (this implies the
1487 .Fl f
1488 option)
1489 .It ! Ta versioned file expected on disk but missing
1490 .El
1491 .El
1492 .Tg pa
1493 .It Xo
1494 .Cm patch
1495 .Op Fl nR
1496 .Op Fl c Ar commit
1497 .Op Fl p Ar strip-count
1498 .Op Ar patchfile
1499 .Xc
1500 .Dl Pq alias: Cm pa
1501 Apply changes from
1502 .Ar patchfile
1503 to files in a work tree.
1504 Files added or removed by a patch will be scheduled for addition or removal in
1505 the work tree.
1506 .Pp
1507 The patch must be in the unified diff format as produced by
1508 .Cm got diff ,
1509 .Xr git-diff 1 ,
1510 or by
1511 .Xr diff 1
1512 and
1513 .Xr cvs 1
1514 diff when invoked with their
1515 .Fl u
1516 options.
1517 If no
1518 .Ar patchfile
1519 argument is provided, read unified diff data from standard input instead.
1520 .Pp
1521 If the
1522 .Ar patchfile
1523 contains multiple patches, then attempt to apply each of them in sequence.
1524 .Pp
1525 Show the status of each affected file, using the following status codes:
1526 .Bl -column XYZ description
1527 .It M Ta file was modified
1528 .It G Ta file was merged using a merge-base found in the repository
1529 .It C Ta file was merged and conflicts occurred during merge
1530 .It D Ta file was deleted
1531 .It A Ta file was added
1532 .It # Ta failed to patch the file
1533 .El
1534 .Pp
1535 If a change does not match at its exact line number, attempt to
1536 apply it somewhere else in the file if a good spot can be found.
1537 Otherwise, the patch will fail to apply.
1538 .Pp
1539 .Nm
1540 .Cm patch
1541 will refuse to apply a patch if certain preconditions are not met.
1542 Files to be deleted must already be under version control, and must
1543 not have been scheduled for deletion already.
1544 Files to be added must not yet be under version control and must not
1545 already be present on disk.
1546 Files to be modified must already be under version control and may not
1547 contain conflict markers.
1548 .Pp
1549 If an error occurs, the
1550 .Cm patch
1551 operation will be aborted.
1552 Any changes made to the work tree up to this point will be left behind.
1553 Such changes can be viewed with
1554 .Cm got diff
1555 and can be reverted with
1556 .Cm got revert
1557 if needed.
1558 .Pp
1559 The options for
1560 .Cm got patch
1561 are as follows:
1562 .Bl -tag -width Ds
1563 .It Fl c Ar commit
1564 Attempt to locate files within the specified
1565 .Ar commit
1566 for use as a merge-base for 3-way merges.
1567 Ideally, the specified
1568 .Ar commit
1569 should contain versions of files which the changes contained in the
1570 .Ar patchfile
1571 were based on.
1572 Files will be located by path, relative to the repository root.
1573 If the
1574 .Fl p
1575 option is used then leading path components will be stripped
1576 before paths are looked up in the repository.
1577 .Pp
1578 If the
1579 .Fl c
1580 option is not used then
1581 .Cm got patch
1582 will attempt to locate merge-bases via object IDs found in
1583 .Ar patchfile
1584 meta-data, such as produced by
1585 .Cm got diff
1587 .Xr git-diff 1 .
1588 Use of the
1589 .Fl c
1590 option is only recommended in the absence of such meta-data.
1591 .Pp
1592 In case no merge-base is available for a file, changes will be applied
1593 without doing a 3-way merge.
1594 Changes which do not apply cleanly may then be rejected entirely, rather
1595 than producing merge conflicts in the patched target file.
1596 .It Fl n
1597 Do not make any modifications to the work tree.
1598 This can be used to check whether a patch would apply without issues.
1599 If the
1600 .Ar patchfile
1601 contains diffs that affect the same file multiple times, the results
1602 displayed may be incorrect.
1603 .It Fl p Ar strip-count
1604 Specify the number of leading path components to strip from paths
1605 parsed from
1606 .Ar patchfile .
1607 If the
1608 .Fl p
1609 option is not used,
1610 .Sq a/
1611 and
1612 .Sq b/
1613 path prefixes generated by
1614 .Xr git-diff 1
1615 will be recognized and stripped automatically.
1616 .It Fl R
1617 Reverse the patch before applying it.
1618 .El
1619 .Tg rv
1620 .It Xo
1621 .Cm revert
1622 .Op Fl pR
1623 .Op Fl F Ar response-script
1624 .Ar path ...
1625 .Xc
1626 .Dl Pq alias: Cm rv
1627 Revert any local changes in files at the specified paths in a work tree.
1628 File contents will be overwritten with those contained in the
1629 work tree's base commit.
1630 There is no way to bring discarded changes back after
1631 .Cm got revert !
1632 .Pp
1633 If a file was added with
1634 .Cm got add ,
1635 it will become an unversioned file again.
1636 If a file was deleted with
1637 .Cm got remove ,
1638 it will be restored.
1639 .Pp
1640 The options for
1641 .Cm got revert
1642 are as follows:
1643 .Bl -tag -width Ds
1644 .It Fl F Ar response-script
1645 With the
1646 .Fl p
1647 option, read
1648 .Dq y ,
1649 .Dq n ,
1650 and
1651 .Dq q
1652 responses line-by-line from the specified
1653 .Ar response-script
1654 file instead of prompting interactively.
1655 .It Fl p
1656 Instead of reverting all changes in files, interactively select or reject
1657 changes to revert based on
1658 .Dq y
1659 (revert change),
1660 .Dq n
1661 (keep change), and
1662 .Dq q
1663 (quit reverting this file) responses.
1664 If a file is in modified status, individual patches derived from the
1665 modified file content can be reverted.
1666 Files in added or deleted status may only be reverted in their entirety.
1667 .It Fl R
1668 Permit recursion into directories.
1669 If this option is not specified,
1670 .Cm got revert
1671 will refuse to run if a specified
1672 .Ar path
1673 is a directory.
1674 .El
1675 .Tg ci
1676 .It Xo
1677 .Cm commit
1678 .Op Fl CNnS
1679 .Op Fl A Ar author
1680 .Op Fl F Ar path
1681 .Op Fl m Ar message
1682 .Op Ar path ...
1683 .Xc
1684 .Dl Pq alias: Cm ci
1685 Create a new commit in the repository from changes in a work tree
1686 and use this commit as the new base commit for the work tree.
1687 If no
1688 .Ar path
1689 is specified, commit all changes in the work tree.
1690 Otherwise, commit changes at or within the specified paths.
1691 .Pp
1692 If changes have been explicitly staged for commit with
1693 .Cm got stage ,
1694 only commit staged changes and reject any specified paths which
1695 have not been staged.
1696 .Pp
1697 .Cm got commit
1698 opens a temporary file in an editor where a log message can be written
1699 unless the
1700 .Fl m
1701 option is used
1702 or the
1703 .Fl F
1704 and
1705 .Fl N
1706 options are used together.
1707 .Pp
1708 Show the status of each affected file, using the following status codes:
1709 .Bl -column YXZ description
1710 .It M Ta modified file
1711 .It D Ta file was deleted
1712 .It A Ta new file was added
1713 .It m Ta modified file modes (executable bit only)
1714 .El
1715 .Pp
1716 Files which are not part of the new commit will retain their previously
1717 recorded base commit.
1718 Some
1719 .Nm
1720 commands may refuse to run while the work tree contains files from
1721 multiple base commits.
1722 The base commit of such a work tree can be made consistent by running
1723 .Cm got update
1724 across the entire work tree.
1725 .Pp
1726 The
1727 .Cm got commit
1728 command requires the
1729 .Ev GOT_AUTHOR
1730 environment variable to be set,
1731 unless an author has been configured in
1732 .Xr got.conf 5
1733 or Git's
1734 .Dv user.name
1735 and
1736 .Dv user.email
1737 configuration settings can be
1738 obtained from the repository's
1739 .Pa .git/config
1740 file or from Git's global
1741 .Pa ~/.gitconfig
1742 configuration file.
1743 .Pp
1744 The options for
1745 .Cm got commit
1746 are as follows:
1747 .Bl -tag -width Ds
1748 .It Fl A Ar author
1749 Set author information in the newly created commit to
1750 .Ar author .
1751 This is useful when committing changes on behalf of someone else.
1752 The
1753 .Ar author
1754 argument must use the same format as the
1755 .Ev GOT_AUTHOR
1756 environment variable.
1757 .Pp
1758 In addition to storing author information, the newly created commit
1759 object will retain
1760 .Dq committer
1761 information which is obtained, as usual, from the
1762 .Ev GOT_AUTHOR
1763 environment variable, or
1764 .Xr got.conf 5 ,
1765 or Git configuration settings.
1766 .It Fl C
1767 Allow committing files in conflicted status.
1768 .Pp
1769 Committing files with conflict markers should generally be avoided.
1770 Cases where conflict markers must be stored in the repository for
1771 some legitimate reason should be very rare.
1772 There are usually ways to avoid storing conflict markers verbatim by
1773 applying appropriate programming tricks.
1774 .It Fl F Ar path
1775 Use the prepared log message stored in the file found at
1776 .Ar path
1777 when creating the new commit.
1778 .Cm got commit
1779 opens a temporary file in an editor where the prepared log message can be
1780 reviewed and edited further if needed.
1781 Cannot be used together with the
1782 .Fl m
1783 option.
1784 .It Fl m Ar message
1785 Use the specified log message when creating the new commit.
1786 Cannot be used together with the
1787 .Fl F
1788 option.
1789 .It Fl N
1790 This option prevents
1791 .Cm got commit
1792 from opening the commit message in an editor.
1793 It has no effect unless it is used together with the
1794 .Fl F
1795 option and is intended for non-interactive use such as scripting.
1796 .It Fl n
1797 This option prevents
1798 .Cm got commit
1799 from generating a diff of the to-be-committed changes in a temporary file
1800 which can be viewed while editing a commit message.
1801 .It Fl S
1802 Allow the addition of symbolic links which point outside of the path space
1803 that is under version control.
1804 By default,
1805 .Cm got commit
1806 will reject such symbolic links due to safety concerns.
1807 As a precaution,
1808 .Nm
1809 may decide to represent such a symbolic link as a regular file which contains
1810 the link's target path, rather than creating an actual symbolic link which
1811 points outside of the work tree.
1812 Use of this option is discouraged because external mechanisms such as
1813 .Dq make obj
1814 are better suited for managing symbolic links to paths not under
1815 version control.
1816 .El
1817 .Pp
1818 .Cm got commit
1819 will refuse to run if certain preconditions are not met.
1820 If the work tree's current branch is not in the
1821 .Dq refs/heads/
1822 reference namespace, new commits may not be created on this branch.
1823 Local changes may only be committed if they are based on file content
1824 found in the most recent commit on the work tree's branch.
1825 If a path is found to be out of date,
1826 .Cm got update
1827 must be used first in order to merge local changes with changes made
1828 in the repository.
1829 .Tg se
1830 .It Xo
1831 .Cm send
1832 .Op Fl afqTv
1833 .Op Fl b Ar branch
1834 .Op Fl d Ar branch
1835 .Op Fl r Ar repository-path
1836 .Op Fl t Ar tag
1837 .Op Ar remote-repository
1838 .Xc
1839 .Dl Pq alias: Cm se
1840 Send new changes to a remote repository.
1841 If no
1842 .Ar remote-repository
1843 is specified,
1844 .Dq origin
1845 will be used.
1846 The remote repository's URL is obtained from the corresponding entry in
1847 .Xr got.conf 5
1848 or Git's
1849 .Pa config
1850 file of the local repository, as created by
1851 .Cm got clone .
1852 .Pp
1853 All objects corresponding to new changes will be written to a temporary
1854 pack file which is then uploaded to the server.
1855 Upon success, references in the
1856 .Dq refs/remotes/
1857 reference namespace of the local repository will be updated to point at
1858 the commits which have been sent.
1859 .Pp
1860 By default, changes will only be sent if they are based on up-to-date
1861 copies of relevant branches in the remote repository.
1862 If any changes to be sent are based on out-of-date copies or would
1863 otherwise break linear history of existing branches, new changes must
1864 be fetched from the server with
1865 .Cm got fetch
1866 and local branches must be rebased with
1867 .Cm got rebase
1868 before
1869 .Cm got send
1870 can succeed.
1871 The
1872 .Fl f
1873 option can be used to make exceptions to these requirements.
1874 .Pp
1875 The options for
1876 .Cm got send
1877 are as follows:
1878 .Bl -tag -width Ds
1879 .It Fl a
1880 Send all branches from the local repository's
1881 .Dq refs/heads/
1882 reference namespace.
1883 The
1884 .Fl a
1885 option is equivalent to listing all branches with multiple
1886 .Fl b
1887 options.
1888 Cannot be used together with the
1889 .Fl b
1890 option.
1891 .It Fl b Ar branch
1892 Send the specified
1893 .Ar branch
1894 from the local repository's
1895 .Dq refs/heads/
1896 reference namespace.
1897 This option may be specified multiple times to build a list of branches
1898 to send.
1899 If this option is not specified, default to the work tree's current branch
1900 if invoked in a work tree, or to the repository's HEAD reference.
1901 Cannot be used together with the
1902 .Fl a
1903 option.
1904 .It Fl d Ar branch
1905 Delete the specified
1906 .Ar branch
1907 from the remote repository's
1908 .Dq refs/heads/
1909 reference namespace.
1910 This option may be specified multiple times to build a list of branches
1911 to delete.
1912 .Pp
1913 Only references are deleted.
1914 Any commit, tree, tag, and blob objects belonging to deleted branches
1915 may become subject to deletion by Git's garbage collector running on
1916 the server.
1917 .Pp
1918 Requesting deletion of branches results in an error if the server
1919 does not support this feature or disallows the deletion of branches
1920 based on its configuration.
1921 .It Fl f
1922 Attempt to force the server to overwrite existing branches or tags
1923 in the remote repository, even when
1924 .Cm got fetch
1925 and
1926 .Cm got rebase
1927 would usually be required before changes can be sent.
1928 The server may reject forced requests regardless, depending on its
1929 configuration.
1930 .Pp
1931 Any commit, tree, tag, and blob objects belonging to overwritten branches
1932 or tags may become subject to deletion by Git's garbage collector running
1933 on the server.
1934 .Pp
1935 The
1936 .Dq refs/tags
1937 reference namespace is globally shared between all repositories.
1938 Use of the
1939 .Fl f
1940 option to overwrite tags is discouraged because it can lead to
1941 inconsistencies between the tags present in different repositories.
1942 In general, creating a new tag with a different name is recommended
1943 instead of overwriting an existing tag.
1944 .Pp
1945 Use of the
1946 .Fl f
1947 option is particularly discouraged if changes being sent are based
1948 on an out-of-date copy of a branch in the remote repository.
1949 Instead of using the
1950 .Fl f
1951 option, new changes should
1952 be fetched with
1953 .Cm got fetch
1954 and local branches should be rebased with
1955 .Cm got rebase ,
1956 followed by another attempt to send the changes.
1957 .Pp
1958 The
1959 .Fl f
1960 option should only be needed in situations where the remote repository's
1961 copy of a branch or tag is known to be out-of-date and is considered
1962 disposable.
1963 The risks of creating inconsistencies between different repositories
1964 should also be taken into account.
1965 .It Fl q
1966 Suppress progress reporting output.
1967 The same option will be passed to
1968 .Xr ssh 1
1969 if applicable.
1970 .It Fl r Ar repository-path
1971 Use the repository at the specified path.
1972 If not specified, assume the repository is located at or above the current
1973 working directory.
1974 If this directory is a
1975 .Nm
1976 work tree, use the repository path associated with this work tree.
1977 .It Fl T
1978 Attempt to send all tags from the local repository's
1979 .Dq refs/tags/
1980 reference namespace.
1981 The
1982 .Fl T
1983 option is equivalent to listing all tags with multiple
1984 .Fl t
1985 options.
1986 Cannot be used together with the
1987 .Fl t
1988 option.
1989 .It Fl t Ar tag
1990 Send the specified
1991 .Ar tag
1992 from the local repository's
1993 .Dq refs/tags/
1994 reference namespace, in addition to any branches that are being sent.
1995 The
1996 .Fl t
1997 option may be specified multiple times to build a list of tags to send.
1998 No tags will be sent if the
1999 .Fl t
2000 option is not used.
2001 .Pp
2002 Raise an error if the specified
2003 .Ar tag
2004 already exists in the remote repository, unless the
2005 .Fl f
2006 option is used to overwrite the server's copy of the tag.
2007 In general, creating a new tag with a different name is recommended
2008 instead of overwriting an existing tag.
2009 .Pp
2010 Cannot be used together with the
2011 .Fl T
2012 option.
2013 .It Fl v
2014 Verbose mode.
2015 Causes
2016 .Cm got send
2017 to print debugging messages to standard error output.
2018 The same option will be passed to
2019 .Xr ssh 1
2020 if applicable.
2021 Multiple -v options increase the verbosity.
2022 The maximum is 3.
2023 .El
2024 .Tg cy
2025 .It Xo
2026 .Cm cherrypick
2027 .Op Fl lX
2028 .Op Ar commit
2029 .Xc
2030 .Dl Pq alias: Cm cy
2031 Merge changes from a single
2032 .Ar commit
2033 into the work tree.
2034 The specified
2035 .Ar commit
2036 should be on a different branch than the work tree's base commit.
2037 The expected argument is a reference or a commit ID SHA1 hash.
2038 An abbreviated hash argument will be expanded to a full SHA1 hash
2039 automatically, provided the abbreviation is unique.
2040 .Pp
2041 Show the status of each affected file, using the following status codes:
2042 .Bl -column YXZ description
2043 .It G Ta file was merged
2044 .It C Ta file was merged and conflicts occurred during merge
2045 .It ! Ta changes destined for a missing file were not merged
2046 .It D Ta file was deleted
2047 .It d Ta file's deletion was prevented by local modifications
2048 .It A Ta new file was added
2049 .It \(a~ Ta changes destined for a non-regular file were not merged
2050 .It ? Ta changes destined for an unversioned file were not merged
2051 .El
2052 .Pp
2053 The merged changes will appear as local changes in the work tree, which
2054 may be viewed with
2055 .Cm got diff ,
2056 amended manually or with further
2057 .Cm got cherrypick
2058 commands,
2059 committed with
2060 .Cm got commit .
2061 .Pp
2062 If invoked in a work tree where no
2063 .Cm rebase ,
2064 .Cm histedit ,
2066 .Cm merge
2067 operation is taking place,
2068 .Cm got cherrypick
2069 creates a record of commits which have been merged into the work tree.
2070 When a file changed by
2071 .Cm got cherrypick
2072 is committed with
2073 .Cm got commit ,
2074 the log messages of relevant merged commits will then appear in the editor,
2075 where the messages should be further adjusted to convey the reasons for
2076 cherrypicking the changes.
2077 Upon exiting the editor, if the time stamp of the log message file
2078 is unchanged or the log message is empty,
2079 .Cm got commit
2080 will fail with an unmodified or empty log message error.
2081 .Pp
2082 If all the changes in all files touched by a given commit are discarded,
2083 e.g. with
2084 .Cm got revert ,
2085 this commit's log message record will also disappear.
2086 .Pp
2087 .Cm got cherrypick
2088 will refuse to run if certain preconditions are not met.
2089 If the work tree contains multiple base commits, it must first be updated
2090 to a single base commit with
2091 .Cm got update .
2092 If any relevant files already contain merge conflicts, these
2093 conflicts must be resolved first.
2094 .Pp
2095 The options for
2096 .Nm
2097 .Cm cherrypick
2098 are as follows:
2099 .Bl -tag -width Ds
2100 .It Fl l
2101 Display a list of commit log messages recorded by cherrypick operations,
2102 represented by references in the
2103 .Dq refs/got/worktree
2104 reference namespace.
2105 If a
2106 .Ar commit
2107 is specified, only show the log message of the specified commit.
2108 .Pp
2109 If invoked in a work tree, only log messages recorded by cherrypick operations
2110 in the current work tree will be displayed.
2111 Otherwise, all commit log messages will be displayed irrespective of the
2112 work tree in which they were created.
2113 This option cannot be used with
2114 .Fl X .
2115 .It Fl X
2116 Delete log messages created by previous cherrypick operations, represented by
2117 references in the
2118 .Dq refs/got/worktree
2119 reference namespace.
2120 If a
2121 .Ar commit
2122 is specified, only delete the log message of the specified commit.
2123 .Pp
2124 If invoked in a work tree, only log messages recorded by cherrypick operations
2125 in the current work tree will be deleted.
2126 Otherwise, all commit log messages will be deleted irrespective of the
2127 work tree in which they were created.
2128 This option cannot be used with
2129 .Fl l .
2130 .El
2131 .Pp
2132 .Tg bo
2133 .It Xo
2134 .Cm backout
2135 .Op Fl lX
2136 .Op Ar commit
2137 .Xc
2138 .Dl Pq alias: Cm bo
2139 Reverse-merge changes from a single
2140 .Ar commit
2141 into the work tree.
2142 The specified
2143 .Ar commit
2144 should be on the same branch as the work tree's base commit.
2145 The expected argument is a reference or a commit ID SHA1 hash.
2146 An abbreviated hash argument will be expanded to a full SHA1 hash
2147 automatically, provided the abbreviation is unique.
2148 .Pp
2149 Show the status of each affected file, using the following status codes:
2150 .Bl -column YXZ description
2151 .It G Ta file was merged
2152 .It C Ta file was merged and conflicts occurred during merge
2153 .It ! Ta changes destined for a missing file were not merged
2154 .It D Ta file was deleted
2155 .It d Ta file's deletion was prevented by local modifications
2156 .It A Ta new file was added
2157 .It \(a~ Ta changes destined for a non-regular file were not merged
2158 .It ? Ta changes destined for an unversioned file were not merged
2159 .El
2160 .Pp
2161 The reverse-merged changes will appear as local changes in the work tree,
2162 which may be viewed with
2163 .Cm got diff ,
2164 amended manually or with further
2165 .Cm got backout
2166 commands,
2167 committed with
2168 .Cm got commit .
2169 .Pp
2170 If invoked in a work tree where no
2171 .Cm rebase ,
2172 .Cm histedit ,
2174 .Cm merge
2175 operation is taking place,
2176 .Cm got backout
2177 creates a record of commits which have been reverse-merged into the work tree.
2178 When a file changed by
2179 .Cm got backout
2180 is committed with
2181 .Cm got commit ,
2182 the log messages of relevant reverse-merged commits will then appear in
2183 the editor, where the messages should be further adjusted to convey the
2184 reasons for backing out the changes.
2185 Upon exiting the editor, if the time stamp of the log message file
2186 is unchanged or the log message is empty,
2187 .Cm got commit
2188 will fail with an unmodified or empty log message error.
2189 .Pp
2190 If all the changes in all files touched by a given commit are discarded,
2191 e.g. with
2192 .Cm got revert ,
2193 this commit's log message record will also disappear.
2194 .Pp
2195 .Cm got backout
2196 will refuse to run if certain preconditions are not met.
2197 If the work tree contains multiple base commits, it must first be updated
2198 to a single base commit with
2199 .Cm got update .
2200 If any relevant files already contain merge conflicts, these
2201 conflicts must be resolved first.
2202 .Pp
2203 The options for
2204 .Nm
2205 .Cm backout
2206 are as follows:
2207 .Bl -tag -width Ds
2208 .It Fl l
2209 Display a list of commit log messages recorded by backout operations,
2210 represented by references in the
2211 .Dq refs/got/worktree
2212 reference namespace.
2213 If a
2214 .Ar commit
2215 is specified, only show the log message of the specified commit.
2216 .Pp
2217 If invoked in a work tree, only log messages recorded by backout operations
2218 in the current work tree will be displayed.
2219 Otherwise, all commit log messages will be displayed irrespective of the
2220 work tree in which they were created.
2221 This option cannot be used with
2222 .Fl X .
2223 .It Fl X
2224 Delete log messages created by previous backout operations, represented by
2225 references in the
2226 .Dq refs/got/worktree
2227 reference namespace.
2228 If a
2229 .Ar commit
2230 is specified, only delete the log message of the specified commit.
2231 .Pp
2232 If invoked in a work tree, only log messages recorded by backout operations
2233 in the current work tree will be deleted.
2234 Otherwise, all commit log messages will be deleted irrespective of the
2235 work tree in which they were created.
2236 This option cannot be used with
2237 .Fl l .
2238 .El
2239 .Pp
2240 .Tg rb
2241 .It Xo
2242 .Cm rebase
2243 .Op Fl aCclX
2244 .Op Ar branch
2245 .Xc
2246 .Dl Pq alias: Cm rb
2247 Rebase commits on the specified
2248 .Ar branch
2249 onto the tip of the current branch of the work tree.
2250 The
2251 .Ar branch
2252 must share common ancestry with the work tree's current branch.
2253 Rebasing begins with the first descendant commit of the youngest
2254 common ancestor commit shared by the specified
2255 .Ar branch
2256 and the work tree's current branch, and stops once the tip commit
2257 of the specified
2258 .Ar branch
2259 has been rebased.
2260 .Pp
2261 When
2262 .Cm got rebase
2263 is used as intended, the specified
2264 .Ar branch
2265 represents a local commit history and may already contain changes
2266 that are not yet visible in any other repositories.
2267 The work tree's current branch, which must be set with
2268 .Cm got update -b
2269 before starting the
2270 .Cm rebase
2271 operation, represents a branch from a remote repository which shares
2272 a common history with the specified
2273 .Ar branch
2274 but has progressed, and perhaps diverged, due to commits added to the
2275 remote repository.
2276 .Pp
2277 Rebased commits are accumulated on a temporary branch which the work tree
2278 will remain switched to throughout the entire rebase operation.
2279 Commits on this branch represent the same changes with the same log
2280 messages as their counterparts on the original
2281 .Ar branch ,
2282 but with different commit IDs.
2283 Once rebasing has completed successfully, the temporary branch becomes
2284 the new version of the specified
2285 .Ar branch
2286 and the work tree is automatically switched to it.
2287 If author information is available via the
2288 .Ev GOT_AUTHOR
2289 environment variable,
2290 .Xr got.conf 5
2291 or Git's
2292 .Dv user.name
2293 and
2294 .Dv user.email
2295 configuration settings, this author information will be used to identify
2296 the
2297 .Dq committer
2298 of rebased commits.
2299 .Pp
2300 Old commits in their pre-rebase state are automatically backed up in the
2301 .Dq refs/got/backup/rebase
2302 reference namespace.
2303 As long as these references are not removed older versions of rebased
2304 commits will remain in the repository and can be viewed with the
2305 .Cm got rebase -l
2306 command.
2307 Removal of these references makes objects which become unreachable via
2308 any reference subject to removal by Git's garbage collector or
2309 .Cm gotadmin cleanup .
2310 .Pp
2311 While rebasing commits, show the status of each affected file,
2312 using the following status codes:
2313 .Bl -column YXZ description
2314 .It G Ta file was merged
2315 .It C Ta file was merged and conflicts occurred during merge
2316 .It ! Ta changes destined for a missing file were not merged
2317 .It D Ta file was deleted
2318 .It d Ta file's deletion was prevented by local modifications
2319 .It A Ta new file was added
2320 .It \(a~ Ta changes destined for a non-regular file were not merged
2321 .It ? Ta changes destined for an unversioned file were not merged
2322 .El
2323 .Pp
2324 If merge conflicts occur, the rebase operation is interrupted and may
2325 be continued once conflicts have been resolved.
2326 If any files with destined changes are found to be missing or unversioned,
2327 or if files could not be deleted due to differences in deleted content,
2328 the rebase operation will be interrupted to prevent potentially incomplete
2329 changes from being committed to the repository without user intervention.
2330 The work tree may be modified as desired and the rebase operation can be
2331 continued once the changes present in the work tree are considered complete.
2332 Alternatively, the rebase operation may be aborted which will leave
2333 .Ar branch
2334 unmodified and the work tree switched back to its original branch.
2335 .Pp
2336 If a merge conflict is resolved in a way which renders the merged
2337 change into a no-op change, the corresponding commit will be elided
2338 when the rebase operation continues.
2339 .Pp
2340 .Cm got rebase
2341 will refuse to run if certain preconditions are not met.
2342 If the
2343 .Ar branch
2344 is not in the
2345 .Dq refs/heads/
2346 reference namespace, the branch may not be rebased.
2347 If the work tree is not yet fully updated to the tip commit of its
2348 branch, then the work tree must first be updated with
2349 .Cm got update .
2350 If changes have been staged with
2351 .Cm got stage ,
2352 these changes must first be committed with
2353 .Cm got commit
2354 or unstaged with
2355 .Cm got unstage .
2356 If the work tree contains local changes, these changes must first be
2357 committed with
2358 .Cm got commit
2359 or reverted with
2360 .Cm got revert .
2361 If the
2362 .Ar branch
2363 contains changes to files outside of the work tree's path prefix,
2364 the work tree cannot be used to rebase this branch.
2365 .Pp
2366 The
2367 .Cm got update ,
2368 .Cm got integrate ,
2369 .Cm got merge ,
2370 .Cm got commit ,
2371 and
2372 .Cm got histedit
2373 commands will refuse to run while a rebase operation is in progress.
2374 Other commands which manipulate the work tree may be used for
2375 conflict resolution purposes.
2376 .Pp
2377 If the specified
2378 .Ar branch
2379 is already based on the work tree's current branch, then no commits
2380 need to be rebased and
2381 .Cm got rebase
2382 will simply switch the work tree to the specified
2383 .Ar branch
2384 and update files in the work tree accordingly.
2385 .Pp
2386 The options for
2387 .Cm got rebase
2388 are as follows:
2389 .Bl -tag -width Ds
2390 .It Fl a
2391 Abort an interrupted rebase operation.
2392 If this option is used, no other command-line arguments are allowed.
2393 .It Fl C
2394 Allow a rebase operation to continue with files in conflicted status.
2395 This option should generally be avoided, and can only be used with the
2396 .Fl c
2397 option.
2398 .It Fl c
2399 Continue an interrupted rebase operation.
2400 If this option is used, no other command-line arguments are allowed.
2401 .It Fl l
2402 Show a list of past rebase operations, represented by references in the
2403 .Dq refs/got/backup/rebase
2404 reference namespace.
2405 .Pp
2406 Display the author, date, and log message of each backed up commit,
2407 the object ID of the corresponding post-rebase commit, and
2408 the object ID of their common ancestor commit.
2409 Given these object IDs,
2410 the
2411 .Cm got log
2412 command with the
2413 .Fl c
2414 and
2415 .Fl x
2416 options can be used to examine the history of either version of the branch,
2417 and the
2418 .Cm got branch
2419 command with the
2420 .Fl c
2421 option can be used to create a new branch from a pre-rebase state if desired.
2422 .Pp
2423 If a
2424 .Ar branch
2425 is specified, only show commits which at some point in time represented this
2426 branch.
2427 Otherwise, list all backed up commits for any branches.
2428 .Pp
2429 If this option is used,
2430 .Cm got rebase
2431 does not require a work tree.
2432 None of the other options can be used together with
2433 .Fl l .
2434 .It Fl X
2435 Delete backups created by past rebase operations, represented by references
2436 in the
2437 .Dq refs/got/backup/rebase
2438 reference namespace.
2439 .Pp
2440 If a
2441 .Ar branch
2442 is specified, only delete backups which at some point in time represented
2443 this branch.
2444 Otherwise, delete all references found within
2445 .Dq refs/got/backup/rebase .
2446 .Pp
2447 Any commit, tree, tag, and blob objects belonging to deleted backups
2448 remain in the repository and may be removed separately with
2449 Git's garbage collector or
2450 .Cm gotadmin cleanup .
2451 .Pp
2452 If this option is used,
2453 .Cm got rebase
2454 does not require a work tree.
2455 None of the other options can be used together with
2456 .Fl X .
2457 .El
2458 .Tg he
2459 .It Xo
2460 .Cm histedit
2461 .Op Fl aCcdeflmX
2462 .Op Fl F Ar histedit-script
2463 .Op Ar branch
2464 .Xc
2465 .Dl Pq alias: Cm he
2466 Edit commit history between the work tree's current base commit and
2467 the tip commit of the work tree's current branch.
2468 .Pp
2469 The
2470 .Cm got histedit
2471 command requires the
2472 .Ev GOT_AUTHOR
2473 environment variable to be set,
2474 unless an author has been configured in
2475 .Xr got.conf 5
2476 or Git's
2477 .Dv user.name
2478 and
2479 .Dv user.email
2480 configuration settings can be obtained from the repository's
2481 .Pa .git/config
2482 file or from Git's global
2483 .Pa ~/.gitconfig
2484 configuration file.
2485 .Pp
2486 Before starting a
2487 .Cm histedit
2488 operation, the work tree's current branch must be set with
2489 .Cm got update -b
2490 to the branch which should be edited, unless this branch is already the
2491 current branch of the work tree.
2492 The tip of this branch represents the upper bound (inclusive) of commits
2493 touched by the
2494 .Cm histedit
2495 operation.
2496 .Pp
2497 Furthermore, the work tree's base commit
2498 must be set with
2499 .Cm got update -c
2500 to a point in this branch's commit history where editing should begin.
2501 This commit represents the lower bound (non-inclusive) of commits touched
2502 by the
2503 .Cm histedit
2504 operation.
2505 .Pp
2506 Editing of commit history is controlled via a
2507 .Ar histedit script
2508 which can be written in an editor based on a template, passed on the
2509 command line, or generated with the
2510 .Fl d ,
2511 .Fl e ,
2512 .Fl f ,
2514 .Fl m
2515 options.
2516 .Pp
2517 The format of the histedit script is line-based.
2518 Each line in the script begins with a command name, followed by
2519 whitespace and an argument.
2520 For most commands, the expected argument is a commit ID SHA1 hash.
2521 Any remaining text on the line is ignored.
2522 Lines which begin with the
2523 .Sq #
2524 character are ignored entirely.
2525 .Pp
2526 The available histedit script commands are as follows:
2527 .Bl -column YXZ pick-commit
2528 .It Cm pick Ar commit Ta Use the specified commit as it is.
2529 .It Cm edit Ar commit Ta Apply the changes from the specified commit, but
2530 then interrupt the histedit operation for amending, without creating a commit.
2531 While the histedit operation is interrupted arbitrary files may be edited,
2532 and commands which manipulate the work tree can be used freely.
2533 The
2534 .Cm got add
2535 and
2536 .Cm got remove
2537 commands can be used to add new files or remove existing ones.
2538 The
2539 .Cm got revert -p
2540 command can be used to eliminate arbitrary changes from files in the work tree.
2541 The
2542 .Cm got stage -p
2543 command may be used to prepare a subset of changes for inclusion in the
2544 next commit.
2545 Finally, the
2546 .Cm got commit
2547 command can be used to insert arbitrary commits into the edited history.
2548 Regular editing of history must eventually be resumed by running
2549 .Cm got histedit -c .
2550 .It Cm fold Ar commit Ta Combine the specified commit with the next commit
2551 listed further below that will be used.
2552 .It Cm drop Ar commit Ta Remove this commit from the edited history.
2553 .It Cm mesg Oo Ar log-message Oc Ta Create a new log message for the commit of
2554 a preceding
2555 .Cm pick
2557 .Cm edit
2558 command on the previous line of the histedit script.
2559 The optional
2560 .Ar log-message
2561 argument provides a new single-line log message to use.
2562 If the
2563 .Ar log-message
2564 argument is omitted, open an editor where a new log message can be written.
2565 .El
2566 .Pp
2567 Every commit in the history being edited must be mentioned in the script.
2568 Lines may be re-ordered to change the order of commits in the edited history.
2569 No commit may be listed more than once.
2570 .Pp
2571 Edited commits are accumulated on a temporary branch which the work tree
2572 will remain switched to throughout the entire histedit operation.
2573 Once history editing has completed successfully, the temporary branch becomes
2574 the new version of the work tree's branch and the work tree is automatically
2575 switched to it.
2576 .Pp
2577 Old commits in their pre-histedit state are automatically backed up in the
2578 .Dq refs/got/backup/histedit
2579 reference namespace.
2580 As long as these references are not removed older versions of edited
2581 commits will remain in the repository and can be viewed with the
2582 .Cm got histedit -l
2583 command.
2584 Removal of these references makes objects which become unreachable via
2585 any reference subject to removal by Git's garbage collector or
2586 .Cm gotadmin cleanup .
2587 .Pp
2588 While merging commits, show the status of each affected file,
2589 using the following status codes:
2590 .Bl -column YXZ description
2591 .It G Ta file was merged
2592 .It C Ta file was merged and conflicts occurred during merge
2593 .It ! Ta changes destined for a missing file were not merged
2594 .It D Ta file was deleted
2595 .It d Ta file's deletion was prevented by local modifications
2596 .It A Ta new file was added
2597 .It \(a~ Ta changes destined for a non-regular file were not merged
2598 .It ? Ta changes destined for an unversioned file were not merged
2599 .El
2600 .Pp
2601 If merge conflicts occur, the histedit operation is interrupted and may
2602 be continued once conflicts have been resolved.
2603 If any files with destined changes are found to be missing or unversioned,
2604 or if files could not be deleted due to differences in deleted content,
2605 the histedit operation will be interrupted to prevent potentially incomplete
2606 changes from being committed to the repository without user intervention.
2607 The work tree may be modified as desired and the histedit operation can be
2608 continued once the changes present in the work tree are considered complete.
2609 Alternatively, the histedit operation may be aborted which will leave
2610 the work tree switched back to its original branch.
2611 .Pp
2612 If a merge conflict is resolved in a way which renders the merged
2613 change into a no-op change, the corresponding commit will be elided
2614 when the histedit operation continues.
2615 .Pp
2616 .Cm got histedit
2617 will refuse to run if certain preconditions are not met.
2618 If the work tree's current branch is not in the
2619 .Dq refs/heads/
2620 reference namespace, the history of the branch may not be edited.
2621 If the work tree contains multiple base commits, it must first be updated
2622 to a single base commit with
2623 .Cm got update .
2624 If changes have been staged with
2625 .Cm got stage ,
2626 these changes must first be committed with
2627 .Cm got commit
2628 or unstaged with
2629 .Cm got unstage .
2630 If the work tree contains local changes, these changes must first be
2631 committed with
2632 .Cm got commit
2633 or reverted with
2634 .Cm got revert .
2635 If the edited history contains changes to files outside of the work tree's
2636 path prefix, the work tree cannot be used to edit the history of this branch.
2637 .Pp
2638 The
2639 .Cm got update ,
2640 .Cm got rebase ,
2641 .Cm got merge ,
2642 and
2643 .Cm got integrate
2644 commands will refuse to run while a histedit operation is in progress.
2645 Other commands which manipulate the work tree may be used, and the
2646 .Cm got commit
2647 command may be used to commit arbitrary changes to the temporary branch
2648 while the histedit operation is interrupted.
2649 .Pp
2650 The options for
2651 .Cm got histedit
2652 are as follows:
2653 .Bl -tag -width Ds
2654 .It Fl a
2655 Abort an interrupted histedit operation.
2656 If this option is used, no other command-line arguments are allowed.
2657 .It Fl C
2658 Allow a histedit operation to continue with files in conflicted status.
2659 This option should generally be avoided, and can only be used with the
2660 .Fl c
2661 option.
2662 .It Fl c
2663 Continue an interrupted histedit operation.
2664 If this option is used, no other command-line arguments are allowed.
2665 .It Fl d
2666 Drop all commits.
2667 This option is a quick equivalent to a histedit script which drops all
2668 commits.
2669 The
2670 .Fl d
2671 option can only be used when starting a new histedit operation.
2672 If this option is used, no other command-line arguments are allowed.
2673 .It Fl e
2674 Interrupt the histedit operation for editing after merging each commit.
2675 This option is a quick equivalent to a histedit script which uses the
2676 .Cm edit
2677 command for all commits.
2678 The
2679 .Fl e
2680 option can only be used when starting a new histedit operation.
2681 If this option is used, no other command-line arguments are allowed.
2682 .It Fl F Ar histedit-script
2683 Use the specified
2684 .Ar histedit-script
2685 instead of opening a temporary file in an editor where a histedit script
2686 can be written.
2687 .It Fl f
2688 Fold all commits into a single commit.
2689 This option is a quick equivalent to a histedit script which folds all
2690 commits, combining them all into one commit.
2691 The
2692 .Fl f
2693 option can only be used when starting a new histedit operation.
2694 If this option is used, no other command-line arguments are allowed.
2695 .It Fl l
2696 Show a list of past histedit operations, represented by references in the
2697 .Dq refs/got/backup/histedit
2698 reference namespace.
2699 .Pp
2700 Display the author, date, and log message of each backed up commit,
2701 the object ID of the corresponding post-histedit commit, and
2702 the object ID of their common ancestor commit.
2703 Given these object IDs,
2704 the
2705 .Cm got log
2706 command with the
2707 .Fl c
2708 and
2709 .Fl x
2710 options can be used to examine the history of either version of the branch,
2711 and the
2712 .Cm got branch
2713 command with the
2714 .Fl c
2715 option can be used to create a new branch from a pre-histedit state if desired.
2716 .Pp
2717 If a
2718 .Ar branch
2719 is specified, only show commits which at some point in time represented this
2720 branch.
2721 Otherwise, list all backed up commits for any branches.
2722 .Pp
2723 If this option is used,
2724 .Cm got histedit
2725 does not require a work tree.
2726 None of the other options can be used together with
2727 .Fl l .
2728 .It Fl m
2729 Edit log messages only.
2730 This option is a quick equivalent to a histedit script which edits
2731 only log messages but otherwise leaves every picked commit as-is.
2732 The
2733 .Fl m
2734 option can only be used when starting a new histedit operation.
2735 If this option is used, no other command-line arguments are allowed.
2736 .It Fl X
2737 Delete backups created by past histedit operations, represented by references
2738 in the
2739 .Dq refs/got/backup/histedit
2740 reference namespace.
2741 .Pp
2742 If a
2743 .Ar branch
2744 is specified, only delete backups which at some point in time represented
2745 this branch.
2746 Otherwise, delete all references found within
2747 .Dq refs/got/backup/histedit .
2748 .Pp
2749 Any commit, tree, tag, and blob objects belonging to deleted backups
2750 remain in the repository and may be removed separately with
2751 Git's garbage collector or
2752 .Cm gotadmin cleanup .
2753 .Pp
2754 If this option is used,
2755 .Cm got histedit
2756 does not require a work tree.
2757 None of the other options can be used together with
2758 .Fl X .
2759 .El
2760 .Tg ig
2761 .It Cm integrate Ar branch
2762 .Dl Pq alias: Cm ig
2763 Integrate the specified
2764 .Ar branch
2765 into the work tree's current branch.
2766 Files in the work tree are updated to match the contents on the integrated
2767 .Ar branch ,
2768 and the reference of the work tree's branch is changed to point at the
2769 head commit of the integrated
2770 .Ar branch .
2771 .Pp
2772 Both branches can be considered equivalent after integration since they
2773 will be pointing at the same commit.
2774 Both branches remain available for future work, if desired.
2775 In case the integrated
2776 .Ar branch
2777 is no longer needed it may be deleted with
2778 .Cm got branch -d .
2779 .Pp
2780 Show the status of each affected file, using the following status codes:
2781 .Bl -column YXZ description
2782 .It U Ta file was updated
2783 .It D Ta file was deleted
2784 .It A Ta new file was added
2785 .It \(a~ Ta versioned file is obstructed by a non-regular file
2786 .It ! Ta a missing versioned file was restored
2787 .El
2788 .Pp
2789 .Cm got integrate
2790 will refuse to run if certain preconditions are not met.
2791 Most importantly, the
2792 .Ar branch
2793 must have been rebased onto the work tree's current branch with
2794 .Cm got rebase
2795 before it can be integrated, in order to linearize commit history and
2796 resolve merge conflicts.
2797 If the work tree contains multiple base commits, it must first be updated
2798 to a single base commit with
2799 .Cm got update .
2800 If changes have been staged with
2801 .Cm got stage ,
2802 these changes must first be committed with
2803 .Cm got commit
2804 or unstaged with
2805 .Cm got unstage .
2806 If the work tree contains local changes, these changes must first be
2807 committed with
2808 .Cm got commit
2809 or reverted with
2810 .Cm got revert .
2811 .Tg mg
2812 .It Xo
2813 .Cm merge
2814 .Op Fl aCcn
2815 .Op Ar branch
2816 .Xc
2817 .Dl Pq alias: Cm mg
2818 Merge the specified
2819 .Ar branch
2820 into the current branch of the work tree.
2821 If the branches have diverged, creates a merge commit.
2822 Otherwise, if
2823 .Ar branch
2824 already includes all commits from the work tree's branch, updates the work
2825 tree's branch to be the same as
2826 .Ar branch
2827 without creating a commit, and updates the work tree to the most recent commit
2828 on the branch.
2829 .Pp
2830 If a linear project history is desired, then use of
2831 .Cm got rebase
2832 should be preferred over
2833 .Cm got merge .
2834 However, even strictly linear projects may require merge commits in order
2835 to merge in new versions of third-party code stored on vendor branches
2836 created with
2837 .Cm got import .
2838 .Pp
2839 Merge commits are commits based on multiple parent commits.
2840 The tip commit of the work tree's current branch, which must be in the
2841 .Dq refs/heads/
2842 reference namespace and must be set with
2843 .Cm got update -b
2844 before starting the
2845 .Cm merge
2846 operation, will be used as the first parent.
2847 The tip commit of the specified
2848 .Ar branch
2849 will be used as the second parent.
2850 .Pp
2851 No ancestral relationship between the two branches is required.
2852 If the two branches have already been merged previously, only new changes
2853 will be merged.
2854 .Pp
2855 It is not possible to create merge commits with more than two parents.
2856 If more than one branch needs to be merged, then multiple merge commits
2857 with two parents each can be created in sequence.
2858 .Pp
2859 While merging changes found on the
2860 .Ar branch
2861 into the work tree, show the status of each affected file,
2862 using the following status codes:
2863 .Bl -column YXZ description
2864 .It G Ta file was merged
2865 .It C Ta file was merged and conflicts occurred during merge
2866 .It ! Ta changes destined for a missing file were not merged
2867 .It D Ta file was deleted
2868 .It d Ta file's deletion was prevented by local modifications
2869 .It A Ta new file was added
2870 .It \(a~ Ta changes destined for a non-regular file were not merged
2871 .It ? Ta changes destined for an unversioned file were not merged
2872 .El
2873 .Pp
2874 If merge conflicts occur, the merge operation is interrupted and conflicts
2875 must be resolved before the merge operation can continue.
2876 If any files with destined changes are found to be missing or unversioned,
2877 or if files could not be deleted due to differences in deleted content,
2878 the merge operation will be interrupted to prevent potentially incomplete
2879 changes from being committed to the repository without user intervention.
2880 The work tree may be modified as desired and the merge can be continued
2881 once the changes present in the work tree are considered complete.
2882 Alternatively, the merge operation may be aborted which will leave
2883 the work tree's current branch unmodified.
2884 .Pp
2885 .Cm got merge
2886 will refuse to run if certain preconditions are not met.
2887 If the work tree's current branch is not in the
2888 .Dq refs/heads/
2889 reference namespace then the work tree must first be switched to a
2890 branch in the
2891 .Dq refs/heads/
2892 namespace with
2893 .Cm got update -b .
2894 If the work tree is not yet fully updated to the tip commit of its
2895 branch, then the work tree must first be updated with
2896 .Cm got update .
2897 If the work tree contains multiple base commits, it must first be updated
2898 to a single base commit with
2899 .Cm got update .
2900 If changes have been staged with
2901 .Cm got stage ,
2902 these changes must first be committed with
2903 .Cm got commit
2904 or unstaged with
2905 .Cm got unstage .
2906 If the work tree contains local changes, these changes must first be
2907 committed with
2908 .Cm got commit
2909 or reverted with
2910 .Cm got revert .
2911 If the
2912 .Ar branch
2913 contains changes to files outside of the work tree's path prefix,
2914 the work tree cannot be used to merge this branch.
2915 .Pp
2916 The
2917 .Cm got update ,
2918 .Cm got commit ,
2919 .Cm got rebase ,
2920 .Cm got histedit ,
2921 .Cm got integrate ,
2922 and
2923 .Cm got stage
2924 commands will refuse to run while a merge operation is in progress.
2925 Other commands which manipulate the work tree may be used for
2926 conflict resolution purposes.
2927 .Pp
2928 The options for
2929 .Cm got merge
2930 are as follows:
2931 .Bl -tag -width Ds
2932 .It Fl a
2933 Abort an interrupted merge operation.
2934 If this option is used, no other command-line arguments are allowed.
2935 .It Fl C
2936 Allow a merge operation to continue with files in conflicted status.
2937 This option should generally be avoided, and can only be used with the
2938 .Fl c
2939 option.
2940 .It Fl c
2941 Continue an interrupted merge operation.
2942 If this option is used, no other command-line arguments are allowed.
2943 .It Fl n
2944 Merge changes into the work tree as usual but do not create a merge
2945 commit immediately.
2946 The merge result can be adjusted as desired before a merge commit is
2947 created with
2948 .Cm got merge -c .
2949 Alternatively, the merge may be aborted with
2950 .Cm got merge -a .
2951 .El
2952 .Tg sg
2953 .It Xo
2954 .Cm stage
2955 .Op Fl lpS
2956 .Op Fl F Ar response-script
2957 .Op Ar path ...
2958 .Xc
2959 .Dl Pq alias: Cm sg
2960 Stage local changes for inclusion in the next commit.
2961 If no
2962 .Ar path
2963 is specified, stage all changes in the work tree.
2964 Otherwise, stage changes at or within the specified paths.
2965 Paths may be staged if they are added, modified, or deleted according to
2966 .Cm got status .
2967 .Pp
2968 Show the status of each affected file, using the following status codes:
2969 .Bl -column YXZ description
2970 .It A Ta file addition has been staged
2971 .It M Ta file modification has been staged
2972 .It D Ta file deletion has been staged
2973 .El
2974 .Pp
2975 Staged file contents are saved in newly created blob objects in the repository.
2976 These blobs will be referred to by tree objects once staged changes have been
2977 committed.
2978 .Pp
2979 Staged changes affect the behaviour of
2980 .Cm got commit ,
2981 .Cm got status ,
2982 and
2983 .Cm got diff .
2984 While paths with staged changes exist, the
2985 .Cm got commit
2986 command will refuse to commit any paths which do not have staged changes.
2987 Local changes created on top of staged changes can only be committed if
2988 the path is staged again, or if the staged changes are committed first.
2989 The
2990 .Cm got status
2991 command will show both local changes and staged changes.
2992 The
2993 .Cm got diff
2994 command is able to display local changes relative to staged changes,
2995 and to display staged changes relative to the repository.
2996 The
2997 .Cm got revert
2998 command cannot revert staged changes but may be used to revert
2999 local changes created on top of staged changes.
3000 .Pp
3001 The options for
3002 .Cm got stage
3003 are as follows:
3004 .Bl -tag -width Ds
3005 .It Fl F Ar response-script
3006 With the
3007 .Fl p
3008 option, read
3009 .Dq y ,
3010 .Dq n ,
3011 and
3012 .Dq q
3013 responses line-by-line from the specified
3014 .Ar response-script
3015 file instead of prompting interactively.
3016 .It Fl l
3017 Instead of staging new changes, list paths which are already staged,
3018 along with the IDs of staged blob objects and stage status codes.
3019 If paths were provided on the command line, show the staged paths
3020 among the specified paths.
3021 Otherwise, show all staged paths.
3022 .It Fl p
3023 Instead of staging the entire content of a changed file, interactively
3024 select or reject changes for staging based on
3025 .Dq y
3026 (stage change),
3027 .Dq n
3028 (reject change), and
3029 .Dq q
3030 (quit staging this file) responses.
3031 If a file is in modified status, individual patches derived from the
3032 modified file content can be staged.
3033 Files in added or deleted status may only be staged or rejected in
3034 their entirety.
3035 .It Fl S
3036 Allow staging of symbolic links which point outside of the path space
3037 that is under version control.
3038 By default,
3039 .Cm got stage
3040 will reject such symbolic links due to safety concerns.
3041 As a precaution,
3042 .Nm
3043 may decide to represent such a symbolic link as a regular file which contains
3044 the link's target path, rather than creating an actual symbolic link which
3045 points outside of the work tree.
3046 Use of this option is discouraged because external mechanisms such as
3047 .Dq make obj
3048 are better suited for managing symbolic links to paths not under
3049 version control.
3050 .El
3051 .Pp
3052 .Cm got stage
3053 will refuse to run if certain preconditions are not met.
3054 If a file contains merge conflicts, these conflicts must be resolved first.
3055 If a file is found to be out of date relative to the head commit on the
3056 work tree's current branch, the file must be updated with
3057 .Cm got update
3058 before it can be staged (however, this does not prevent the file from
3059 becoming out-of-date at some point after having been staged).
3060 .Pp
3061 The
3062 .Cm got update ,
3063 .Cm got rebase ,
3064 and
3065 .Cm got histedit
3066 commands will refuse to run while staged changes exist.
3067 If staged changes cannot be committed because a staged path
3068 is out of date, the path must be unstaged with
3069 .Cm got unstage
3070 before it can be updated with
3071 .Cm got update ,
3072 and may then be staged again if necessary.
3073 .Tg ug
3074 .It Xo
3075 .Cm unstage
3076 .Op Fl p
3077 .Op Fl F Ar response-script
3078 .Op Ar path ...
3079 .Xc
3080 .Dl Pq alias: Cm ug
3081 Merge staged changes back into the work tree and put affected paths
3082 back into non-staged status.
3083 If no
3084 .Ar path
3085 is specified, unstage all staged changes across the entire work tree.
3086 Otherwise, unstage changes at or within the specified paths.
3087 .Pp
3088 Show the status of each affected file, using the following status codes:
3089 .Bl -column YXZ description
3090 .It G Ta file was unstaged
3091 .It C Ta file was unstaged and conflicts occurred during merge
3092 .It ! Ta changes destined for a missing file were not merged
3093 .It D Ta file was staged as deleted and still is deleted
3094 .It d Ta file's deletion was prevented by local modifications
3095 .It \(a~ Ta changes destined for a non-regular file were not merged
3096 .El
3097 .Pp
3098 The options for
3099 .Cm got unstage
3100 are as follows:
3101 .Bl -tag -width Ds
3102 .It Fl F Ar response-script
3103 With the
3104 .Fl p
3105 option, read
3106 .Dq y ,
3107 .Dq n ,
3108 and
3109 .Dq q
3110 responses line-by-line from the specified
3111 .Ar response-script
3112 file instead of prompting interactively.
3113 .It Fl p
3114 Instead of unstaging the entire content of a changed file, interactively
3115 select or reject changes for unstaging based on
3116 .Dq y
3117 (unstage change),
3118 .Dq n
3119 (keep change staged), and
3120 .Dq q
3121 (quit unstaging this file) responses.
3122 If a file is staged in modified status, individual patches derived from the
3123 staged file content can be unstaged.
3124 Files staged in added or deleted status may only be unstaged in their entirety.
3125 .El
3126 .It Xo
3127 .Cm cat
3128 .Op Fl P
3129 .Op Fl c Ar commit
3130 .Op Fl r Ar repository-path
3131 .Ar arg ...
3132 .Xc
3133 Parse and print contents of objects to standard output in a line-based
3134 text format.
3135 Content of commit, tree, and tag objects is printed in a way similar
3136 to the actual content stored in such objects.
3137 Blob object contents are printed as they would appear in files on disk.
3138 .Pp
3139 Attempt to interpret each argument as a reference, a tag name, or
3140 an object ID SHA1 hash.
3141 References will be resolved to an object ID.
3142 Tag names will resolved to a tag object.
3143 An abbreviated hash argument will be expanded to a full SHA1 hash
3144 automatically, provided the abbreviation is unique.
3145 .Pp
3146 If none of the above interpretations produce a valid result, or if the
3147 .Fl P
3148 option is used, attempt to interpret the argument as a path which will
3149 be resolved to the ID of an object found at this path in the repository.
3150 .Pp
3151 The options for
3152 .Cm got cat
3153 are as follows:
3154 .Bl -tag -width Ds
3155 .It Fl c Ar commit
3156 Look up paths in the specified
3157 .Ar commit .
3158 If this option is not used, paths are looked up in the commit resolved
3159 via the repository's HEAD reference.
3160 The expected argument is a commit ID SHA1 hash or an existing reference
3161 or tag name which will be resolved to a commit ID.
3162 An abbreviated hash argument will be expanded to a full SHA1 hash
3163 automatically, provided the abbreviation is unique.
3164 .It Fl P
3165 Interpret all arguments as paths only.
3166 This option can be used to resolve ambiguity in cases where paths
3167 look like tag names, reference names, or object IDs.
3168 .It Fl r Ar repository-path
3169 Use the repository at the specified path.
3170 If not specified, assume the repository is located at or above the current
3171 working directory.
3172 If this directory is a
3173 .Nm
3174 work tree, use the repository path associated with this work tree.
3175 .El
3176 .It Cm info Op Ar path ...
3177 Display meta-data stored in a work tree.
3178 See
3179 .Xr got-worktree 5
3180 for details.
3181 .Pp
3182 The work tree to use is resolved implicitly by walking upwards from the
3183 current working directory.
3184 .Pp
3185 If one or more
3186 .Ar path
3187 arguments are specified, show additional per-file information for tracked
3188 files located at or within these paths.
3189 If a
3190 .Ar path
3191 argument corresponds to the work tree's root directory, display information
3192 for all tracked files.
3193 .El
3194 .Sh ENVIRONMENT
3195 .Bl -tag -width GOT_IGNORE_GITCONFIG
3196 .It Ev GOT_AUTHOR
3197 The author's name and email address, such as
3198 .Dq An Flan Hacker Aq Mt flan_hacker@openbsd.org .
3199 Used by the
3200 .Cm got commit ,
3201 .Cm got import ,
3202 .Cm got rebase ,
3203 and
3204 .Cm got histedit
3205 commands.
3206 Because
3207 .Xr git 1
3208 may fail to parse commits without an email address in author data,
3209 .Nm
3210 attempts to reject
3211 .Ev GOT_AUTHOR
3212 environment variables with a missing email address.
3213 .Pp
3214 .Ev GOT_AUTHOR will be overridden by configuration settings in
3215 .Xr got.conf 5
3216 or by Git's
3217 .Dv user.name
3218 and
3219 .Dv user.email
3220 configuration settings in the repository's
3221 .Pa .git/config
3222 file.
3223 The
3224 .Dv user.name
3225 and
3226 .Dv user.email
3227 configuration settings contained in Git's global
3228 .Pa ~/.gitconfig
3229 configuration file will only be used if neither
3230 .Xr got.conf 5
3231 nor the
3232 .Ev GOT_AUTHOR
3233 environment variable provide author information.
3234 .It Ev GOT_IGNORE_GITCONFIG
3235 If this variable is set then any remote repository definitions or author
3236 information found in Git configuration files will be ignored.
3237 .It Ev GOT_LOG_DEFAULT_LIMIT
3238 The default limit on the number of commits traversed by
3239 .Cm got log .
3240 If set to zero, the limit is unbounded.
3241 This variable will be silently ignored if it is set to a non-numeric value.
3242 .It Ev VISUAL , EDITOR
3243 The editor spawned by
3244 .Cm got commit ,
3245 .Cm got histedit ,
3246 .Cm got import ,
3248 .Cm got tag .
3249 If not set, the
3250 .Xr vi 1
3251 text editor will be spawned.
3252 .El
3253 .Sh FILES
3254 .Bl -tag -width packed-refs -compact
3255 .It Pa got.conf
3256 Repository-wide configuration settings for
3257 .Nm .
3258 If present, a
3259 .Xr got.conf 5
3260 configuration file located in the root directory of a Git repository
3261 supersedes any relevant settings in Git's
3262 .Pa config
3263 file.
3264 .Pp
3265 .It Pa .got/got.conf
3266 Worktree-specific configuration settings for
3267 .Nm .
3268 If present, a
3269 .Xr got.conf 5
3270 configuration file in the
3271 .Pa .got
3272 meta-data directory of a work tree supersedes any relevant settings in
3273 the repository's
3274 .Xr got.conf 5
3275 configuration file and Git's
3276 .Pa config
3277 file.
3278 .El
3279 .Sh EXIT STATUS
3280 .Ex -std got
3281 .Sh EXAMPLES
3282 Enable tab-completion of
3283 .Nm
3284 command names in
3285 .Xr ksh 1 :
3286 .Pp
3287 .Dl $ set -A complete_got_1 -- $(got -h 2>&1 | sed -n s/commands://p)
3288 .Pp
3289 Clone an existing Git repository for use with
3290 .Nm :
3291 .Pp
3292 .Dl $ cd /var/git/
3293 .Dl $ got clone ssh://git@github.com/openbsd/src.git
3294 .Pp
3295 Unfortunately, many of the popular Git hosting sites do not offer anonymous
3296 access via SSH.
3297 Such sites will require an account to be created, and a public SSH key to be
3298 uploaded to this account, before repository access via ssh:// URLs will work.
3299 .Pp
3300 Use of HTTP URLs currently requires
3301 .Xr git 1 :
3302 .Pp
3303 .Dl $ cd /var/git/
3304 .Dl $ git clone --bare https://github.com/openbsd/src.git
3305 .Pp
3306 Alternatively, for quick and dirty local testing of
3307 .Nm
3308 a new Git repository could be created and populated with files,
3309 e.g. from a temporary CVS checkout located at
3310 .Pa /tmp/src :
3311 .Pp
3312 .Dl $ gotadmin init /var/git/src.git
3313 .Dl $ got import -r /var/git/src.git -I CVS -I obj /tmp/src
3314 .Pp
3315 Check out a work tree from the Git repository to /usr/src:
3316 .Pp
3317 .Dl $ got checkout /var/git/src.git /usr/src
3318 .Pp
3319 View local changes in a work tree directory:
3320 .Pp
3321 .Dl $ got diff | less
3322 .Pp
3323 In a work tree, display files in a potentially problematic state:
3324 .Pp
3325 .Dl $ got status -s 'C!~?'
3326 .Pp
3327 Interactively revert selected local changes in a work tree directory:
3328 .Pp
3329 .Dl $ got revert -p -R\ .
3330 .Pp
3331 In a work tree or a git repository directory, list all branch references:
3332 .Pp
3333 .Dl $ got branch -l
3334 .Pp
3335 As above, but list the most recently modified branches only:
3336 .Pp
3337 .Dl $ got branch -lt | head
3338 .Pp
3339 In a work tree or a git repository directory, create a new branch called
3340 .Dq unified-buffer-cache
3341 which is forked off the
3342 .Dq master
3343 branch:
3344 .Pp
3345 .Dl $ got branch -c master unified-buffer-cache
3346 .Pp
3347 Switch an existing work tree to the branch
3348 .Dq unified-buffer-cache .
3349 Local changes in the work tree will be preserved and merged if necessary:
3350 .Pp
3351 .Dl $ got update -b unified-buffer-cache
3352 .Pp
3353 Create a new commit from local changes in a work tree directory.
3354 This new commit will become the head commit of the work tree's current branch:
3355 .Pp
3356 .Dl $ got commit
3357 .Pp
3358 In a work tree or a git repository directory, view changes committed in
3359 the 3 most recent commits to the work tree's branch, or the branch resolved
3360 via the repository's HEAD reference, respectively:
3361 .Pp
3362 .Dl $ got log -p -l 3
3363 .Pp
3364 As above, but display changes in the order in which
3365 .Xr patch 1
3366 could apply them in sequence:
3367 .Pp
3368 .Dl $ got log -p -l 3 -R
3369 .Pp
3370 In a work tree or a git repository directory, log the history of a subdirectory:
3371 .Pp
3372 .Dl $ got log sys/uvm
3373 .Pp
3374 While operating inside a work tree, paths are specified relative to the current
3375 working directory, so this command will log the subdirectory
3376 .Pa sys/uvm :
3377 .Pp
3378 .Dl $ cd sys/uvm && got log\ .
3379 .Pp
3380 And this command has the same effect:
3381 .Pp
3382 .Dl $ cd sys/dev/usb && got log ../../uvm
3383 .Pp
3384 And this command displays work tree meta-data about all tracked files:
3385 .Pp
3386 .Dl $ cd /usr/src
3387 .Dl $ got info\ . | less
3388 .Pp
3389 Add new files and remove obsolete files in a work tree directory:
3390 .Pp
3391 .Dl $ got add sys/uvm/uvm_ubc.c
3392 .Dl $ got remove sys/uvm/uvm_vnode.c
3393 .Pp
3394 Create a new commit from local changes in a work tree directory
3395 with a pre-defined log message.
3396 .Pp
3397 .Dl $ got commit -m 'unify the buffer cache'
3398 .Pp
3399 Alternatively, create a new commit from local changes in a work tree
3400 directory with a log message that has been prepared in the file
3401 .Pa /tmp/msg :
3402 .Pp
3403 .Dl $ got commit -F /tmp/msg
3404 .Pp
3405 Update any work tree checked out from the
3406 .Dq unified-buffer-cache
3407 branch to the latest commit on this branch:
3408 .Pp
3409 .Dl $ got update
3410 .Pp
3411 Roll file content on the unified-buffer-cache branch back by one commit,
3412 and then fetch the rolled-back change into the work tree as a local change
3413 to be amended and perhaps committed again:
3414 .Pp
3415 .Dl $ got backout unified-buffer-cache
3416 .Dl $ got commit -m 'roll back previous'
3417 .Dl $ # now back out the previous backout :-)
3418 .Dl $ got backout unified-buffer-cache
3419 .Pp
3420 Fetch new changes on the remote repository's
3421 .Dq master
3422 branch, making them visible on the local repository's
3423 .Dq origin/master
3424 branch:
3425 .Pp
3426 .Dl $ cd /usr/src
3427 .Dl $ got fetch
3428 .Pp
3429 In a repository created with a HTTP URL and
3430 .Cm git clone --bare
3431 the
3432 .Xr git-fetch 1
3433 command must be used instead:
3434 .Pp
3435 .Dl $ cd /var/git/src.git
3436 .Dl $ git fetch origin master:refs/remotes/origin/master
3437 .Pp
3438 Rebase the local
3439 .Dq master
3440 branch to merge the new changes that are now visible on the
3441 .Dq origin/master
3442 branch:
3443 .Pp
3444 .Dl $ cd /usr/src
3445 .Dl $ got update -b origin/master
3446 .Dl $ got rebase master
3447 .Pp
3448 Rebase the
3449 .Dq unified-buffer-cache
3450 branch on top of the new head commit of the
3451 .Dq master
3452 branch.
3453 .Pp
3454 .Dl $ got update -b master
3455 .Dl $ got rebase unified-buffer-cache
3456 .Pp
3457 Create a patch from all changes on the unified-buffer-cache branch.
3458 The patch can be mailed out for review and applied to
3459 .Ox Ns 's
3460 CVS tree:
3461 .Pp
3462 .Dl $ got diff master unified-buffer-cache > /tmp/ubc.diff
3463 .Pp
3464 Edit the entire commit history of the
3465 .Dq unified-buffer-cache
3466 branch:
3467 .Pp
3468 .Dl $ got update -b unified-buffer-cache
3469 .Dl $ got update -c master
3470 .Dl $ got histedit
3471 .Pp
3472 Before working against existing branches in a repository cloned with
3473 .Cm git clone --bare
3474 instead of
3475 .Cm got clone ,
3476 a Git
3477 .Dq refspec
3478 must be configured to map all references in the remote repository
3479 into the
3480 .Dq refs/remotes
3481 namespace of the local repository.
3482 This can be achieved by setting Git's
3483 .Pa remote.origin.fetch
3484 configuration variable to the value
3485 .Dq +refs/heads/*:refs/remotes/origin/*
3486 with the
3487 .Cm git config
3488 command:
3489 .Pp
3490 .Dl $ cd /var/git/repo
3491 .Dl $ git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
3492 .Pp
3493 Additionally, the
3494 .Dq mirror
3495 option must be disabled:
3496 .Pp
3497 .Dl $ cd /var/git/repo
3498 .Dl $ git config remote.origin.mirror false
3499 .Pp
3500 Alternatively, the following
3501 .Xr git-fetch 1
3502 configuration item can be added manually to the Git repository's
3503 .Pa config
3504 file:
3505 .Pp
3506 .Dl [remote \&"origin\&"]
3507 .Dl url = ...
3508 .Dl fetch = +refs/heads/*:refs/remotes/origin/*
3509 .Dl mirror = false
3510 .Pp
3511 This configuration leaves the local repository's
3512 .Dq refs/heads
3513 namespace free for use by local branches checked out with
3514 .Cm got checkout
3515 and, if needed, created with
3516 .Cm got branch .
3517 Branches in the
3518 .Dq refs/remotes/origin
3519 namespace can now be updated with incoming changes from the remote
3520 repository with
3521 .Cm got fetch
3523 .Xr git-fetch 1
3524 without extra command line arguments.
3525 Newly fetched changes can be examined with
3526 .Cm got log .
3527 .Pp
3528 Display changes on the remote repository's version of the
3529 .Dq master
3530 branch, as of the last time
3531 .Cm got fetch
3532 was run:
3533 .Pp
3534 .Dl $ got log -c origin/master | less
3535 .Pp
3536 As shown here, most commands accept abbreviated reference names such as
3537 .Dq origin/master
3538 instead of
3539 .Dq refs/remotes/origin/master .
3540 The latter is only needed in case of ambiguity.
3541 .Pp
3542 .Cm got rebase
3543 can be used to merge changes which are visible on the
3544 .Dq origin/master
3545 branch into the
3546 .Dq master
3547 branch.
3548 This will also merge local changes, if any, with the incoming changes:
3549 .Pp
3550 .Dl $ got update -b origin/master
3551 .Dl $ got rebase master
3552 .Pp
3553 In order to make changes committed to the
3554 .Dq unified-buffer-cache
3555 visible on the
3556 .Dq master
3557 branch, the
3558 .Dq unified-buffer-cache
3559 branch can be rebased onto the
3560 .Dq master
3561 branch:
3562 .Pp
3563 .Dl $ got update -b master
3564 .Dl $ got rebase unified-buffer-cache
3565 .Pp
3566 Changes on the
3567 .Dq unified-buffer-cache
3568 branch can now be made visible on the
3569 .Dq master
3570 branch with
3571 .Cm got integrate .
3572 Because the rebase operation switched the work tree to the
3573 .Dq unified-buffer-cache
3574 branch, the work tree must be switched back to the
3575 .Dq master
3576 branch first:
3577 .Pp
3578 .Dl $ got update -b master
3579 .Dl $ got integrate unified-buffer-cache
3580 .Pp
3581 On the
3582 .Dq master
3583 branch, log messages for local changes can now be amended with
3584 .Dq OK
3585 by other developers and any other important new information:
3586 .Pp
3587 .Dl $ got update -c origin/master
3588 .Dl $ got histedit -m
3589 .Pp
3590 If the remote repository offers write access, local changes on the
3591 .Dq master
3592 branch can be sent to the remote repository with
3593 .Cm got send .
3594 Usually,
3595 .Cm got send
3596 can be run without further arguments.
3597 The arguments shown here match defaults, provided the work tree's
3598 current branch is the
3599 .Dq master
3600 branch:
3601 .Pp
3602 .Dl $ got send -b master origin
3603 .Pp
3604 If the remote repository requires the HTTPS protocol, the
3605 .Xr git-push 1
3606 command must be used instead:
3607 .Pp
3608 .Dl $ cd /var/git/src.git
3609 .Dl $ git push origin master
3610 .Pp
3611 When making contributions to projects which use the
3612 .Dq pull request
3613 workflow, SSH protocol repository access needs to be set up first.
3614 Once an account has been created on a Git hosting site it should
3615 be possible to upload a public SSH key for repository access
3616 authentication.
3617 .Pp
3618 The
3619 .Dq pull request
3620 workflow will usually involve two remote repositories.
3621 In the real-life example below, the
3622 .Dq origin
3623 repository was forked from the
3624 .Dq upstream
3625 repository by using the Git hosting site's web interface.
3626 The
3627 .Xr got.conf 5
3628 file in the local repository describes both remote repositories:
3629 .Bd -literal -offset indent
3630 # Jelmers's repository, which accepts pull requests
3631 remote "upstream" {
3632 server git@github.com
3633 protocol ssh
3634 repository "/jelmer/dulwich"
3635 branch { "master" }
3638 # Stefan's fork, used as the default remote repository
3639 remote "origin" {
3640 server git@github.com
3641 protocol ssh
3642 repository "/stspdotname/dulwich"
3643 branch { "master" }
3645 .Ed
3646 .Pp
3647 With this configuration, Stefan can create commits on
3648 .Dq refs/heads/master
3649 and send them to the
3650 .Dq origin
3651 repository by running:
3652 .Pp
3653 .Dl $ got send -b master origin
3654 .Pp
3655 The changes can now be proposed to Jelmer by opening a pull request
3656 via the Git hosting site's web interface.
3657 If Jelmer requests further changes to be made, additional commits
3658 can be created on the
3659 .Dq master
3660 branch and be added to the pull request by running
3661 .Cd got send
3662 again.
3663 .Pp
3664 If Jelmer prefers additional commits to be
3665 .Dq squashed
3666 then the following commands can be used to achieve this:
3667 .Pp
3668 .Dl $ got update -b master
3669 .Dl $ got update -c origin/master
3670 .Dl $ got histedit -f
3671 .Dl $ got send -f -b master origin
3672 .Pp
3673 In addition to reviewing the pull request in the web user interface,
3674 Jelmer can fetch the pull request's branch into his local repository
3675 and create a local branch which contains the proposed changes:
3676 .Pp
3677 .Dl $ got fetch -R refs/pull/1046/head origin
3678 .Dl $ got branch -c refs/remotes/origin/pull/1046/head pr1046
3679 .Pp
3680 Once Jelmer has accepted the pull request, Stefan can fetch the
3681 merged changes, and possibly several other new changes, by running:
3682 .Pp
3683 .Dl $ got fetch upstream
3684 .Pp
3685 The merged changes will now be visible under the reference
3686 .Dq refs/remotes/upstream/master .
3687 The local
3688 .Dq master
3689 branch can now be rebased on top of the latest changes
3690 from upstream:
3691 .Pp
3692 .Dl $ got update -b upstream/master
3693 .Dl $ got rebase master
3694 .Pp
3695 As an alternative to
3696 .Cm got rebase ,
3697 branches can be merged with
3698 .Cm got merge :
3699 .Pp
3700 .Dl $ got update -b master
3701 .Dl $ got merge upstream/master
3702 .Pp
3703 The question of whether to rebase or merge branches is philosophical.
3704 When in doubt, refer to the software project's policies set by project
3705 maintainers.
3706 .Pp
3707 As a final step, the forked repository's copy of the master branch needs
3708 to be kept in sync by sending the new changes there:
3709 .Pp
3710 .Dl $ got send -f -b master origin
3711 .Pp
3712 If multiple pull requests need to be managed in parallel, a separate branch
3713 must be created for each pull request with
3714 .Cm got branch .
3715 Each such branch can then be used as above, in place of
3716 .Dq refs/heads/master .
3717 Changes for any accepted pull requests will still appear under
3718 .Dq refs/remotes/upstream/master,
3719 regardless of which branch was used in the forked repository to
3720 create a pull request.
3721 .Sh SEE ALSO
3722 .Xr gotadmin 1 ,
3723 .Xr tog 1 ,
3724 .Xr git-repository 5 ,
3725 .Xr got-worktree 5 ,
3726 .Xr got.conf 5 ,
3727 .Xr gotwebd 8
3728 .Sh AUTHORS
3729 .An Anthony J. Bentley Aq Mt bentley@openbsd.org
3730 .An Christian Weisgerber Aq Mt naddy@openbsd.org
3731 .An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org
3732 .An Josh Rickmar Aq Mt jrick@zettaport.com
3733 .An Joshua Stein Aq Mt jcs@openbsd.org
3734 .An Klemens Nanni Aq Mt kn@openbsd.org
3735 .An Martin Pieuchot Aq Mt mpi@openbsd.org
3736 .An Neels Hofmeyr Aq Mt neels@hofmeyr.de
3737 .An Omar Polo Aq Mt op@openbsd.org
3738 .An Ori Bernstein Aq Mt ori@openbsd.org
3739 .An Sebastien Marie Aq Mt semarie@openbsd.org
3740 .An Stefan Sperling Aq Mt stsp@openbsd.org
3741 .An Steven McDonald Aq Mt steven@steven-mcdonald.id.au
3742 .An Theo Buehler Aq Mt tb@openbsd.org
3743 .An Thomas Adam Aq Mt thomas@xteddy.org
3744 .An Tracey Emery Aq Mt tracey@traceyemery.net
3745 .An Yang Zhong Aq Mt yzhong@freebsdfoundation.org
3746 .Pp
3747 Parts of
3748 .Nm ,
3749 .Xr tog 1 ,
3750 and
3751 .Xr gotwebd 8
3752 were derived from code under copyright by:
3753 .Pp
3754 .An Caldera International
3755 .An Daniel Hartmeier
3756 .An Esben Norby
3757 .An Henning Brauer
3758 .An HÃ¥kan Olsson
3759 .An Ingo Schwarze
3760 .An Jean-Francois Brousseau
3761 .An Joris Vink
3762 .An Jyri J. Virkki
3763 .An Larry Wall
3764 .An Markus Friedl
3765 .An Niall O'Higgins
3766 .An Niklas Hallqvist
3767 .An Ray Lai
3768 .An Ryan McBride
3769 .An Theo de Raadt
3770 .An Todd C. Miller
3771 .An Xavier Santolaria
3772 .Pp
3773 .Nm
3774 contains code contributed to the public domain by
3775 .An Austin Appleby .
3776 .Sh CAVEATS
3777 .Nm
3778 is a work-in-progress and some features remain to be implemented.
3779 .Pp
3780 At present, the user has to fall back on
3781 .Xr git 1
3782 to perform some tasks.
3783 In particular:
3784 .Bl -bullet
3785 .It
3786 Reading from remote repositories over HTTP or HTTPS protocols requires
3787 .Xr git-clone 1
3788 and
3789 .Xr git-fetch 1 .
3790 .It
3791 Writing to remote repositories over HTTP or HTTPS protocols requires
3792 .Xr git-push 1 .
3793 .It
3794 The creation of merge commits with more than two parent commits requires
3795 .Xr git-merge 1 .
3796 .It
3797 In situations where files or directories were moved around
3798 .Cm got
3799 will not automatically merge changes to new locations and
3800 .Xr git 1
3801 will usually produce better results.
3802 .El