Blob


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