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