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