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 .Ar command
26 .Op Fl h
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 .It Cm init Ar repository-path
66 Create a new empty repository at the specified
67 .Ar repository-path .
68 .Pp
69 After
70 .Cm got init ,
71 the
72 .Cm got import
73 command must be used to populate the empty repository before
74 .Cm got checkout
75 can be used.
76 .Tg im
77 .It Cm import Oo Fl b Ar branch Oc Oo Fl m Ar message Oc Oo Fl r Ar repository-path Oc Oo Fl I Ar pattern Oc Ar directory
78 .Dl (alias: Cm im )
79 Create an initial commit in a repository from the file hierarchy
80 within the specified
81 .Ar directory .
82 The created commit will not have any parent commits, i.e. it will be a
83 root commit.
84 Also create a new reference which provides a branch name for the newly
85 created commit.
86 Show the path of each imported file to indicate progress.
87 .Pp
88 The
89 .Cm got import
90 command requires the
91 .Ev GOT_AUTHOR
92 environment variable to be set,
93 unless an author has been configured in
94 .Xr got.conf 5
95 or Git's
96 .Dv user.name
97 and
98 .Dv user.email
99 configuration settings can be obtained from the repository's
100 .Pa .git/config
101 file or from Git's global
102 .Pa ~/.gitconfig
103 configuration file.
104 .Pp
105 The options for
106 .Cm got import
107 are as follows:
108 .Bl -tag -width Ds
109 .It Fl b Ar branch
110 Create the specified
111 .Ar branch
112 instead of creating the default branch
113 .Dq main .
114 Use of this option is required if the
115 .Dq main
116 branch already exists.
117 .It Fl m Ar message
118 Use the specified log message when creating the new commit.
119 Without the
120 .Fl m
121 option,
122 .Cm got import
123 opens a temporary file in an editor where a log message can be written.
124 .It Fl r Ar repository-path
125 Use the repository at the specified path.
126 If not specified, assume the repository is located at or above the current
127 working directory.
128 .It Fl I Ar pattern
129 Ignore files or directories with a name which matches the specified
130 .Ar pattern .
131 This option may be specified multiple times to build a list of ignore patterns.
132 The
133 .Ar pattern
134 follows the globbing rules documented in
135 .Xr glob 7 .
136 .El
137 .Tg cl
138 .It Cm clone Oo Fl a Oc Oo Fl b Ar branch Oc Oo Fl l Oc Oo Fl m Oc Oo Fl q Oc Oo Fl v Oc Oo Fl R Ar reference Oc Ar repository-URL Op Ar directory
139 .Dl (alias: Cm cl )
140 Clone a Git repository at the specified
141 .Ar repository-URL
142 into the specified
143 .Ar directory .
144 If no
145 .Ar directory
146 is specified the directory name will be derived from the name of the
147 cloned repository.
148 .Cm got clone
149 will refuse to run if the
150 .Ar directory
151 already exists.
152 .Pp
153 The
154 .Ar repository-URL
155 specifies a protocol scheme, a server hostname, an optional port number
156 separated from the hostname by a colon, and a path to the repository on
157 the server:
158 .Lk scheme://hostname:port/path/to/repository
159 .Pp
160 The following protocol schemes are supported:
161 .Bl -tag -width git+ssh
162 .It git
163 The Git protocol as implemented by the
164 .Xr git-daemon 1
165 server.
166 Use of this protocol is discouraged since it supports neither authentication
167 nor encryption.
168 .It git+ssh
169 The Git protocol wrapped in an authenticated and encrypted
170 .Xr ssh 1
171 tunnel.
172 With this protocol the hostname may contain an embedded username for
173 .Xr ssh 1
174 to use:
175 .Mt user@hostname
176 .It ssh
177 Short alias for git+ssh.
178 .El
179 .Pp
180 Objects in the cloned repository are stored in a pack file which is downloaded
181 from the server.
182 This pack file will then be indexed to facilitate access to the objects stored
183 within.
184 If any objects in the pack file are stored in deltified form, all deltas will
185 be fully resolved in order to compute the ID of such objects.
186 This can take some time.
187 More details about the pack file format are documented in
188 .Xr git-repository 5 .
189 .Pp
190 .Cm got clone
191 creates a remote repository entry in the
192 .Xr got.conf 5
193 and
194 .Pa config
195 files of the cloned repository to store the
196 .Ar repository-url
197 and any
198 .Ar branch
199 or
200 .Ar reference
201 arguments for future use by
202 .Cm got fetch
203 or
204 .Xr git-fetch 1 .
205 .Pp
206 The options for
207 .Cm got clone
208 are as follows:
209 .Bl -tag -width Ds
210 .It Fl a
211 Fetch all branches from the remote repository's
212 .Dq refs/heads/
213 reference namespace and set
214 .Cm fetch-all-branches
215 in the cloned repository's
216 .Xr got.conf 5
217 file for future use by
218 .Cm got fetch .
219 If this option is not specified, a branch resolved via the remote
220 repository's HEAD reference will be fetched.
221 Cannot be used together with the
222 .Fl b
223 option.
224 .It Fl b Ar branch
225 Fetch the specified
226 .Ar branch
227 from the remote repository's
228 .Dq refs/heads/
229 reference namespace.
230 This option may be specified multiple times to build a list of branches
231 to fetch.
232 If the branch corresponding to the remote repository's HEAD reference is not
233 in this list, the cloned repository's HEAD reference will be set to the first
234 branch which was fetched.
235 If this option is not specified, a branch resolved via the remote
236 repository's HEAD reference will be fetched.
237 Cannot be used together with the
238 .Fl a
239 option.
240 .It Fl l
241 List branches and tags available for fetching from the remote repository
242 and exit immediately.
243 Cannot be used together with any of the other options except
244 .Fl q
245 and
246 .Fl v .
247 .It Fl m
248 Create the cloned repository as a mirror of the original repository.
249 This is useful if the cloned repository will not be used to store
250 locally created commits.
251 .Pp
252 The repository's
253 .Xr got.conf 5
254 and
255 .Pa config
256 files will be set up with the
257 .Dq mirror
258 option enabled, such that
259 .Cm got fetch
260 or
261 .Xr git-fetch 1
262 will write incoming changes directly to branches in the
263 .Dq refs/heads/
264 reference namespace, rather than to branches in the
265 .Dq refs/remotes/
266 namespace.
267 This avoids the usual requirement of having to run
268 .Cm got rebase
269 after
270 .Cm got fetch
271 in order to make incoming changes appear on branches in the
272 .Dq refs/heads/
273 namespace.
274 But maintaining custom changes in the cloned repository becomes difficult
275 since such changes will be at risk of being discarded whenever incoming
276 changes are fetched.
277 .It Fl q
278 Suppress progress reporting output.
279 The same option will be passed to
280 .Xr ssh 1
281 if applicable.
282 .It Fl v
283 Verbose mode.
284 Causes
285 .Cm got clone
286 to print debugging messages to standard error output.
287 This option will be passed to
288 .Xr ssh 1
289 if applicable.
290 Multiple -v options increase the verbosity.
291 The maximum is 3.
292 .It Fl R Ar reference
293 In addition to the branches and tags that will be fetched, fetch an arbitrary
294 .Ar reference
295 from the remote repository's
296 .Dq refs/
297 namespace.
298 This option may be specified multiple times to build a list of additional
299 references to fetch.
300 The specified
301 .Ar reference
302 may either be a path to a specific reference, or a reference namespace
303 which will cause all references in this namespace to be fetched.
304 .Pp
305 Each reference will be mapped into the cloned repository's
306 .Dq refs/remotes/
307 namespace, unless the
308 .Fl m
309 option is used to mirror references directly into the cloned repository's
310 .Dq refs/
311 namespace.
312 .Pp
313 .Cm got clone
314 will refuse to fetch references from the remote repository's
315 .Dq refs/remotes/
316 or
317 .Dq refs/got/
318 namespace.
319 .El
320 .Tg fe
321 .It Cm fetch Oo Fl a Oc Oo Fl b Ar branch Oc Oo Fl d Oc Oo Fl l Oc Oo Fl r Ar repository-path Oc Oo Fl t Oc Oo Fl q Oc Oo Fl v Oc Oo Fl R Ar reference Oc Oo Fl X Oc Op Ar remote-repository
322 .Dl (alias: Cm fe )
323 Fetch new changes from a remote repository.
324 If no
325 .Ar remote-repository
326 is specified,
327 .Dq origin
328 will be used.
329 The remote repository's URL is obtained from the corresponding entry in
330 .Xr got.conf 5
331 or Git's
332 .Pa config
333 file of the local repository, as created by
334 .Cm got clone .
335 .Pp
336 New changes will be stored in a separate pack file downloaded from the server.
337 Optionally, separate pack files stored in the repository can be combined with
338 .Xr git-repack 1 .
339 .Pp
340 By default, branch references in the
341 .Dq refs/remotes/
342 reference namespace will be updated to point at the newly fetched commits.
343 The
344 .Cm got rebase
345 command can then be used to make new changes visible on branches in the
346 .Dq refs/heads/
347 namespace, merging incoming changes with the changes on those branches
348 as necessary.
349 .Pp
350 If the repository was created as a mirror with
351 .Cm got clone -m
352 then all branches in the
353 .Dq refs/heads/
354 namespace will be updated directly to match the corresponding branches in
355 the remote repository.
356 If those branches contained local commits, these commits will no longer be
357 reachable via a reference and will therefore be at risk of being discarded
358 by Git's garbage collector or
359 .Cm gotadmin cleanup .
360 Maintaining custom changes in a mirror repository is therefore discouraged.
361 .Pp
362 In any case, references in the
363 .Dq refs/tags/
364 namespace will always be fetched and mapped directly to local references
365 in the same namespace.
366 .Pp
367 The options for
368 .Cm got fetch
369 are as follows:
370 .Bl -tag -width Ds
371 .It Fl a
372 Fetch all branches from the remote repository's
373 .Dq refs/heads/
374 reference namespace.
375 This option can be enabled by default for specific repositories in
376 .Xr got.conf 5 .
377 If this option is not specified, a branch resolved via the remote
378 repository's HEAD reference will be fetched.
379 Cannot be used together with the
380 .Fl b
381 option.
382 .It Fl b Ar branch
383 Fetch the specified
384 .Ar branch
385 from the remote repository's
386 .Dq refs/heads/
387 reference namespace.
388 This option may be specified multiple times to build a list of branches
389 to fetch.
390 If this option is not specified, a branch resolved via the remote
391 repository's HEAD reference will be fetched.
392 Cannot be used together with the
393 .Fl a
394 option.
395 .It Fl d
396 Delete branches and tags from the local repository which are no longer
397 present in the remote repository.
398 Only references are deleted.
399 Any commit, tree, tag, and blob objects belonging to deleted branches or
400 tags remain in the repository and may be removed separately with
401 Git's garbage collector or
402 .Cm gotadmin cleanup .
403 .It Fl l
404 List branches and tags available for fetching from the remote repository
405 and exit immediately.
406 Cannot be used together with any of the other options except
407 .Fl v ,
408 .Fl q ,
409 and
410 .Fl r .
411 .It Fl t
412 Allow existing references in the
413 .Dq refs/tags
414 namespace to be updated if they have changed on the server.
415 If not specified, only new tag references will be created.
416 .It Fl r Ar repository-path
417 Use the repository at the specified path.
418 If not specified, assume the repository is located at or above the current
419 working directory.
420 If this directory is a
421 .Nm
422 work tree, use the repository path associated with this work tree.
423 .It Fl q
424 Suppress progress reporting output.
425 The same option will be passed to
426 .Xr ssh 1
427 if applicable.
428 .It Fl v
429 Verbose mode.
430 Causes
431 .Cm got fetch
432 to print debugging messages to standard error output.
433 The same option will be passed to
434 .Xr ssh 1
435 if applicable.
436 Multiple -v options increase the verbosity.
437 The maximum is 3.
438 .It Fl R Ar reference
439 In addition to the branches and tags that will be fetched, fetch an arbitrary
440 .Ar reference
441 from the remote repository's
442 .Dq refs/
443 namespace.
444 This option may be specified multiple times to build a list of additional
445 references to fetch.
446 The specified
447 .Ar reference
448 may either be a path to a specific reference, or a reference namespace
449 which will cause all references in this namespace to be fetched.
450 .Pp
451 Each reference will be mapped into the local repository's
452 .Dq refs/remotes/
453 namespace, unless the local repository was created as a mirror with
454 .Cm got clone -m
455 in which case references will be mapped directly into the local repository's
456 .Dq refs/
457 namespace.
458 .Pp
459 Once a reference has been fetched, a branch based on it can be created with
460 .Cm got branch
461 if needed.
462 .Pp
463 .Cm got fetch
464 will refuse to fetch references from the remote repository's
465 .Dq refs/remotes/
466 or
467 .Dq refs/got/
468 namespace.
469 .It Fl X
470 Delete all references which correspond to a particular
471 .Ar remote-repository
472 instead of fetching new changes.
473 This can be useful when a remote repository is being removed from
474 .Xr got.conf 5 .
475 .Pp
476 With
477 .Fl X ,
478 the
479 .Ar remote-repository
480 argument is mandatory and no other options except
481 .Fl r ,
482 .Fl v ,
483 and
484 .Fl q
485 are allowed.
486 .Pp
487 Only references are deleted.
488 Any commit, tree, tag, and blob objects fetched from a remote repository
489 will generally be stored in pack files and may be removed separately with
490 .Xr git-repack 1
491 and Git's garbage collector.
492 .El
493 .Tg co
494 .It Cm checkout Oo Fl E Oc Oo Fl b Ar branch Oc Oo Fl c Ar commit Oc Oo Fl p Ar path-prefix Oc Oo Fl q Oc Ar repository-path Op Ar work-tree-path
495 .Dl (alias: Cm co )
496 Copy files from a repository into a new work tree.
497 Show the status of each affected file, using the following status codes:
498 .Bl -column YXZ description
499 .It A Ta new file was added
500 .It E Ta file already exists in work tree's meta-data
501 .El
502 .Pp
503 If the
504 .Ar work tree path
505 is not specified, either use the last component of
506 .Ar repository path ,
507 or if a
508 .Ar path prefix
509 was specified use the last component of
510 .Ar path prefix .
511 .Pp
512 The options for
513 .Cm got checkout
514 are as follows:
515 .Bl -tag -width Ds
516 .It Fl E
517 Proceed with the checkout operation even if the directory at
518 .Ar work-tree-path
519 is not empty.
520 Existing files will be left intact.
521 .It Fl b Ar branch
522 Check out files from a commit on the specified
523 .Ar branch .
524 If this option is not specified, a branch resolved via the repository's HEAD
525 reference will be used.
526 .It Fl c Ar commit
527 Check out files from the specified
528 .Ar commit
529 on the selected branch.
530 The expected argument is a commit ID SHA1 hash or an existing reference
531 or tag name which will be resolved to a commit ID.
532 An abbreviated hash argument will be expanded to a full SHA1 hash
533 automatically, provided the abbreviation is unique.
534 If this option is not specified, the most recent commit on the selected
535 branch will be used.
536 .Pp
537 If the specified
538 .Ar commit
539 is not contained in the selected branch, a different branch which contains
540 this commit must be specified with the
541 .Fl b
542 option.
543 If no such branch is known a new branch must be created for this
544 commit with
545 .Cm got branch
546 before
547 .Cm got checkout
548 can be used.
549 Checking out work trees with an unknown branch is intentionally not supported.
550 .It Fl p Ar path-prefix
551 Restrict the work tree to a subset of the repository's tree hierarchy.
552 Only files beneath the specified
553 .Ar path-prefix
554 will be checked out.
555 .It Fl q
556 Silence progress output.
557 .El
558 .Tg up
559 .It Cm update Oo Fl b Ar branch Oc Oo Fl c Ar commit Oc Oo Fl q Oc Op Ar path ...
560 .Dl (alias: Cm up )
561 Update an existing work tree to a different
562 .Ar commit .
563 Change existing files in the work tree as necessary to match file contents
564 of this commit.
565 Preserve any local changes in the work tree and merge them with the
566 incoming changes.
567 .Pp
568 Files which already contain merge conflicts will not be updated to avoid
569 further complications.
570 Such files will be updated when
571 .Cm got update
572 is run again after merge conflicts have been resolved.
573 If the conflicting changes are no longer needed affected files can be
574 reverted with
575 .Cm got revert
576 before running
577 .Cm got update
578 again.
579 .Pp
580 Show the status of each affected file, using the following status codes:
581 .Bl -column YXZ description
582 .It U Ta file was updated and contained no local changes
583 .It G Ta file was updated and local changes were merged cleanly
584 .It C Ta file was updated and conflicts occurred during merge
585 .It D Ta file was deleted
586 .It A Ta new file was added
587 .It \(a~ Ta versioned file is obstructed by a non-regular file
588 .It ! Ta a missing versioned file was restored
589 .It # Ta file was not updated because it contains merge conflicts
590 .It ? Ta changes destined for an unversioned file were not merged
591 .El
592 .Pp
593 If no
594 .Ar path
595 is specified, update the entire work tree.
596 Otherwise, restrict the update operation to files at or within the
597 specified paths.
598 Each path is required to exist in the update operation's target commit.
599 Files in the work tree outside specified paths will remain unchanged and
600 will retain their previously recorded base commit.
601 Some
602 .Nm
603 commands may refuse to run while the work tree contains files from
604 multiple base commits.
605 The base commit of such a work tree can be made consistent by running
606 .Cm got update
607 across the entire work tree.
608 Specifying a
609 .Ar path
610 is incompatible with the
611 .Fl b
612 option.
613 .Pp
614 .Cm got update
615 cannot update paths with staged changes.
616 If changes have been staged with
617 .Cm got stage ,
618 these changes must first be committed with
619 .Cm got commit
620 or unstaged with
621 .Cm got unstage .
622 .Pp
623 The options for
624 .Cm got update
625 are as follows:
626 .Bl -tag -width Ds
627 .It Fl b Ar branch
628 Switch the work tree's branch reference to the specified
629 .Ar branch
630 before updating the work tree.
631 This option requires that all paths in the work tree are updated.
632 .Pp
633 As usual, any local changes in the work tree will be preserved.
634 This can be useful when switching to a newly created branch in order
635 to commit existing local changes to this branch.
636 .Pp
637 Any local changes must be dealt with separately in order to obtain a
638 work tree with pristine file contents corresponding exactly to the specified
639 .Ar branch .
640 Such changes could first be committed to a different branch with
641 .Cm got commit ,
642 or could be discarded with
643 .Cm got revert .
644 .It Fl c Ar commit
645 Update the work tree to the specified
646 .Ar commit .
647 The expected argument is a commit ID SHA1 hash or an existing reference
648 or tag name which will be resolved to a commit ID.
649 An abbreviated hash argument will be expanded to a full SHA1 hash
650 automatically, provided the abbreviation is unique.
651 If this option is not specified, the most recent commit on the work tree's
652 branch will be used.
653 .It Fl q
654 Silence progress output.
655 .El
656 .Tg st
657 .It Cm status Oo Fl I Oc Oo Fl s Ar status-codes Oc Oo Fl S Ar status-codes Oc Op Ar path ...
658 .Dl (alias: Cm st )
659 Show the current modification status of files in a work tree,
660 using the following status codes:
661 .Bl -column YXZ description
662 .It M Ta modified file
663 .It A Ta file scheduled for addition in next commit
664 .It D Ta file scheduled for deletion in next commit
665 .It C Ta modified or added file which contains merge conflicts
666 .It ! Ta versioned file was expected on disk but is missing
667 .It \(a~ Ta versioned file is obstructed by a non-regular file
668 .It ? Ta unversioned item not tracked by
669 .Nm
670 .It m Ta modified file modes (executable bit only)
671 .It N Ta non-existent
672 .Ar path
673 specified on the command line
674 .El
675 .Pp
676 If no
677 .Ar path
678 is specified, show modifications in the entire work tree.
679 Otherwise, show modifications at or within the specified paths.
680 .Pp
681 If changes have been staged with
682 .Cm got stage ,
683 staged changes are shown in the second output column, using the following
684 status codes:
685 .Bl -column YXZ description
686 .It M Ta file modification is staged
687 .It A Ta file addition is staged
688 .It D Ta file deletion is staged
689 .El
690 .Pp
691 Changes created on top of staged changes are indicated in the first column:
692 .Bl -column YXZ description
693 .It MM Ta file was modified after earlier changes have been staged
694 .It MA Ta file was modified after having been staged for addition
695 .El
696 .Pp
697 The options for
698 .Cm got status
699 are as follows:
700 .Bl -tag -width Ds
701 .It Fl I
702 Show unversioned files even if they match an ignore pattern.
703 .It Fl s Ar status-codes
704 Only show files with a modification status matching any of the
705 single-character status codes contained in the
706 .Ar status-codes
707 argument.
708 Any combination of codes from the above list of possible status codes
709 may be specified.
710 For staged files, status codes displayed in either column will be matched.
711 Cannot be used together with the
712 .Fl S
713 option.
714 .It Fl S Ar status-codes
715 Suppress the output of files with a modification status matching any of the
716 single-character status codes contained in the
717 .Ar status-codes
718 argument.
719 Any combination of codes from the above list of possible status codes
720 may be specified.
721 For staged files, status codes displayed in either column will be matched.
722 Cannot be used together with the
723 .Fl s
724 option.
725 .El
726 .Pp
727 For compatibility with
728 .Xr cvs 1
729 and
730 .Xr git 1 ,
731 .Cm got status
732 reads
733 .Xr glob 7
734 patterns from
735 .Pa .cvsignore
736 and
737 .Pa .gitignore
738 files in each traversed directory and will not display unversioned files
739 which match these patterns.
740 As an extension to
741 .Xr glob 7
742 matching rules,
743 .Cm got status
744 supports consecutive asterisks,
745 .Dq ** ,
746 which will match an arbitrary amount of directories.
747 Unlike
748 .Xr cvs 1 ,
749 .Cm got status
750 only supports a single ignore pattern per line.
751 Unlike
752 .Xr git 1 ,
753 .Cm got status
754 does not support negated ignore patterns prefixed with
755 .Dq \&! ,
756 and gives no special significance to the location of path component separators,
757 .Dq / ,
758 in a pattern.
759 .It Cm log Oo Fl b Oc Oo Fl c Ar commit Oc Oo Fl C Ar number Oc Oo Fl l Ar N Oc Oo Fl p Oc Oo Fl P Oc Oo Fl s Ar search-pattern Oc Oo Fl r Ar repository-path Oc Oo Fl R Oc Oo Fl x Ar commit Oc Op Ar path
760 Display history of a repository.
761 If a
762 .Ar path
763 is specified, show only commits which modified this path.
764 If invoked in a work tree, the
765 .Ar path
766 is interpreted relative to the current working directory,
767 and the work tree's path prefix is implicitly prepended.
768 Otherwise, the path is interpreted relative to the repository root.
769 .Pp
770 The options for
771 .Cm got log
772 are as follows:
773 .Bl -tag -width Ds
774 .It Fl b
775 Display individual commits which were merged into the current branch
776 from other branches.
777 By default,
778 .Cm got log
779 shows the linear history of the current branch only.
780 .It Fl c Ar commit
781 Start traversing history at the specified
782 .Ar commit .
783 The expected argument is a commit ID SHA1 hash or an existing reference
784 or tag name which will be resolved to a commit ID.
785 An abbreviated hash argument will be expanded to a full SHA1 hash
786 automatically, provided the abbreviation is unique.
787 If this option is not specified, default to the work tree's current branch
788 if invoked in a work tree, or to the repository's HEAD reference.
789 .It Fl C Ar number
790 Set the number of context lines shown in diffs with
791 .Fl p .
792 By default, 3 lines of context are shown.
793 .It Fl l Ar N
794 Limit history traversal to a given number of commits.
795 If this option is not specified, a default limit value of zero is used,
796 which is treated as an unbounded limit.
797 The
798 .Ev GOT_LOG_DEFAULT_LIMIT
799 environment variable may be set to change this default value.
800 .It Fl p
801 Display the patch of modifications made in each commit.
802 If a
803 .Ar path
804 is specified, only show the patch of modifications at or within this path.
805 .It Fl P
806 Display the list of file paths changed in each commit, using the following
807 status codes:
808 .Bl -column YXZ description
809 .It M Ta modified file
810 .It D Ta file was deleted
811 .It A Ta new file was added
812 .It m Ta modified file modes (executable bit only)
813 .El
814 .It Fl s Ar search-pattern
815 If specified, show only commits with a log message matched by the extended
816 regular expression
817 .Ar search-pattern .
818 When used together with
819 .Fl P
820 then the file paths changed by a commit can be matched as well.
821 Regular expression syntax is documented in
822 .Xr re_format 7 .
823 .It Fl r Ar repository-path
824 Use the repository at the specified path.
825 If not specified, assume the repository is located at or above the current
826 working directory.
827 If this directory is a
828 .Nm
829 work tree, use the repository path associated with this work tree.
830 .It Fl R
831 Determine a set of commits to display as usual, but display these commits
832 in reverse order.
833 .It Fl x Ar commit
834 Stop traversing commit history immediately after the specified
835 .Ar commit
836 has been traversed.
837 This option has no effect if the specified
838 .Ar commit
839 is never traversed.
840 .El
841 .Tg di
842 .It Cm diff Oo Fl a Oc Oo Fl C Ar number Oc Oo Fl r Ar repository-path Oc Oo Fl s Oc Oo Fl w Oc Op Ar object1 Ar object2 | Ar path
843 .Dl (alias: Cm di )
844 When invoked within a work tree with less than two arguments, display
845 local changes in the work tree.
846 If a
847 .Ar path
848 is specified, only show changes within this path.
849 .Pp
850 If two arguments are provided, treat each argument as a reference, a tag
851 name, or an object ID SHA1 hash, and display differences between the
852 corresponding objects.
853 Both objects must be of the same type (blobs, trees, or commits).
854 An abbreviated hash argument will be expanded to a full SHA1 hash
855 automatically, provided the abbreviation is unique.
856 .Pp
857 The options for
858 .Cm got diff
859 are as follows:
860 .Bl -tag -width Ds
861 .It Fl a
862 Treat file contents as ASCII text even if binary data is detected.
863 .It Fl C Ar number
864 Set the number of context lines shown in the diff.
865 By default, 3 lines of context are shown.
866 .It Fl r Ar repository-path
867 Use the repository at the specified path.
868 If not specified, assume the repository is located at or above the current
869 working directory.
870 If this directory is a
871 .Nm
872 work tree, use the repository path associated with this work tree.
873 .It Fl s
874 Show changes staged with
875 .Cm got stage
876 instead of showing local changes in the work tree.
877 This option is only valid when
878 .Cm got diff
879 is invoked in a work tree.
880 .It Fl w
881 Ignore whitespace-only changes.
882 .El
883 .Tg bl
884 .It Cm blame Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Ar path
885 .Dl (alias: Cm bl )
886 Display line-by-line history of a file at the specified path.
887 .Pp
888 The options for
889 .Cm got blame
890 are as follows:
891 .Bl -tag -width Ds
892 .It Fl c Ar commit
893 Start traversing history at the specified
894 .Ar commit .
895 The expected argument is a commit ID SHA1 hash or an existing reference
896 or tag name which will be resolved to a commit ID.
897 An abbreviated hash argument will be expanded to a full SHA1 hash
898 automatically, provided the abbreviation is unique.
899 .It Fl r Ar repository-path
900 Use the repository at the specified path.
901 If not specified, assume the repository is located at or above the current
902 working directory.
903 If this directory is a
904 .Nm
905 work tree, use the repository path associated with this work tree.
906 .El
907 .Tg tr
908 .It Cm tree Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Oo Fl i Oc Oo Fl R Oc Op Ar path
909 .Dl (alias: Cm tr )
910 Display a listing of files and directories at the specified
911 directory path in the repository.
912 Entries shown in this listing may carry one of the following trailing
913 annotations:
914 .Bl -column YXZ description
915 .It @ Ta entry is a symbolic link
916 .It / Ta entry is a directory
917 .It * Ta entry is an executable file
918 .It $ Ta entry is a Git submodule
919 .El
920 .Pp
921 Symbolic link entries are also annotated with the target path of the link.
922 .Pp
923 If no
924 .Ar path
925 is specified, list the repository path corresponding to the current
926 directory of the work tree, or the root directory of the repository
927 if there is no work tree.
928 .Pp
929 The options for
930 .Cm got tree
931 are as follows:
932 .Bl -tag -width Ds
933 .It Fl c Ar commit
934 List files and directories as they appear in the specified
935 .Ar commit .
936 The expected argument is a commit ID SHA1 hash or an existing reference
937 or tag name which will be resolved to a commit ID.
938 An abbreviated hash argument will be expanded to a full SHA1 hash
939 automatically, provided the abbreviation is unique.
940 .It Fl r Ar repository-path
941 Use the repository at the specified path.
942 If not specified, assume the repository is located at or above the current
943 working directory.
944 If this directory is a
945 .Nm
946 work tree, use the repository path associated with this work tree.
947 .It Fl i
948 Show object IDs of files (blob objects) and directories (tree objects).
949 .It Fl R
950 Recurse into sub-directories in the repository.
951 .El
952 .It Cm ref Oo Fl r Ar repository-path Oc Oo Fl l Oc Oo Fl c Ar object Oc Oo Fl s Ar reference Oc Oo Fl d Oc Op Ar name
953 Manage references in a repository.
954 .Pp
955 References may be listed, created, deleted, and changed.
956 When creating, deleting, or changing a reference the specified
957 .Ar name
958 must be an absolute reference name, i.e. it must begin with
959 .Dq refs/ .
960 .Pp
961 The options for
962 .Cm got ref
963 are as follows:
964 .Bl -tag -width Ds
965 .It Fl r Ar repository-path
966 Use the repository at the specified path.
967 If not specified, assume the repository is located at or above the current
968 working directory.
969 If this directory is a
970 .Nm
971 work tree, use the repository path associated with this work tree.
972 .It Fl l
973 List references in the repository.
974 If no
975 .Ar name
976 is specified, list all existing references in the repository.
977 If
978 .Ar name
979 is a reference namespace, list all references in this namespace.
980 Otherwise, show only the reference with the given
981 .Ar name .
982 Cannot be used together with any other options except
983 .Fl r .
984 .It Fl c Ar object
985 Create a reference or change an existing reference.
986 The reference with the specified
987 .Ar name
988 will point at the specified
989 .Ar object .
990 The expected
991 .Ar object
992 argument is a ID SHA1 hash or an existing reference or tag name which will
993 be resolved to the ID of a corresponding commit, tree, tag, or blob object.
994 Cannot be used together with any other options except
995 .Fl r .
996 .It Fl s Ar reference
997 Create a symbolic reference, or change an existing symbolic reference.
998 The symbolic reference with the specified
999 .Ar name
1000 will point at the specified
1001 .Ar reference
1002 which must already exist in the repository.
1003 Care should be taken not to create loops between references when
1004 this option is used.
1005 Cannot be used together with any other options except
1006 .Fl r .
1007 .It Fl d
1008 Delete the reference with the specified
1009 .Ar name
1010 from the repository.
1011 Any commit, tree, tag, and blob objects belonging to deleted references
1012 remain in the repository and may be removed separately with
1013 Git's garbage collector or
1014 .Cm gotadmin cleanup .
1015 Cannot be used together with any other options except
1016 .Fl r .
1017 .El
1018 .Tg br
1019 .It Cm branch Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Oo Fl l Oc Oo Fl d Ar name Oc Oo Fl n Oc Op Ar name
1020 .Dl (alias: Cm br )
1021 Create, list, or delete branches.
1022 .Pp
1023 Local branches are managed via references which live in the
1024 .Dq refs/heads/
1025 reference namespace.
1026 The
1027 .Cm got branch
1028 command creates references in this namespace only.
1029 .Pp
1030 When deleting branches the specified
1031 .Ar name
1032 is searched in the
1033 .Dq refs/heads
1034 reference namespace first.
1035 If no corresponding branch is found the
1036 .Dq refs/remotes
1037 namespace will be searched next.
1038 .Pp
1039 If invoked in a work tree without any arguments, print the name of the
1040 work tree's current branch.
1041 .Pp
1042 If a
1043 .Ar name
1044 argument is passed, attempt to create a branch reference with the given name.
1045 By default the new branch reference will point at the latest commit on the
1046 work tree's current branch if invoked in a work tree, and otherwise to a commit
1047 resolved via the repository's HEAD reference.
1048 .Pp
1049 If invoked in a work tree, once the branch was created successfully
1050 switch the work tree's head reference to the newly created branch and
1051 update files across the entire work tree, just like
1052 .Cm got update -b Ar name
1053 would do.
1054 Show the status of each affected file, using the following status codes:
1055 .Bl -column YXZ description
1056 .It U Ta file was updated and contained no local changes
1057 .It G Ta file was updated and local changes were merged cleanly
1058 .It C Ta file was updated and conflicts occurred during merge
1059 .It D Ta file was deleted
1060 .It A Ta new file was added
1061 .It \(a~ Ta versioned file is obstructed by a non-regular file
1062 .It ! Ta a missing versioned file was restored
1063 .El
1064 .Pp
1065 The options for
1066 .Cm got branch
1067 are as follows:
1068 .Bl -tag -width Ds
1069 .It Fl c Ar commit
1070 Make a newly created branch reference point at the specified
1071 .Ar commit .
1072 The expected
1073 .Ar commit
1074 argument is a commit ID SHA1 hash or an existing reference
1075 or tag name which will be resolved to a commit ID.
1076 .It Fl r Ar repository-path
1077 Use the repository at the specified path.
1078 If not specified, assume the repository is located at or above the current
1079 working directory.
1080 If this directory is a
1081 .Nm
1082 work tree, use the repository path associated with this work tree.
1083 .It Fl l
1084 List all existing branches in the repository, including copies of remote
1085 repositories' branches in the
1086 .Dq refs/remotes/
1087 reference namespace.
1088 .Pp
1089 If invoked in a work tree, the work tree's current branch is shown
1090 with one the following annotations:
1091 .Bl -column YXZ description
1092 .It * Ta work tree's base commit matches the branch tip
1093 .It \(a~ Ta work tree's base commit is out-of-date
1094 .El
1095 .It Fl d Ar name
1096 Delete the branch with the specified
1097 .Ar name
1098 from the
1099 .Dq refs/heads
1101 .Dq refs/remotes
1102 reference namespace.
1103 .Pp
1104 Only the branch reference is deleted.
1105 Any commit, tree, and blob objects belonging to the branch
1106 remain in the repository and may be removed separately with
1107 Git's garbage collector or
1108 .Cm gotadmin cleanup .
1109 .It Fl n
1110 Do not switch and update the work tree after creating a new branch.
1111 .El
1112 .It Cm tag Oo Fl c Ar commit Oc Oo Fl m Ar message Oc Oo Fl r Ar repository-path Oc Oo Fl l Oc Ar name
1113 Manage tags in a repository.
1114 .Pp
1115 Tags are managed via references which live in the
1116 .Dq refs/tags/
1117 reference namespace.
1118 The
1119 .Cm got tag
1120 command operates on references in this namespace only.
1121 References in this namespace point at tag objects which contain a pointer
1122 to another object, a tag message, as well as author and timestamp information.
1123 .Pp
1124 Attempt to create a tag with the given
1125 .Ar name ,
1126 and make this tag point at the given
1127 .Ar commit .
1128 If no commit is specified, default to the latest commit on the work tree's
1129 current branch if invoked in a work tree, and to a commit resolved via
1130 the repository's HEAD reference otherwise.
1131 .Pp
1132 The options for
1133 .Cm got tag
1134 are as follows:
1135 .Bl -tag -width Ds
1136 .It Fl c Ar commit
1137 Make the newly created tag reference point at the specified
1138 .Ar commit .
1139 The expected
1140 .Ar commit
1141 argument is a commit ID SHA1 hash or an existing reference or tag name which
1142 will be resolved to a commit ID.
1143 An abbreviated hash argument will be expanded to a full SHA1 hash
1144 automatically, provided the abbreviation is unique.
1145 .It Fl m Ar message
1146 Use the specified tag message when creating the new tag.
1147 Without the
1148 .Fl m
1149 option,
1150 .Cm got tag
1151 opens a temporary file in an editor where a tag message can be written.
1152 .It Fl r Ar repository-path
1153 Use the repository at the specified path.
1154 If not specified, assume the repository is located at or above the current
1155 working directory.
1156 If this directory is a
1157 .Nm
1158 work tree, use the repository path associated with this work tree.
1159 .It Fl l
1160 List all existing tags in the repository instead of creating a new tag.
1161 If this option is used, no other command-line arguments are allowed.
1162 .El
1163 .Pp
1164 By design, the
1165 .Cm got tag
1166 command will not delete tags or change existing tags.
1167 If a tag must be deleted, the
1168 .Cm got ref
1169 command may be used to delete a tag's reference.
1170 This should only be done if the tag has not already been copied to
1171 another repository.
1172 .It Cm add Oo Fl R Oc Oo Fl I Oc Ar path ...
1173 Schedule unversioned files in a work tree for addition to the
1174 repository in the next commit.
1175 By default, files which match a
1176 .Cm got status
1177 ignore pattern will not be added.
1178 .Pp
1179 The options for
1180 .Cm got add
1181 are as follows:
1182 .Bl -tag -width Ds
1183 .It Fl R
1184 Permit recursion into directories.
1185 If this option is not specified,
1186 .Cm got add
1187 will refuse to run if a specified
1188 .Ar path
1189 is a directory.
1190 .It Fl I
1191 Add files even if they match a
1192 .Cm got status
1193 ignore pattern.
1194 .El
1195 .Tg rm
1196 .It Cm remove Oo Fl f Oc Oo Fl k Oc Oo Fl R Oc Oo Fl s Ar status-codes Oc Ar path ...
1197 .Dl (alias: Cm rm )
1198 Remove versioned files from a work tree and schedule them for deletion
1199 from the repository in the next commit.
1200 .Pp
1201 The options for
1202 .Cm got remove
1203 are as follows:
1204 .Bl -tag -width Ds
1205 .It Fl f
1206 Perform the operation even if a file contains local modifications.
1207 .It Fl k
1208 Keep affected files on disk.
1209 .It Fl R
1210 Permit recursion into directories.
1211 If this option is not specified,
1212 .Cm got remove
1213 will refuse to run if a specified
1214 .Ar path
1215 is a directory.
1216 .It Fl s Ar status-codes
1217 Only delete files with a modification status matching one of the
1218 single-character status codes contained in the
1219 .Ar status-codes
1220 argument.
1221 The following status codes may be specified:
1222 .Bl -column YXZ description
1223 .It M Ta modified file (this implies the
1224 .Fl f
1225 option)
1226 .It ! Ta versioned file expected on disk but missing
1227 .El
1228 .El
1229 .Tg rv
1230 .It Cm revert Oo Fl p Oc Oo Fl F Ar response-script Oc Oo Fl R Oc Ar path ...
1231 .Dl (alias: Cm rv )
1232 Revert any local changes in files at the specified paths in a work tree.
1233 File contents will be overwritten with those contained in the
1234 work tree's base commit.
1235 There is no way to bring discarded changes back after
1236 .Cm got revert !
1237 .Pp
1238 If a file was added with
1239 .Cm got add
1240 it will become an unversioned file again.
1241 If a file was deleted with
1242 .Cm got remove
1243 it will be restored.
1244 .Pp
1245 The options for
1246 .Cm got revert
1247 are as follows:
1248 .Bl -tag -width Ds
1249 .It Fl p
1250 Instead of reverting all changes in files, interactively select or reject
1251 changes to revert based on
1252 .Dq y
1253 (revert change),
1254 .Dq n
1255 (keep change), and
1256 .Dq q
1257 (quit reverting this file) responses.
1258 If a file is in modified status, individual patches derived from the
1259 modified file content can be reverted.
1260 Files in added or deleted status may only be reverted in their entirety.
1261 .It Fl F Ar response-script
1262 With the
1263 .Fl p
1264 option, read
1265 .Dq y ,
1266 .Dq n ,
1267 and
1268 .Dq q
1269 responses line-by-line from the specified
1270 .Ar response-script
1271 file instead of prompting interactively.
1272 .It Fl R
1273 Permit recursion into directories.
1274 If this option is not specified,
1275 .Cm got revert
1276 will refuse to run if a specified
1277 .Ar path
1278 is a directory.
1279 .El
1280 .Tg ci
1281 .It Cm commit Oo Fl F Ar path Oc Oo Fl m Ar message Oc Oo Fl N Oc Oo Fl S Oc Op Ar path ...
1282 .Dl (alias: Cm ci )
1283 Create a new commit in the repository from changes in a work tree
1284 and use this commit as the new base commit for the work tree.
1285 If no
1286 .Ar path
1287 is specified, commit all changes in the work tree.
1288 Otherwise, commit changes at or within the specified paths.
1289 .Pp
1290 If changes have been explicitly staged for commit with
1291 .Cm got stage ,
1292 only commit staged changes and reject any specified paths which
1293 have not been staged.
1294 .Pp
1295 .Cm got commit
1296 opens a temporary file in an editor where a log message can be written
1297 unless the
1298 .Fl m
1299 option is used
1300 or the
1301 .Fl F
1302 and
1303 .Fl N
1304 options are used together.
1305 .Pp
1306 Show the status of each affected file, using the following status codes:
1307 .Bl -column YXZ description
1308 .It M Ta modified file
1309 .It D Ta file was deleted
1310 .It A Ta new file was added
1311 .It m Ta modified file modes (executable bit only)
1312 .El
1313 .Pp
1314 Files which are not part of the new commit will retain their previously
1315 recorded base commit.
1316 Some
1317 .Nm
1318 commands may refuse to run while the work tree contains files from
1319 multiple base commits.
1320 The base commit of such a work tree can be made consistent by running
1321 .Cm got update
1322 across the entire work tree.
1323 .Pp
1324 The
1325 .Cm got commit
1326 command requires the
1327 .Ev GOT_AUTHOR
1328 environment variable to be set,
1329 unless an author has been configured in
1330 .Xr got.conf 5
1331 or Git's
1332 .Dv user.name
1333 and
1334 .Dv user.email
1335 configuration settings can be
1336 obtained from the repository's
1337 .Pa .git/config
1338 file or from Git's global
1339 .Pa ~/.gitconfig
1340 configuration file.
1341 .Pp
1342 The options for
1343 .Cm got commit
1344 are as follows:
1345 .Bl -tag -width Ds
1346 .It Fl F Ar path
1347 Use the prepared log message stored in the file found at
1348 .Ar path
1349 when creating the new commit.
1350 .Cm got commit
1351 opens a temporary file in an editor where the prepared log message can be
1352 reviewed and edited further if needed.
1353 Cannot be used together with the
1354 .Fl m
1355 option.
1356 .It Fl m Ar message
1357 Use the specified log message when creating the new commit.
1358 Cannot be used together with the
1359 .Fl F
1360 option.
1361 .It Fl N
1362 This option prevents
1363 .Cm got commit
1364 from opening the commit message in an editor.
1365 It has no effect unless it is used together with the
1366 .Fl F
1367 option and is intended for non-interactive use such as scripting.
1368 .It Fl S
1369 Allow the addition of symbolic links which point outside of the path space
1370 that is under version control.
1371 By default,
1372 .Cm got commit
1373 will reject such symbolic links due to safety concerns.
1374 As a precaution,
1375 .Nm
1376 may decide to represent such a symbolic link as a regular file which contains
1377 the link's target path, rather than creating an actual symbolic link which
1378 points outside of the work tree.
1379 Use of this option is discouraged because external mechanisms such as
1380 .Dq make obj
1381 are better suited for managing symbolic links to paths not under
1382 version control.
1383 .El
1384 .Pp
1385 .Cm got commit
1386 will refuse to run if certain preconditions are not met.
1387 If the work tree's current branch is not in the
1388 .Dq refs/heads/
1389 reference namespace, new commits may not be created on this branch.
1390 Local changes may only be committed if they are based on file content
1391 found in the most recent commit on the work tree's branch.
1392 If a path is found to be out of date,
1393 .Cm got update
1394 must be used first in order to merge local changes with changes made
1395 in the repository.
1396 .Tg se
1397 .It Cm send Oo Fl a Oc Oo Fl b Ar branch Oc Oo Fl d Ar branch Oc Oo Fl f Oc Oo Fl r Ar repository-path Oc Oo Fl t Ar tag Oc Oo Fl T Oc Oo Fl q Oc Oo Fl v Oc Op Ar remote-repository
1398 .Dl (alias: Cm se )
1399 Send new changes to a remote repository.
1400 If no
1401 .Ar remote-repository
1402 is specified,
1403 .Dq origin
1404 will be used.
1405 The remote repository's URL is obtained from the corresponding entry in
1406 .Xr got.conf 5
1407 or Git's
1408 .Pa config
1409 file of the local repository, as created by
1410 .Cm got clone .
1411 .Pp
1412 All objects corresponding to new changes will be written to a temporary
1413 pack file which is then uploaded to the server.
1414 Upon success, references in the
1415 .Dq refs/remotes/
1416 reference namespace of the local repository will be updated to point at
1417 the commits which have been sent.
1418 .Pp
1419 By default, changes will only be sent if they are based on up-to-date
1420 copies of relevant branches in the remote repository.
1421 If any changes to be sent are based on out-of-date copies or would
1422 otherwise break linear history of existing branches, new changes must
1423 be fetched from the server with
1424 .Cm got fetch
1425 and local branches must be rebased with
1426 .Cm got rebase
1427 before
1428 .Cm got send
1429 can succeed.
1430 The
1431 .Fl f
1432 option can be used to make exceptions to these requirements.
1433 .Pp
1434 The options for
1435 .Cm got send
1436 are as follows:
1437 .Bl -tag -width Ds
1438 .It Fl a
1439 Send all branches from the local repository's
1440 .Dq refs/heads/
1441 reference namespace.
1442 The
1443 .Fl a
1444 option is equivalent to listing all branches with multiple
1445 .Fl b
1446 options.
1447 Cannot be used together with the
1448 .Fl b
1449 option.
1450 .It Fl b Ar branch
1451 Send the specified
1452 .Ar branch
1453 from the local repository's
1454 .Dq refs/heads/
1455 reference namespace.
1456 This option may be specified multiple times to build a list of branches
1457 to send.
1458 If this option is not specified, default to the work tree's current branch
1459 if invoked in a work tree, or to the repository's HEAD reference.
1460 Cannot be used together with the
1461 .Fl a
1462 option.
1463 .It Fl d Ar branch
1464 Delete the specified
1465 .Ar branch
1466 from the remote repository's
1467 .Dq refs/heads/
1468 reference namespace.
1469 This option may be specified multiple times to build a list of branches
1470 to delete.
1471 .Pp
1472 Only references are deleted.
1473 Any commit, tree, tag, and blob objects belonging to deleted branches
1474 may become subject to deletion by Git's garbage collector running on
1475 the server.
1476 .Pp
1477 Requesting deletion of branches results in an error if the server
1478 does not support this feature or disallows the deletion of branches
1479 based on its configuration.
1480 .It Fl f
1481 Attempt to force the server to overwrite existing branches or tags
1482 in the remote repository, even when
1483 .Cm got fetch
1484 and
1485 .Cm got rebase
1486 would usually be required before changes can be sent.
1487 The server may reject forced requests regardless, depending on its
1488 configuration.
1489 .Pp
1490 Any commit, tree, tag, and blob objects belonging to overwritten branches
1491 or tags may become subject to deletion by Git's garbage collector running
1492 on the server.
1493 .Pp
1494 The
1495 .Dq refs/tags
1496 reference namespace is globally shared between all repositories.
1497 Use of the
1498 .Fl f
1499 option to overwrite tags is discouraged because it can lead to
1500 inconsistencies between the tags present in different repositories.
1501 In general, creating a new tag with a different name is recommended
1502 instead of overwriting an existing tag.
1503 .Pp
1504 Use of the
1505 .Fl f
1506 option is particularly discouraged if changes being sent are based
1507 on an out-of-date copy of a branch in the remote repository.
1508 Instead of using the
1509 .Fl f
1510 option, new changes should
1511 be fetched with
1512 .Cm got fetch
1513 and local branches should be rebased with
1514 .Cm got rebase ,
1515 followed by another attempt to send the changes.
1516 .Pp
1517 The
1518 .Fl f
1519 option should only be needed in situations where the remote repository's
1520 copy of a branch or tag is known to be out-of-date and is considered
1521 disposable.
1522 The risks of creating inconsistencies between different repositories
1523 should also be taken into account.
1524 .It Fl r Ar repository-path
1525 Use the repository at the specified path.
1526 If not specified, assume the repository is located at or above the current
1527 working directory.
1528 If this directory is a
1529 .Nm
1530 work tree, use the repository path associated with this work tree.
1531 .It Fl t Ar tag
1532 Send the specified
1533 .Ar tag
1534 from the local repository's
1535 .Dq refs/tags/
1536 reference namespace, in addition to any branches that are being sent.
1537 The
1538 .Fl t
1539 option may be specified multiple times to build a list of tags to send.
1540 No tags will be sent if the
1541 .Fl t
1542 option is not used.
1543 .Pp
1544 Raise an error if the specified
1545 .Ar tag
1546 already exists in the remote repository, unless the
1547 .Fl f
1548 option is used to overwrite the server's copy of the tag.
1549 In general, creating a new tag with a different name is recommended
1550 instead of overwriting an existing tag.
1551 .Pp
1552 Cannot be used together with the
1553 .Fl T
1554 option.
1555 .It Fl T
1556 Attempt to send all tags from the local repository's
1557 .Dq refs/tags/
1558 reference namespace.
1559 The
1560 .Fl T
1561 option is equivalent to listing all tags with multiple
1562 .Fl t
1563 options.
1564 Cannot be used together with the
1565 .Fl t
1566 option.
1567 .It Fl q
1568 Suppress progress reporting output.
1569 The same option will be passed to
1570 .Xr ssh 1
1571 if applicable.
1572 .It Fl v
1573 Verbose mode.
1574 Causes
1575 .Cm got send
1576 to print debugging messages to standard error output.
1577 The same option will be passed to
1578 .Xr ssh 1
1579 if applicable.
1580 Multiple -v options increase the verbosity.
1581 The maximum is 3.
1582 .El
1583 .Tg cy
1584 .It Cm cherrypick Ar commit
1585 .Dl (alias: Cm cy )
1586 Merge changes from a single
1587 .Ar commit
1588 into the work tree.
1589 The specified
1590 .Ar commit
1591 should be on a different branch than the work tree's base commit.
1592 The expected argument is a reference or a commit ID SHA1 hash.
1593 An abbreviated hash argument will be expanded to a full SHA1 hash
1594 automatically, provided the abbreviation is unique.
1595 .Pp
1596 Show the status of each affected file, using the following status codes:
1597 .Bl -column YXZ description
1598 .It G Ta file was merged
1599 .It C Ta file was merged and conflicts occurred during merge
1600 .It ! Ta changes destined for a missing file were not merged
1601 .It D Ta file was deleted
1602 .It d Ta file's deletion was prevented by local modifications
1603 .It A Ta new file was added
1604 .It \(a~ Ta changes destined for a non-regular file were not merged
1605 .It ? Ta changes destined for an unversioned file were not merged
1606 .El
1607 .Pp
1608 The merged changes will appear as local changes in the work tree, which
1609 may be viewed with
1610 .Cm got diff ,
1611 amended manually or with further
1612 .Cm got cherrypick
1613 commands,
1614 committed with
1615 .Cm got commit ,
1616 or discarded again with
1617 .Cm got revert .
1618 .Pp
1619 .Cm got cherrypick
1620 will refuse to run if certain preconditions are not met.
1621 If the work tree contains multiple base commits it must first be updated
1622 to a single base commit with
1623 .Cm got update .
1624 If any relevant files already contain merge conflicts, these
1625 conflicts must be resolved first.
1626 .Tg bo
1627 .It Cm backout Ar commit
1628 .Dl (alias: Cm bo )
1629 Reverse-merge changes from a single
1630 .Ar commit
1631 into the work tree.
1632 The specified
1633 .Ar commit
1634 should be on the same branch as the work tree's base commit.
1635 The expected argument is a reference or a commit ID SHA1 hash.
1636 An abbreviated hash argument will be expanded to a full SHA1 hash
1637 automatically, provided the abbreviation is unique.
1638 .Pp
1639 Show the status of each affected file, using the following status codes:
1640 .Bl -column YXZ description
1641 .It G Ta file was merged
1642 .It C Ta file was merged and conflicts occurred during merge
1643 .It ! Ta changes destined for a missing file were not merged
1644 .It D Ta file was deleted
1645 .It d Ta file's deletion was prevented by local modifications
1646 .It A Ta new file was added
1647 .It \(a~ Ta changes destined for a non-regular file were not merged
1648 .It ? Ta changes destined for an unversioned file were not merged
1649 .El
1650 .Pp
1651 The reverse-merged changes will appear as local changes in the work tree,
1652 which may be viewed with
1653 .Cm got diff ,
1654 amended manually or with further
1655 .Cm got backout
1656 commands,
1657 committed with
1658 .Cm got commit ,
1659 or discarded again with
1660 .Cm got revert .
1661 .Pp
1662 .Cm got backout
1663 will refuse to run if certain preconditions are not met.
1664 If the work tree contains multiple base commits it must first be updated
1665 to a single base commit with
1666 .Cm got update .
1667 If any relevant files already contain merge conflicts, these
1668 conflicts must be resolved first.
1669 .Tg rb
1670 .It Cm rebase Oo Fl a Oc Oo Fl c Oc Oo Fl l Oc Oo Fl X Oc Op Ar branch
1671 .Dl (alias: Cm rb )
1672 Rebase commits on the specified
1673 .Ar branch
1674 onto the tip of the current branch of the work tree.
1675 The
1676 .Ar branch
1677 must share common ancestry with the work tree's current branch.
1678 Rebasing begins with the first descendant commit of the youngest
1679 common ancestor commit shared by the specified
1680 .Ar branch
1681 and the work tree's current branch, and stops once the tip commit
1682 of the specified
1683 .Ar branch
1684 has been rebased.
1685 .Pp
1686 When
1687 .Cm got rebase
1688 is used as intended, the specified
1689 .Ar branch
1690 represents a local commit history and may already contain changes
1691 that are not yet visible in any other repositories.
1692 The work tree's current branch, which must be set with
1693 .Cm got update -b
1694 before starting the
1695 .Cm rebase
1696 operation, represents a branch from a remote repository which shares
1697 a common history with the specified
1698 .Ar branch
1699 but has progressed, and perhaps diverged, due to commits added to the
1700 remote repository.
1701 .Pp
1702 Rebased commits are accumulated on a temporary branch which the work tree
1703 will remain switched to throughout the entire rebase operation.
1704 Commits on this branch represent the same changes with the same log
1705 messages as their counterparts on the original
1706 .Ar branch ,
1707 but with different commit IDs.
1708 Once rebasing has completed successfully, the temporary branch becomes
1709 the new version of the specified
1710 .Ar branch
1711 and the work tree is automatically switched to it.
1712 .Pp
1713 Old commits in their pre-rebase state are automatically backed up in the
1714 .Dq refs/got/backup/rebase
1715 reference namespace.
1716 As long as these references are not removed older versions of rebased
1717 commits will remain in the repository and can be viewed with the
1718 .Cm got rebase -l
1719 command.
1720 Removal of these references makes objects which become unreachable via
1721 any reference subject to removal by Git's garbage collector or
1722 .Cm gotadmin cleanup .
1723 .Pp
1724 While rebasing commits, show the status of each affected file,
1725 using the following status codes:
1726 .Bl -column YXZ description
1727 .It G Ta file was merged
1728 .It C Ta file was merged and conflicts occurred during merge
1729 .It ! Ta changes destined for a missing file were not merged
1730 .It D Ta file was deleted
1731 .It d Ta file's deletion was prevented by local modifications
1732 .It A Ta new file was added
1733 .It \(a~ Ta changes destined for a non-regular file were not merged
1734 .It ? Ta changes destined for an unversioned file were not merged
1735 .El
1736 .Pp
1737 If merge conflicts occur the rebase operation is interrupted and may
1738 be continued once conflicts have been resolved.
1739 If any files with destined changes are found to be missing or unversioned,
1740 or if files could not be deleted due to differences in deleted content,
1741 the rebase operation will be interrupted to prevent potentially incomplete
1742 changes from being committed to the repository without user intervention.
1743 The work tree may be modified as desired and the rebase operation can be
1744 continued once the changes present in the work tree are considered complete.
1745 Alternatively, the rebase operation may be aborted which will leave
1746 .Ar branch
1747 unmodified and the work tree switched back to its original branch.
1748 .Pp
1749 If a merge conflict is resolved in a way which renders the merged
1750 change into a no-op change, the corresponding commit will be elided
1751 when the rebase operation continues.
1752 .Pp
1753 .Cm got rebase
1754 will refuse to run if certain preconditions are not met.
1755 If the work tree is not yet fully updated to the tip commit of its
1756 branch then the work tree must first be updated with
1757 .Cm got update .
1758 If changes have been staged with
1759 .Cm got stage ,
1760 these changes must first be committed with
1761 .Cm got commit
1762 or unstaged with
1763 .Cm got unstage .
1764 If the work tree contains local changes, these changes must first be
1765 committed with
1766 .Cm got commit
1767 or reverted with
1768 .Cm got revert .
1769 If the
1770 .Ar branch
1771 contains changes to files outside of the work tree's path prefix,
1772 the work tree cannot be used to rebase this branch.
1773 .Pp
1774 The
1775 .Cm got update
1776 and
1777 .Cm got commit
1778 commands will refuse to run while a rebase operation is in progress.
1779 Other commands which manipulate the work tree may be used for
1780 conflict resolution purposes.
1781 .Pp
1782 The options for
1783 .Cm got rebase
1784 are as follows:
1785 .Bl -tag -width Ds
1786 .It Fl a
1787 Abort an interrupted rebase operation.
1788 If this option is used, no other command-line arguments are allowed.
1789 .It Fl c
1790 Continue an interrupted rebase operation.
1791 If this option is used, no other command-line arguments are allowed.
1792 .It Fl l
1793 Show a list of past rebase operations, represented by references in the
1794 .Dq refs/got/backup/rebase
1795 reference namespace.
1796 .Pp
1797 Display the author, date, and log message of each backed up commit,
1798 the object ID of the corresponding post-rebase commit, and
1799 the object ID of their common ancestor commit.
1800 Given these object IDs,
1801 the
1802 .Cm got log
1803 command with the
1804 .Fl c
1805 and
1806 .Fl x
1807 options can be used to examine the history of either version of the branch,
1808 and the
1809 .Cm got branch
1810 command with the
1811 .Fl c
1812 option can be used to create a new branch from a pre-rebase state if desired.
1813 .Pp
1814 If a
1815 .Ar branch
1816 is specified, only show commits which at some point in time represented this
1817 branch.
1818 Otherwise, list all backed up commits for any branches.
1819 .Pp
1820 If this option is used,
1821 .Cm got rebase
1822 does not require a work tree.
1823 None of the other options can be used together with
1824 .Fl l .
1825 .It Fl X
1826 Delete backups created by past rebase operations, represented by references
1827 in the
1828 .Dq refs/got/backup/rebase
1829 reference namespace.
1830 .Pp
1831 If a
1832 .Ar branch
1833 is specified, only delete backups which at some point in time represented
1834 this branch.
1835 Otherwise, delete all references found within
1836 .Dq refs/got/backup/rebase .
1837 .Pp
1838 Any commit, tree, tag, and blob objects belonging to deleted backups
1839 remain in the repository and may be removed separately with
1840 Git's garbage collector or
1841 .Cm gotadmin cleanup .
1842 .Pp
1843 If this option is used,
1844 .Cm got rebase
1845 does not require a work tree.
1846 None of the other options can be used together with
1847 .Fl X .
1848 .El
1849 .Tg he
1850 .It Cm histedit Oo Fl a Oc Oo Fl c Oc Oo Fl e Oc Oo Fl f Oc Oo Fl F Ar histedit-script Oc Oo Fl m Oc Oo Fl l Oc Oo Fl X Oc Op Ar branch
1851 .Dl (alias: Cm he )
1852 Edit commit history between the work tree's current base commit and
1853 the tip commit of the work tree's current branch.
1854 .Pp
1855 Before starting a
1856 .Cm histedit
1857 operation the work tree's current branch must be set with
1858 .Cm got update -b
1859 to the branch which should be edited, unless this branch is already the
1860 current branch of the work tree.
1861 The tip of this branch represents the upper bound (inclusive) of commits
1862 touched by the
1863 .Cm histedit
1864 operation.
1865 .Pp
1866 Furthermore, the work tree's base commit
1867 must be set with
1868 .Cm got update -c
1869 to a point in this branch's commit history where editing should begin.
1870 This commit represents the lower bound (non-inclusive) of commits touched
1871 by the
1872 .Cm histedit
1873 operation.
1874 .Pp
1875 Editing of commit history is controlled via a
1876 .Ar histedit script
1877 which can be written in an editor based on a template, passed on the
1878 command line, or generated with the
1879 .Fl f
1881 .Fl m
1882 options.
1883 .Pp
1884 The format of the histedit script is line-based.
1885 Each line in the script begins with a command name, followed by
1886 whitespace and an argument.
1887 For most commands, the expected argument is a commit ID SHA1 hash.
1888 Any remaining text on the line is ignored.
1889 Lines which begin with the
1890 .Sq #
1891 character are ignored entirely.
1892 .Pp
1893 The available commands are as follows:
1894 .Bl -column YXZ pick-commit
1895 .It pick Ar commit Ta Use the specified commit as it is.
1896 .It edit Ar commit Ta Use the specified commit but once changes have been
1897 merged into the work tree interrupt the histedit operation for amending.
1898 .It fold Ar commit Ta Combine the specified commit with the next commit
1899 listed further below that will be used.
1900 .It drop Ar commit Ta Remove this commit from the edited history.
1901 .It mesg Ar log-message Ta Use the specified single-line log message for
1902 the commit on the previous line.
1903 If the log message argument is left empty, open an editor where a new
1904 log message can be written.
1905 .El
1906 .Pp
1907 Every commit in the history being edited must be mentioned in the script.
1908 Lines may be re-ordered to change the order of commits in the edited history.
1909 No commit may be listed more than once.
1910 .Pp
1911 Edited commits are accumulated on a temporary branch which the work tree
1912 will remain switched to throughout the entire histedit operation.
1913 Once history editing has completed successfully, the temporary branch becomes
1914 the new version of the work tree's branch and the work tree is automatically
1915 switched to it.
1916 .Pp
1917 Old commits in their pre-histedit state are automatically backed up in the
1918 .Dq refs/got/backup/histedit
1919 reference namespace.
1920 As long as these references are not removed older versions of edited
1921 commits will remain in the repository and can be viewed with the
1922 .Cm got histedit -l
1923 command.
1924 Removal of these references makes objects which become unreachable via
1925 any reference subject to removal by Git's garbage collector or
1926 .Cm gotadmin cleanup .
1927 .Pp
1928 While merging commits, show the status of each affected file,
1929 using the following status codes:
1930 .Bl -column YXZ description
1931 .It G Ta file was merged
1932 .It C Ta file was merged and conflicts occurred during merge
1933 .It ! Ta changes destined for a missing file were not merged
1934 .It D Ta file was deleted
1935 .It d Ta file's deletion was prevented by local modifications
1936 .It A Ta new file was added
1937 .It \(a~ Ta changes destined for a non-regular file were not merged
1938 .It ? Ta changes destined for an unversioned file were not merged
1939 .El
1940 .Pp
1941 If merge conflicts occur the histedit operation is interrupted and may
1942 be continued once conflicts have been resolved.
1943 If any files with destined changes are found to be missing or unversioned,
1944 or if files could not be deleted due to differences in deleted content,
1945 the histedit operation will be interrupted to prevent potentially incomplete
1946 changes from being committed to the repository without user intervention.
1947 The work tree may be modified as desired and the histedit operation can be
1948 continued once the changes present in the work tree are considered complete.
1949 Alternatively, the histedit operation may be aborted which will leave
1950 the work tree switched back to its original branch.
1951 .Pp
1952 If a merge conflict is resolved in a way which renders the merged
1953 change into a no-op change, the corresponding commit will be elided
1954 when the histedit operation continues.
1955 .Pp
1956 .Cm got histedit
1957 will refuse to run if certain preconditions are not met.
1958 If the work tree's current branch is not in the
1959 .Dq refs/heads/
1960 reference namespace, the history of the branch may not be edited.
1961 If the work tree contains multiple base commits it must first be updated
1962 to a single base commit with
1963 .Cm got update .
1964 If changes have been staged with
1965 .Cm got stage ,
1966 these changes must first be committed with
1967 .Cm got commit
1968 or unstaged with
1969 .Cm got unstage .
1970 If the work tree contains local changes, these changes must first be
1971 committed with
1972 .Cm got commit
1973 or reverted with
1974 .Cm got revert .
1975 If the edited history contains changes to files outside of the work tree's
1976 path prefix, the work tree cannot be used to edit the history of this branch.
1977 .Pp
1978 The
1979 .Cm got update ,
1980 .Cm got rebase ,
1981 and
1982 .Cm got integrate
1983 commands will refuse to run while a histedit operation is in progress.
1984 Other commands which manipulate the work tree may be used, and the
1985 .Cm got commit
1986 command may be used to commit arbitrary changes to the temporary branch
1987 while the histedit operation is interrupted.
1988 .Pp
1989 The options for
1990 .Cm got histedit
1991 are as follows:
1992 .Bl -tag -width Ds
1993 .It Fl a
1994 Abort an interrupted histedit operation.
1995 If this option is used, no other command-line arguments are allowed.
1996 .It Fl c
1997 Continue an interrupted histedit operation.
1998 If this option is used, no other command-line arguments are allowed.
1999 .It Fl e
2000 Interrupt the histedit operation for editing after merging each commit.
2001 This option is a quick equivalent to a histedit script which uses the
2002 .Cm edit
2003 command for all commits.
2004 The
2005 .Fl e
2006 option can only be used when starting a new histedit operation.
2007 If this option is used, no other command-line arguments are allowed.
2008 .It Fl f
2009 Fold all commits into a single commit.
2010 This option is a quick equivalent to a histedit script which folds all
2011 commits, combining them all into one commit.
2012 The
2013 .Fl f
2014 option can only be used when starting a new histedit operation.
2015 If this option is used, no other command-line arguments are allowed.
2016 .It Fl F Ar histedit-script
2017 Use the specified
2018 .Ar histedit-script
2019 instead of opening a temporary file in an editor where a histedit script
2020 can be written.
2021 .It Fl m
2022 Edit log messages only.
2023 This option is a quick equivalent to a histedit script which edits
2024 only log messages but otherwise leaves every picked commit as-is.
2025 The
2026 .Fl m
2027 option can only be used when starting a new histedit operation.
2028 If this option is used, no other command-line arguments are allowed.
2029 .It Fl l
2030 Show a list of past histedit operations, represented by references in the
2031 .Dq refs/got/backup/histedit
2032 reference namespace.
2033 .Pp
2034 Display the author, date, and log message of each backed up commit,
2035 the object ID of the corresponding post-histedit commit, and
2036 the object ID of their common ancestor commit.
2037 Given these object IDs,
2038 the
2039 .Cm got log
2040 command with the
2041 .Fl c
2042 and
2043 .Fl x
2044 options can be used to examine the history of either version of the branch,
2045 and the
2046 .Cm got branch
2047 command with the
2048 .Fl c
2049 option can be used to create a new branch from a pre-histedit state if desired.
2050 .Pp
2051 If a
2052 .Ar branch
2053 is specified, only show commits which at some point in time represented this
2054 branch.
2055 Otherwise, list all backed up commits for any branches.
2056 .Pp
2057 If this option is used,
2058 .Cm got histedit
2059 does not require a work tree.
2060 None of the other options can be used together with
2061 .Fl l .
2062 .It Fl X
2063 Delete backups created by past histedit operations, represented by references
2064 in the
2065 .Dq refs/got/backup/histedit
2066 reference namespace.
2067 .Pp
2068 If a
2069 .Ar branch
2070 is specified, only delete backups which at some point in time represented
2071 this branch.
2072 Otherwise, delete all references found within
2073 .Dq refs/got/backup/histedit .
2074 .Pp
2075 Any commit, tree, tag, and blob objects belonging to deleted backups
2076 remain in the repository and may be removed separately with
2077 Git's garbage collector or
2078 .Cm gotadmin cleanup .
2079 .Pp
2080 If this option is used,
2081 .Cm got histedit
2082 does not require a work tree.
2083 None of the other options can be used together with
2084 .Fl X .
2085 .El
2086 .Tg ig
2087 .It Cm integrate Ar branch
2088 .Dl (alias: Cm ig )
2089 Integrate the specified
2090 .Ar branch
2091 into the work tree's current branch.
2092 Files in the work tree are updated to match the contents on the integrated
2093 .Ar branch ,
2094 and the reference of the work tree's branch is changed to point at the
2095 head commit of the integrated
2096 .Ar branch .
2097 .Pp
2098 Both branches can be considered equivalent after integration since they
2099 will be pointing at the same commit.
2100 Both branches remain available for future work, if desired.
2101 In case the integrated
2102 .Ar branch
2103 is no longer needed it may be deleted with
2104 .Cm got branch -d .
2105 .Pp
2106 Show the status of each affected file, using the following status codes:
2107 .Bl -column YXZ description
2108 .It U Ta file was updated
2109 .It D Ta file was deleted
2110 .It A Ta new file was added
2111 .It \(a~ Ta versioned file is obstructed by a non-regular file
2112 .It ! Ta a missing versioned file was restored
2113 .El
2114 .Pp
2115 .Cm got integrate
2116 will refuse to run if certain preconditions are not met.
2117 Most importantly, the
2118 .Ar branch
2119 must have been rebased onto the work tree's current branch with
2120 .Cm got rebase
2121 before it can be integrated, in order to linearize commit history and
2122 resolve merge conflicts.
2123 If the work tree contains multiple base commits it must first be updated
2124 to a single base commit with
2125 .Cm got update .
2126 If changes have been staged with
2127 .Cm got stage ,
2128 these changes must first be committed with
2129 .Cm got commit
2130 or unstaged with
2131 .Cm got unstage .
2132 If the work tree contains local changes, these changes must first be
2133 committed with
2134 .Cm got commit
2135 or reverted with
2136 .Cm got revert .
2137 .It Cm merge Oo Fl a Oc Oo Fl c Oc Oo Fl n Oc Op Ar branch
2138 Create a merge commit based on the current branch of the work tree and
2139 the specified
2140 .Ar branch .
2141 If a linear project history is desired, then use of
2142 .Cm got rebase
2143 should be preferred over
2144 .Cm got merge .
2145 However, even strictly linear projects may require merge commits in order
2146 to merge in new versions of third-party code stored on vendor branches
2147 created with
2148 .Cm got import .
2149 .Pp
2150 Merge commits are commits based on multiple parent commits.
2151 The tip commit of the work tree's current branch, which must be set with
2152 .Cm got update -b
2153 before starting the
2154 .Cm merge
2155 operation, will be used as the first parent.
2156 The tip commit of the specified
2157 .Ar branch
2158 will be used as the second parent.
2159 .Pp
2160 No ancestral relationship between the two branches is required.
2161 If the two branches have already been merged previously, only new changes
2162 will be merged.
2163 .Pp
2164 It is not possible to create merge commits with more than two parents.
2165 If more than one branch needs to be merged, then multiple merge commits
2166 with two parents each can be created in sequence.
2167 .Pp
2168 While merging changes found on the
2169 .Ar branch
2170 into the work tree, show the status of each affected file,
2171 using the following status codes:
2172 .Bl -column YXZ description
2173 .It G Ta file was merged
2174 .It C Ta file was merged and conflicts occurred during merge
2175 .It ! Ta changes destined for a missing file were not merged
2176 .It D Ta file was deleted
2177 .It d Ta file's deletion was prevented by local modifications
2178 .It A Ta new file was added
2179 .It \(a~ Ta changes destined for a non-regular file were not merged
2180 .It ? Ta changes destined for an unversioned file were not merged
2181 .El
2182 .Pp
2183 If merge conflicts occur, the merge operation is interrupted and conflicts
2184 must be resolved before the merge operation can continue.
2185 If any files with destined changes are found to be missing or unversioned,
2186 or if files could not be deleted due to differences in deleted content,
2187 the merge operation will be interrupted to prevent potentially incomplete
2188 changes from being committed to the repository without user intervention.
2189 The work tree may be modified as desired and the merge can be continued
2190 once the changes present in the work tree are considered complete.
2191 Alternatively, the merge operation may be aborted which will leave
2192 the work tree's current branch unmodified.
2193 .Pp
2194 If a merge conflict is resolved in a way which renders all merged
2195 changes into no-op changes, the merge operation cannot continue
2196 and must be aborted.
2197 .Pp
2198 .Cm got merge
2199 will refuse to run if certain preconditions are not met.
2200 If history of the
2201 .Ar branch
2202 is based on the work tree's current branch, then no merge commit can
2203 be created and
2204 .Cm got integrate
2205 may be used to integrate the
2206 .Ar branch
2207 instead.
2208 If the work tree is not yet fully updated to the tip commit of its
2209 branch, then the work tree must first be updated with
2210 .Cm got update .
2211 If the work tree contains multiple base commits it must first be updated
2212 to a single base commit with
2213 .Cm got update .
2214 If changes have been staged with
2215 .Cm got stage ,
2216 these changes must first be committed with
2217 .Cm got commit
2218 or unstaged with
2219 .Cm got unstage .
2220 If the work tree contains local changes, these changes must first be
2221 committed with
2222 .Cm got commit
2223 or reverted with
2224 .Cm got revert .
2225 If the
2226 .Ar branch
2227 contains changes to files outside of the work tree's path prefix,
2228 the work tree cannot be used to merge this branch.
2229 .Pp
2230 The
2231 .Cm got update ,
2232 .Cm got commit ,
2233 .Cm got rebase ,
2234 .Cm got histedit ,
2235 .Cm got integrate ,
2236 and
2237 .Cm got stage
2238 commands will refuse to run while a merge operation is in progress.
2239 Other commands which manipulate the work tree may be used for
2240 conflict resolution purposes.
2241 .Pp
2242 The options for
2243 .Cm got merge
2244 are as follows:
2245 .Bl -tag -width Ds
2246 .It Fl a
2247 Abort an interrupted merge operation.
2248 If this option is used, no other command-line arguments are allowed.
2249 .It Fl c
2250 Continue an interrupted merge operation.
2251 If this option is used, no other command-line arguments are allowed.
2252 .It Fl n
2253 Merge changes into the work tree as usual but do not create a merge
2254 commit immediately.
2255 The merge result can be adjusted as desired before a merge commit is
2256 created with
2257 .Cm got merge -c .
2258 Alternatively, the merge may be aborted with
2259 .Cm got merge -a .
2260 .El
2261 .Tg sg
2262 .It Cm stage Oo Fl l Oc Oo Fl p Oc Oo Fl F Ar response-script Oc Oo Fl S Oc Op Ar path ...
2263 .Dl (alias: Cm sg )
2264 Stage local changes for inclusion in the next commit.
2265 If no
2266 .Ar path
2267 is specified, stage all changes in the work tree.
2268 Otherwise, stage changes at or within the specified paths.
2269 Paths may be staged if they are added, modified, or deleted according to
2270 .Cm got status .
2271 .Pp
2272 Show the status of each affected file, using the following status codes:
2273 .Bl -column YXZ description
2274 .It A Ta file addition has been staged
2275 .It M Ta file modification has been staged
2276 .It D Ta file deletion has been staged
2277 .El
2278 .Pp
2279 Staged file contents are saved in newly created blob objects in the repository.
2280 These blobs will be referred to by tree objects once staged changes have been
2281 committed.
2282 .Pp
2283 Staged changes affect the behaviour of
2284 .Cm got commit ,
2285 .Cm got status ,
2286 and
2287 .Cm got diff .
2288 While paths with staged changes exist, the
2289 .Cm got commit
2290 command will refuse to commit any paths which do not have staged changes.
2291 Local changes created on top of staged changes can only be committed if
2292 the path is staged again, or if the staged changes are committed first.
2293 The
2294 .Cm got status
2295 command will show both local changes and staged changes.
2296 The
2297 .Cm got diff
2298 command is able to display local changes relative to staged changes,
2299 and to display staged changes relative to the repository.
2300 The
2301 .Cm got revert
2302 command cannot revert staged changes but may be used to revert
2303 local changes created on top of staged changes.
2304 .Pp
2305 The options for
2306 .Cm got stage
2307 are as follows:
2308 .Bl -tag -width Ds
2309 .It Fl l
2310 Instead of staging new changes, list paths which are already staged,
2311 along with the IDs of staged blob objects and stage status codes.
2312 If paths were provided in the command line show the staged paths
2313 among the specified paths.
2314 Otherwise, show all staged paths.
2315 .It Fl p
2316 Instead of staging the entire content of a changed file, interactively
2317 select or reject changes for staging based on
2318 .Dq y
2319 (stage change),
2320 .Dq n
2321 (reject change), and
2322 .Dq q
2323 (quit staging this file) responses.
2324 If a file is in modified status, individual patches derived from the
2325 modified file content can be staged.
2326 Files in added or deleted status may only be staged or rejected in
2327 their entirety.
2328 .It Fl F Ar response-script
2329 With the
2330 .Fl p
2331 option, read
2332 .Dq y ,
2333 .Dq n ,
2334 and
2335 .Dq q
2336 responses line-by-line from the specified
2337 .Ar response-script
2338 file instead of prompting interactively.
2339 .It Fl S
2340 Allow staging of symbolic links which point outside of the path space
2341 that is under version control.
2342 By default,
2343 .Cm got stage
2344 will reject such symbolic links due to safety concerns.
2345 As a precaution,
2346 .Nm
2347 may decide to represent such a symbolic link as a regular file which contains
2348 the link's target path, rather than creating an actual symbolic link which
2349 points outside of the work tree.
2350 Use of this option is discouraged because external mechanisms such as
2351 .Dq make obj
2352 are better suited for managing symbolic links to paths not under
2353 version control.
2354 .El
2355 .Pp
2356 .Cm got stage
2357 will refuse to run if certain preconditions are not met.
2358 If a file contains merge conflicts, these conflicts must be resolved first.
2359 If a file is found to be out of date relative to the head commit on the
2360 work tree's current branch, the file must be updated with
2361 .Cm got update
2362 before it can be staged (however, this does not prevent the file from
2363 becoming out-of-date at some point after having been staged).
2364 .Pp
2365 The
2366 .Cm got update ,
2367 .Cm got rebase ,
2368 and
2369 .Cm got histedit
2370 commands will refuse to run while staged changes exist.
2371 If staged changes cannot be committed because a staged path
2372 is out of date, the path must be unstaged with
2373 .Cm got unstage
2374 before it can be updated with
2375 .Cm got update ,
2376 and may then be staged again if necessary.
2377 .Tg ug
2378 .It Cm unstage Oo Fl p Oc Oo Fl F Ar response-script Oc Op Ar path ...
2379 .Dl (alias: Cm ug )
2380 Merge staged changes back into the work tree and put affected paths
2381 back into non-staged status.
2382 If no
2383 .Ar path
2384 is specified, unstage all staged changes across the entire work tree.
2385 Otherwise, unstage changes at or within the specified paths.
2386 .Pp
2387 Show the status of each affected file, using the following status codes:
2388 .Bl -column YXZ description
2389 .It G Ta file was unstaged
2390 .It C Ta file was unstaged and conflicts occurred during merge
2391 .It ! Ta changes destined for a missing file were not merged
2392 .It D Ta file was staged as deleted and still is deleted
2393 .It d Ta file's deletion was prevented by local modifications
2394 .It \(a~ Ta changes destined for a non-regular file were not merged
2395 .El
2396 .Pp
2397 The options for
2398 .Cm got unstage
2399 are as follows:
2400 .Bl -tag -width Ds
2401 .It Fl p
2402 Instead of unstaging the entire content of a changed file, interactively
2403 select or reject changes for unstaging based on
2404 .Dq y
2405 (unstage change),
2406 .Dq n
2407 (keep change staged), and
2408 .Dq q
2409 (quit unstaging this file) responses.
2410 If a file is staged in modified status, individual patches derived from the
2411 staged file content can be unstaged.
2412 Files staged in added or deleted status may only be unstaged in their entirety.
2413 .It Fl F Ar response-script
2414 With the
2415 .Fl p
2416 option, read
2417 .Dq y ,
2418 .Dq n ,
2419 and
2420 .Dq q
2421 responses line-by-line from the specified
2422 .Ar response-script
2423 file instead of prompting interactively.
2424 .El
2425 .It Cm cat Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Oo Fl P Oc Ar arg ...
2426 Parse and print contents of objects to standard output in a line-based
2427 text format.
2428 Content of commit, tree, and tag objects is printed in a way similar
2429 to the actual content stored in such objects.
2430 Blob object contents are printed as they would appear in files on disk.
2431 .Pp
2432 Attempt to interpret each argument as a reference, a tag name, or
2433 an object ID SHA1 hash.
2434 References will be resolved to an object ID.
2435 Tag names will resolved to a tag object.
2436 An abbreviated hash argument will be expanded to a full SHA1 hash
2437 automatically, provided the abbreviation is unique.
2438 .Pp
2439 If none of the above interpretations produce a valid result, or if the
2440 .Fl P
2441 option is used, attempt to interpret the argument as a path which will
2442 be resolved to the ID of an object found at this path in the repository.
2443 .Pp
2444 The options for
2445 .Cm got cat
2446 are as follows:
2447 .Bl -tag -width Ds
2448 .It Fl c Ar commit
2449 Look up paths in the specified
2450 .Ar commit .
2451 If this option is not used, paths are looked up in the commit resolved
2452 via the repository's HEAD reference.
2453 The expected argument is a commit ID SHA1 hash or an existing reference
2454 or tag name which will be resolved to a commit ID.
2455 An abbreviated hash argument will be expanded to a full SHA1 hash
2456 automatically, provided the abbreviation is unique.
2457 .It Fl r Ar repository-path
2458 Use the repository at the specified path.
2459 If not specified, assume the repository is located at or above the current
2460 working directory.
2461 If this directory is a
2462 .Nm
2463 work tree, use the repository path associated with this work tree.
2464 .It Fl P
2465 Interpret all arguments as paths only.
2466 This option can be used to resolve ambiguity in cases where paths
2467 look like tag names, reference names, or object IDs.
2468 .El
2469 .It Cm info Op Ar path ...
2470 Display meta-data stored in a work tree.
2471 See
2472 .Xr got-worktree 5
2473 for details.
2474 .Pp
2475 The work tree to use is resolved implicitly by walking upwards from the
2476 current working directory.
2477 .Pp
2478 If one or more
2479 .Ar path
2480 arguments are specified, show additional per-file information for tracked
2481 files located at or within these paths.
2482 If a
2483 .Ar path
2484 argument corresponds to the work tree's root directory, display information
2485 for all tracked files.
2486 .El
2487 .Sh ENVIRONMENT
2488 .Bl -tag -width GOT_AUTHOR
2489 .It Ev GOT_AUTHOR
2490 The author's name and email address for
2491 .Cm got commit
2492 and
2493 .Cm got import ,
2494 for example:
2495 .Dq An Flan Hacker Aq Mt flan_hacker@openbsd.org .
2496 Because
2497 .Xr git 1
2498 may fail to parse commits without an email address in author data,
2499 .Nm
2500 attempts to reject
2501 .Ev GOT_AUTHOR
2502 environment variables with a missing email address.
2503 .Pp
2504 .Ev GOT_AUTHOR will be overridden by configuration settings in
2505 .Xr got.conf 5
2506 or by Git's
2507 .Dv user.name
2508 and
2509 .Dv user.email
2510 configuration settings in the repository's
2511 .Pa .git/config
2512 file.
2513 The
2514 .Dv user.name
2515 and
2516 .Dv user.email
2517 configuration settings contained in Git's global
2518 .Pa ~/.gitconfig
2519 configuration file will only be used if neither
2520 .Xr got.conf 5
2521 nor the
2522 .Ev GOT_AUTHOR
2523 environment variable provide author information.
2524 .It Ev VISUAL , EDITOR
2525 The editor spawned by
2526 .Cm got commit ,
2527 .Cm got histedit ,
2528 .Cm got import ,
2530 .Cm got tag .
2531 If not set, the
2532 .Xr ed 1
2533 text editor will be spawned in order to give
2534 .Xr ed 1
2535 the attention it deserves.
2536 .It Ev GOT_LOG_DEFAULT_LIMIT
2537 The default limit on the number of commits traversed by
2538 .Cm got log .
2539 If set to zero, the limit is unbounded.
2540 This variable will be silently ignored if it is set to a non-numeric value.
2541 .El
2542 .Sh FILES
2543 .Bl -tag -width packed-refs -compact
2544 .It Pa got.conf
2545 Repository-wide configuration settings for
2546 .Nm .
2547 If present, a
2548 .Xr got.conf 5
2549 configuration file located in the root directory of a Git repository
2550 supersedes any relevant settings in Git's
2551 .Pa config
2552 file.
2553 .Pp
2554 .It Pa .got/got.conf
2555 Worktree-specific configuration settings for
2556 .Nm .
2557 If present, a
2558 .Xr got.conf 5
2559 configuration file in the
2560 .Pa .got
2561 meta-data directory of a work tree supersedes any relevant settings in
2562 the repository's
2563 .Xr got.conf 5
2564 configuration file and Git's
2565 .Pa config
2566 file.
2567 .El
2568 .Sh EXIT STATUS
2569 .Ex -std got
2570 .Sh EXAMPLES
2571 Enable tab-completion of
2572 .Nm
2573 command names in
2574 .Xr ksh 1 :
2575 .Pp
2576 .Dl $ set -A complete_got_1 -- $(got -h 2>&1 | sed -n s/commands://p)
2577 .Pp
2578 Clone an existing Git repository for use with
2579 .Nm .
2580 .Pp
2581 .Dl $ cd /var/git/
2582 .Dl $ got clone ssh://git@github.com/openbsd/src.git
2583 .Pp
2584 Use of HTTP URLs currently requires
2585 .Xr git 1 :
2586 .Pp
2587 .Dl $ cd /var/git/
2588 .Dl $ git clone --bare https://github.com/openbsd/src.git
2589 .Pp
2590 Alternatively, for quick and dirty local testing of
2591 .Nm
2592 a new Git repository could be created and populated with files,
2593 e.g. from a temporary CVS checkout located at
2594 .Pa /tmp/src :
2595 .Pp
2596 .Dl $ got init /var/git/src.git
2597 .Dl $ got import -r /var/git/src.git -I CVS -I obj /tmp/src
2598 .Pp
2599 Check out a work tree from the Git repository to /usr/src:
2600 .Pp
2601 .Dl $ got checkout /var/git/src.git /usr/src
2602 .Pp
2603 View local changes in a work tree directory:
2604 .Pp
2605 .Dl $ got diff | less
2606 .Pp
2607 In a work tree, display files in a potentially problematic state:
2608 .Pp
2609 .Dl $ got status -s 'C!~?'
2610 .Pp
2611 Interactively revert selected local changes in a work tree directory:
2612 .Pp
2613 .Dl $ got revert -p -R\ .
2614 .Pp
2615 In a work tree or a git repository directory, list all branch references:
2616 .Pp
2617 .Dl $ got branch -l
2618 .Pp
2619 In a work tree or a git repository directory, create a new branch called
2620 .Dq unified-buffer-cache
2621 which is forked off the
2622 .Dq master
2623 branch:
2624 .Pp
2625 .Dl $ got branch -c master unified-buffer-cache
2626 .Pp
2627 Switch an existing work tree to the branch
2628 .Dq unified-buffer-cache .
2629 Local changes in the work tree will be preserved and merged if necessary:
2630 .Pp
2631 .Dl $ got update -b unified-buffer-cache
2632 .Pp
2633 Create a new commit from local changes in a work tree directory.
2634 This new commit will become the head commit of the work tree's current branch:
2635 .Pp
2636 .Dl $ got commit
2637 .Pp
2638 In a work tree or a git repository directory, view changes committed in
2639 the 3 most recent commits to the work tree's branch, or the branch resolved
2640 via the repository's HEAD reference, respectively:
2641 .Pp
2642 .Dl $ got log -p -l 3
2643 .Pp
2644 As above, but display changes in the order in which
2645 .Xr patch 1
2646 could apply them in sequence:
2647 .Pp
2648 .Dl $ got log -p -l 3 -R
2649 .Pp
2650 In a work tree or a git repository directory, log the history of a subdirectory:
2651 .Pp
2652 .Dl $ got log sys/uvm
2653 .Pp
2654 While operating inside a work tree, paths are specified relative to the current
2655 working directory, so this command will log the subdirectory
2656 .Pa sys/uvm :
2657 .Pp
2658 .Dl $ cd sys/uvm && got log\ .
2659 .Pp
2660 And this command has the same effect:
2661 .Pp
2662 .Dl $ cd sys/dev/usb && got log ../../uvm
2663 .Pp
2664 And this command displays work tree meta-data about all tracked files:
2665 .Pp
2666 .Dl $ cd /usr/src
2667 .Dl $ got info\ . | less
2668 .Pp
2669 Add new files and remove obsolete files in a work tree directory:
2670 .Pp
2671 .Dl $ got add sys/uvm/uvm_ubc.c
2672 .Dl $ got remove sys/uvm/uvm_vnode.c
2673 .Pp
2674 Create a new commit from local changes in a work tree directory
2675 with a pre-defined log message.
2676 .Pp
2677 .Dl $ got commit -m 'unify the buffer cache'
2678 .Pp
2679 Alternatively, create a new commit from local changes in a work tree
2680 directory with a log message that has been prepared in the file
2681 .Pa /tmp/msg :
2682 .Pp
2683 .Dl $ got commit -F /tmp/msg
2684 .Pp
2685 Update any work tree checked out from the
2686 .Dq unified-buffer-cache
2687 branch to the latest commit on this branch:
2688 .Pp
2689 .Dl $ got update
2690 .Pp
2691 Roll file content on the unified-buffer-cache branch back by one commit,
2692 and then fetch the rolled-back change into the work tree as a local change
2693 to be amended and perhaps committed again:
2694 .Pp
2695 .Dl $ got backout unified-buffer-cache
2696 .Dl $ got commit -m 'roll back previous'
2697 .Dl $ # now back out the previous backout :-)
2698 .Dl $ got backout unified-buffer-cache
2699 .Pp
2700 Fetch new changes on the remote repository's
2701 .Dq master
2702 branch, making them visible on the local repository's
2703 .Dq origin/master
2704 branch:
2705 .Pp
2706 .Dl $ cd /usr/src
2707 .Dl $ got fetch
2708 .Pp
2709 In a repository created with a HTTP URL and
2710 .Cm git clone --bare
2711 the
2712 .Xr git-fetch 1
2713 command must be used instead:
2714 .Pp
2715 .Dl $ cd /var/git/src.git
2716 .Dl $ git fetch origin master:refs/remotes/origin/master
2717 .Pp
2718 Rebase the local
2719 .Dq master
2720 branch to merge the new changes that are now visible on the
2721 .Dq origin/master
2722 branch:
2723 .Pp
2724 .Dl $ cd /usr/src
2725 .Dl $ got update -b origin/master
2726 .Dl $ got rebase master
2727 .Pp
2728 Rebase the
2729 .Dq unified-buffer-cache
2730 branch on top of the new head commit of the
2731 .Dq master
2732 branch.
2733 .Pp
2734 .Dl $ got update -b master
2735 .Dl $ got rebase unified-buffer-cache
2736 .Pp
2737 Create a patch from all changes on the unified-buffer-cache branch.
2738 The patch can be mailed out for review and applied to
2739 .Ox Ns 's
2740 CVS tree:
2741 .Pp
2742 .Dl $ got diff master unified-buffer-cache > /tmp/ubc.diff
2743 .Pp
2744 Edit the entire commit history of the
2745 .Dq unified-buffer-cache
2746 branch:
2747 .Pp
2748 .Dl $ got update -b unified-buffer-cache
2749 .Dl $ got update -c master
2750 .Dl $ got histedit
2751 .Pp
2752 Before working against existing branches in a repository cloned with
2753 .Cm git clone --bare
2754 instead of
2755 .Cm got clone ,
2756 a Git
2757 .Dq refspec
2758 must be configured to map all references in the remote repository
2759 into the
2760 .Dq refs/remotes
2761 namespace of the local repository.
2762 This can be achieved by setting Git's
2763 .Pa remote.origin.fetch
2764 configuration variable to the value
2765 .Dq +refs/heads/*:refs/remotes/origin/*
2766 with the
2767 .Cm git config
2768 command:
2769 .Pp
2770 .Dl $ cd /var/git/repo
2771 .Dl $ git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
2772 .Pp
2773 Additionally, the
2774 .Dq mirror
2775 option must be disabled:
2776 .Pp
2777 .Dl $ cd /var/git/repo
2778 .Dl $ git config remote.origin.mirror false
2779 .Pp
2780 Alternatively, the following
2781 .Xr git-fetch 1
2782 configuration item can be added manually to the Git repository's
2783 .Pa config
2784 file:
2785 .Pp
2786 .Dl [remote \&"origin\&"]
2787 .Dl url = ...
2788 .Dl fetch = +refs/heads/*:refs/remotes/origin/*
2789 .Dl mirror = false
2790 .Pp
2791 This configuration leaves the local repository's
2792 .Dq refs/heads
2793 namespace free for use by local branches checked out with
2794 .Cm got checkout
2795 and, if needed, created with
2796 .Cm got branch .
2797 Branches in the
2798 .Dq refs/remotes/origin
2799 namespace can now be updated with incoming changes from the remote
2800 repository with
2801 .Cm got fetch
2803 .Xr git-fetch 1
2804 without extra command line arguments.
2805 Newly fetched changes can be examined with
2806 .Cm got log .
2807 .Pp
2808 Display changes on the remote repository's version of the
2809 .Dq master
2810 branch, as of the last time
2811 .Cm got fetch
2812 was run:
2813 .Pp
2814 .Dl $ got log -c origin/master | less
2815 .Pp
2816 As shown here, most commands accept abbreviated reference names such as
2817 .Dq origin/master
2818 instead of
2819 .Dq refs/remotes/origin/master .
2820 The latter is only needed in case of ambiguity.
2821 .Pp
2822 .Cm got rebase
2823 must be used to merge changes which are visible on the
2824 .Dq origin/master
2825 branch into the
2826 .Dq master
2827 branch.
2828 This will also merge local changes, if any, with the incoming changes:
2829 .Pp
2830 .Dl $ got update -b origin/master
2831 .Dl $ got rebase master
2832 .Pp
2833 In order to make changes committed to the
2834 .Dq unified-buffer-cache
2835 visible on the
2836 .Dq master
2837 branch, the
2838 .Dq unified-buffer-cache
2839 branch must first be rebased onto the
2840 .Dq master
2841 branch:
2842 .Pp
2843 .Dl $ got update -b master
2844 .Dl $ got rebase unified-buffer-cache
2845 .Pp
2846 Changes on the
2847 .Dq unified-buffer-cache
2848 branch can now be made visible on the
2849 .Dq master
2850 branch with
2851 .Cm got integrate .
2852 Because the rebase operation switched the work tree to the
2853 .Dq unified-buffer-cache
2854 branch the work tree must be switched back to the
2855 .Dq master
2856 branch first:
2857 .Pp
2858 .Dl $ got update -b master
2859 .Dl $ got integrate unified-buffer-cache
2860 .Pp
2861 On the
2862 .Dq master
2863 branch, log messages for local changes can now be amended with
2864 .Dq OK
2865 by other developers and any other important new information:
2866 .Pp
2867 .Dl $ got update -c origin/master
2868 .Dl $ got histedit -m
2869 .Pp
2870 If the remote repository offers write access local changes on the
2871 .Dq master
2872 branch can be sent to the remote repository with
2873 .Cm got send .
2874 Usually,
2875 .Cm got send
2876 can be run without further arguments.
2877 The arguments shown here match defaults, provided the work tree's
2878 current branch is the
2879 .Dq master
2880 branch:
2881 .Pp
2882 .Dl $ got send -b master origin
2883 .Pp
2884 If the remote repository requires the HTTPS protocol the
2885 .Xr git-push 1
2886 command must be used instead:
2887 .Pp
2888 .Dl $ cd /var/git/src.git
2889 .Dl $ git push origin master
2890 .Sh SEE ALSO
2891 .Xr gotadmin 1 ,
2892 .Xr tog 1 ,
2893 .Xr git-repository 5 ,
2894 .Xr got-worktree 5 ,
2895 .Xr got.conf 5
2896 .Sh AUTHORS
2897 .An Stefan Sperling Aq Mt stsp@openbsd.org
2898 .An Martin Pieuchot Aq Mt mpi@openbsd.org
2899 .An Joshua Stein Aq Mt jcs@openbsd.org
2900 .An Ori Bernstein Aq Mt ori@openbsd.org
2901 .Sh CAVEATS
2902 .Nm
2903 is a work-in-progress and some features remain to be implemented.
2904 .Pp
2905 At present, the user has to fall back on
2906 .Xr git 1
2907 to perform some tasks.
2908 In particular:
2909 .Bl -bullet
2910 .It
2911 Reading from remote repositories over HTTP or HTTPS protocols requires
2912 .Xr git-clone 1
2913 and
2914 .Xr git-fetch 1 .
2915 .It
2916 Writing to remote repositories over HTTP or HTTPS protocols requires
2917 .Xr git-push 1 .
2918 .It
2919 The creation of merge commits with more than two parent commits requires
2920 .Xr git-merge 1 .
2921 .It
2922 In situations where files or directories were moved around
2923 .Cm got
2924 will not automatically merge changes to new locations and
2925 .Xr git 1
2926 will usually produce better results.
2927 .El