Blob


1 .\"
2 .\" Copyright (c) 2017 Martin Pieuchot
3 .\" Copyright (c) 2018, 2019 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
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 .It Cm in
77 Short alias for
78 .Cm init .
79 .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
80 Create an initial commit in a repository from the file hierarchy
81 within the specified
82 .Ar directory .
83 The created commit will not have any parent commits, i.e. it will be a
84 root commit.
85 Also create a new reference which provides a branch name for the newly
86 created commit.
87 Show the path of each imported file to indicate progress.
88 .Pp
89 The
90 .Cm got import
91 command requires the
92 .Ev GOT_AUTHOR
93 environment variable to be set,
94 unless Git's
95 .Dv user.name
96 and
97 .Dv user.email configuration settings can be
98 obtained from the repository's
99 .Pa .git/config
100 file.
101 .Pp
102 The options for
103 .Cm got import
104 are as follows:
105 .Bl -tag -width Ds
106 .It Fl b Ar branch
107 Create the specified
108 .Ar branch
109 instead of creating the default branch
110 .Dq master .
111 Use of this option is required if the
112 .Dq master
113 branch already exists.
114 .It Fl m Ar message
115 Use the specified log message when creating the new commit.
116 Without the
117 .Fl m
118 option,
119 .Cm got import
120 opens a temporary file in an editor where a log message can be written.
121 .It Fl r Ar repository-path
122 Use the repository at the specified path.
123 If not specified, assume the repository is located at or above the current
124 working directory.
125 .It Fl I Ar pattern
126 Ignore files or directories with a name which matches the specified
127 .Ar pattern .
128 This option may be specified multiple times to build a list of ignore patterns.
129 The
130 .Ar pattern
131 follows the globbing rules documented in
132 .Xr glob 7 .
133 .El
134 .It Cm im
135 Short alias for
136 .Cm import .
137 .It Cm checkout Oo Fl b Ar branch Oc Oo Fl c Ar commit Oc Oo Fl p Ar path-prefix Oc Ar repository-path Op Ar work-tree-path
138 Copy files from a repository into a new work tree.
139 If the
140 .Ar work tree path
141 is not specified, either use the last component of
142 .Ar repository path ,
143 or if a
144 .Ar path prefix
145 was specified use the last component of
146 .Ar path prefix .
147 .Pp
148 The options for
149 .Cm got checkout
150 are as follows:
151 .Bl -tag -width Ds
152 .It Fl b Ar branch
153 Check out files from a commit on the specified
154 .Ar branch .
155 If this option is not specified, a branch resolved via the repository's HEAD
156 reference will be used.
157 .It Fl c Ar commit
158 Check out files from the specified
159 .Ar commit
160 on the selected branch.
161 The expected argument is a commit ID SHA1 hash or an existing reference
162 or tag name which will be resolved to a commit ID.
163 An abbreviated hash argument will be expanded to a full SHA1 hash
164 automatically, provided the abbreviation is unique.
165 If this option is not specified, the most recent commit on the selected
166 branch will be used.
167 .It Fl p Ar path-prefix
168 Restrict the work tree to a subset of the repository's tree hierarchy.
169 Only files beneath the specified
170 .Ar path-prefix
171 will be checked out.
172 .El
173 .It Cm co
174 Short alias for
175 .Cm checkout .
176 .It Cm update Oo Fl b Ar branch Oc Oo Fl c Ar commit Oc Op Ar path ...
177 Update an existing work tree to a different commit.
178 Show the status of each affected file, using the following status codes:
179 .Bl -column YXZ description
180 .It U Ta file was updated and contained no local changes
181 .It G Ta file was updated and local changes were merged cleanly
182 .It C Ta file was updated and conflicts occurred during merge
183 .It D Ta file was deleted
184 .It A Ta new file was added
185 .It \(a~ Ta versioned file is obstructed by a non-regular file
186 .It ! Ta a missing versioned file was restored
187 .El
188 .Pp
189 If no
190 .Ar path
191 is specified, update the entire work tree.
192 Otherwise, restrict the update operation to files at or within the
193 specified paths.
194 Each path is required to exist in the update operation's target commit.
195 Files in the work tree outside specified paths will remain unchanged and
196 will retain their previously recorded base commit.
197 Some
198 .Nm
199 commands may refuse to run while the work tree contains files from
200 multiple base commits.
201 The base commit of such a work tree can be made consistent by running
202 .Cm got update
203 across the entire work tree.
204 Specifying a
205 .Ar path
206 is incompatible with the
207 .Fl b
208 option.
209 .Pp
210 .Cm got update
211 cannot update paths with staged changes.
212 If changes have been staged with
213 .Cm got stage ,
214 these changes must first be committed with
215 .Cm got commit
216 or unstaged with
217 .Cm got unstage .
218 .Pp
219 The options for
220 .Cm got update
221 are as follows:
222 .Bl -tag -width Ds
223 .It Fl b Ar branch
224 Switch the work tree's branch reference to the specified
225 .Ar branch
226 before updating the work tree.
227 This option requires that all paths in the work tree are updated.
228 .It Fl c Ar commit
229 Update the work tree to the specified
230 .Ar commit .
231 The expected argument is a commit ID SHA1 hash or an existing reference
232 or tag name which will be resolved to a commit ID.
233 An abbreviated hash argument will be expanded to a full SHA1 hash
234 automatically, provided the abbreviation is unique.
235 If this option is not specified, the most recent commit on the work tree's
236 branch will be used.
237 .El
238 .It Cm up
239 Short alias for
240 .Cm update .
241 .It Cm status Op Ar path ...
242 Show the current modification status of files in a work tree,
243 using the following status codes:
244 .Bl -column YXZ description
245 .It M Ta modified file
246 .It A Ta file scheduled for addition in next commit
247 .It D Ta file scheduled for deletion in next commit
248 .It C Ta modified or added file which contains merge conflicts
249 .It ! Ta versioned file was expected on disk but is missing
250 .It \(a~ Ta versioned file is obstructed by a non-regular file
251 .It ? Ta unversioned item not tracked by
252 .Nm
253 .It N Ta non-existent
254 .Ar path
255 specified on the command line
256 .El
257 .Pp
258 If no
259 .Ar path
260 is specified, show modifications in the entire work tree.
261 Otherwise, show modifications at or within the specified paths.
262 .Pp
263 If changes have been staged with
264 .Cm got stage ,
265 staged changes are shown in the second output column, using the following
266 status codes:
267 .Bl -column YXZ description
268 .It M Ta file modification is staged
269 .It A Ta file addition is staged
270 .It D Ta file deletion is staged
271 .El
272 .Pp
273 Changes created on top of staged changes are indicated in the first column:
274 .Bl -column YXZ description
275 .It MM Ta file was modified after earlier changes have been staged
276 .It MA Ta file was modified after having been staged for addition
277 .El
278 .Pp
279 For compatibility with
280 .Xr cvs 1 ,
281 .Cm got status
282 parses
283 .Pa .cvsignore
284 files in each traversed directory and will not display unversioned files
285 which match
286 .Xr glob 7
287 ignore patterns contained in
288 .Pa .cvsignore
289 files.
290 Unlike
291 .Xr cvs 1 ,
292 .Cm got status
293 only supports a single ignore pattern per line.
294 .It Cm st
295 Short alias for
296 .Cm status .
297 .It Cm log Oo Fl c Ar commit Oc Oo Fl C Ar number Oc Oo Fl f Oc Oo Fl l Ar N Oc Oo Fl p Oc Oo Fl r Ar repository-path Oc Op Ar path
298 Display history of a repository.
299 If a
300 .Ar path
301 is specified, show only commits which modified this path.
302 .Pp
303 The options for
304 .Cm got log
305 are as follows:
306 .Bl -tag -width Ds
307 .It Fl c Ar commit
308 Start traversing history at the specified
309 .Ar commit .
310 The expected argument is a commit ID SHA1 hash or an existing reference
311 or tag name which will be resolved to a commit ID.
312 An abbreviated hash argument will be expanded to a full SHA1 hash
313 automatically, provided the abbreviation is unique.
314 If this option is not specified, default to the work tree's current branch
315 if invoked in a work tree, or to the repository's HEAD reference.
316 .It Fl C Ar number
317 Set the number of context lines shown in diffs with
318 .Fl p .
319 By default, 3 lines of context are shown.
320 .It Fl f
321 Restrict history traversal to the first parent of each commit.
322 This shows the linear history of the current branch only.
323 Merge commits which affected the current branch will be shown but
324 individual commits which originated on other branches will be omitted.
325 .It Fl l Ar N
326 Limit history traversal to a given number of commits.
327 If this option is not specified, a default limit value of zero is used,
328 which is treated as an unbounded limit.
329 The
330 .Ev GOT_LOG_DEFAULT_LIMIT
331 environment variable may be set to change this default value.
332 .It Fl p
333 Display the patch of modifications made in each commit.
334 If a
335 .Ar path
336 is specified, only show the patch of modifications at or within this path.
337 .It Fl r Ar repository-path
338 Use the repository at the specified path.
339 If not specified, assume the repository is located at or above the current
340 working directory.
341 If this directory is a
342 .Nm
343 work tree, use the repository path associated with this work tree.
344 .El
345 .It Cm diff Oo Fl C Ar number Oc Oo Fl r Ar repository-path Oc Oo Fl s Oc Op Ar object1 Ar object2 | Ar path
346 When invoked within a work tree with less than two arguments, display
347 uncommitted changes in the work tree.
348 If a
349 .Ar path
350 is specified, only show changes within this path.
351 .Pp
352 If two arguments are provided, treat each argument as a reference, a tag
353 name, or an object ID SHA1 hash, and display differences between the
354 corresponding objects.
355 Both objects must be of the same type (blobs, trees, or commits).
356 An abbreviated hash argument will be expanded to a full SHA1 hash
357 automatically, provided the abbreviation is unique.
358 .Pp
359 The options for
360 .Cm got diff
361 are as follows:
362 .Bl -tag -width Ds
363 .It Fl C Ar number
364 Set the number of context lines shown in the diff.
365 By default, 3 lines of context are shown.
366 .It Fl r Ar repository-path
367 Use the repository at the specified path.
368 If not specified, assume the repository is located at or above the current
369 working directory.
370 If this directory is a
371 .Nm
372 work tree, use the repository path associated with this work tree.
373 .It Fl s
374 Show changes staged with
375 .Cm got stage
376 instead of showing local changes.
377 This option is only valid when
378 .Cm got diff
379 is invoked in a work tree.
380 .El
381 .It Cm di
382 Short alias for
383 .Cm diff .
384 .It Cm blame Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Ar path
385 Display line-by-line history of a file at the specified path.
386 .Pp
387 The options for
388 .Cm got blame
389 are as follows:
390 .Bl -tag -width Ds
391 .It Fl c Ar commit
392 Start traversing history at the specified
393 .Ar commit .
394 The expected argument is a commit ID SHA1 hash or an existing reference
395 or tag name which will be resolved to a commit ID.
396 An abbreviated hash argument will be expanded to a full SHA1 hash
397 automatically, provided the abbreviation is unique.
398 .It Fl r Ar repository-path
399 Use the repository at the specified path.
400 If not specified, assume the repository is located at or above the current
401 working directory.
402 If this directory is a
403 .Nm
404 work tree, use the repository path associated with this work tree.
405 .El
406 .It Cm bl
407 Short alias for
408 .Cm blame .
409 .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
410 Display a listing of files and directories at the specified
411 directory path in the repository.
412 Entries shown in this listing may carry one of the following trailing
413 annotations:
414 .Bl -column YXZ description
415 .It @ Ta entry is a symbolic link
416 .It / Ta entry is a directory
417 .It * Ta entry is an executable file
418 .It $ Ta entry is a Git submodule
419 .El
420 .Pp
421 If no
422 .Ar path
423 is specified, list the repository path corresponding to the current
424 directory of the work tree, or the root directory of the repository
425 if there is no work tree.
426 .Pp
427 The options for
428 .Cm got tree
429 are as follows:
430 .Bl -tag -width Ds
431 .It Fl c Ar commit
432 List files and directories as they appear in the specified
433 .Ar commit .
434 The expected argument is a commit ID SHA1 hash or an existing reference
435 or tag name which will be resolved to a commit ID.
436 An abbreviated hash argument will be expanded to a full SHA1 hash
437 automatically, provided the abbreviation is unique.
438 .It Fl r Ar repository-path
439 Use the repository at the specified path.
440 If not specified, assume the repository is located at or above the current
441 working directory.
442 If this directory is a
443 .Nm
444 work tree, use the repository path associated with this work tree.
445 .It Fl i
446 Show object IDs of files (blob objects) and directories (tree objects).
447 .It Fl R
448 Recurse into sub-directories in the repository.
449 .El
450 .It Cm tr
451 Short alias for
452 .Cm tree .
453 .It Cm ref Oo Fl r Ar repository-path Oc Oo Fl l Oc Oo Fl d Ar name Oc Oo Fl s Oc Op Ar name Ar target
454 Manage references in a repository.
455 .Pp
456 If no options are passed, expect two arguments and attempt to create,
457 or update, the reference with the given
458 .Ar name ,
459 and make it point at the given
460 .Ar target .
461 The target may be an object ID SHA1 hash or an existing reference which
462 will be resolved to an object ID.
463 An abbreviated hash argument will be expanded to a full SHA1 hash
464 automatically, provided the abbreviation is unique.
465 .Pp
466 The options for
467 .Cm got ref
468 are as follows:
469 .Bl -tag -width Ds
470 .It Fl r Ar repository-path
471 Use the repository at the specified path.
472 If not specified, assume the repository is located at or above the current
473 working directory.
474 If this directory is a
475 .Nm
476 work tree, use the repository path associated with this work tree.
477 .It Fl l
478 List all existing references in the repository.
479 .It Fl d Ar name
480 Delete the reference with the specified name from the repository.
481 .It Fl s
482 Create a symbolic reference pointing at the specified
483 .Ar target ,
484 which must be an existing reference.
485 Care should be taken not to create loops between references when
486 this option is used.
487 .El
488 .It Cm branch Oo Fl r Ar repository-path Oc Oo Fl l Oc Oo Fl d Ar name Oc Op Ar name Op Ar commit
489 Manage branches in a repository.
490 .Pp
491 Branches are managed via references which live in the
492 .Dq refs/heads/
493 reference namespace.
494 The
495 .Cm got branch
496 command operates on references in this namespace only.
497 .Pp
498 If no options are passed, expect one or two arguments and attempt to create
499 a branch reference with the given
500 .Ar name ,
501 and make it point at the given
502 .Ar commit .
503 The expected
504 .Ar commit
505 argument is a commit ID SHA1 hash or an existing reference
506 or tag name which will be resolved to a commit ID.
507 If no
508 .Ar commit
509 is specified, default to the latest commit on the work tree's current
510 branch if invoked in a work tree, or to a commit resolved via the
511 repository's HEAD reference.
512 .Pp
513 The options for
514 .Cm got branch
515 are as follows:
516 .Bl -tag -width Ds
517 .It Fl r Ar repository-path
518 Use the repository at the specified path.
519 If not specified, assume the repository is located at or above the current
520 working directory.
521 If this directory is a
522 .Nm
523 work tree, use the repository path associated with this work tree.
524 .It Fl l
525 List all existing branches in the repository.
526 If invoked in a work tree, the work tree's current branch is shown
527 with one the following annotations:
528 .Bl -column YXZ description
529 .It * Ta work tree's base commit matches the branch tip
530 .It \(a~ Ta work tree's base commit is out-of-date
531 .El
532 .It Fl d Ar name
533 Delete the branch with the specified name from the repository.
534 Only the branch reference is deleted.
535 Any commit, tree, and blob objects belonging to the branch
536 remain in the repository and may be removed separately with
537 Git's garbage collector.
538 .El
539 .It Cm br
540 Short alias for
541 .Cm branch .
542 .It Cm tag Oo Fl m Ar message Oc Oo Fl r Ar repository-path Oc Oo Fl l Oc Ar name Op Ar commit Oc
543 Manage tags in a repository.
544 .Pp
545 Tags are managed via references which live in the
546 .Dq refs/tags/
547 reference namespace.
548 The
549 .Cm got tag
550 command operates on references in this namespace only.
551 References in this namespace point at tag objects which contain a pointer
552 to another object, a tag message, as well as author and timestamp information.
553 .Pp
554 Expect one or two arguments and attempt to create a tag with the given
555 .Ar name ,
556 and make this tag point at the given
557 .Ar commit .
558 If no commit is specified, default to the latest commit on the work tree's
559 current branch if invoked in a work tree, and to a commit resolved via
560 the repository's HEAD reference otherwise.
561 Otherwise, the expected argument is a commit ID SHA1 hash or an existing
562 reference or tag name which will be resolved to a commit ID.
563 An abbreviated hash argument will be expanded to a full SHA1 hash
564 automatically, provided the abbreviation is unique.
565 .Pp
566 The options for
567 .Cm got tag
568 are as follows:
569 .Bl -tag -width Ds
570 .It Fl m Ar message
571 Use the specified tag message when creating the new tag
572 Without the
573 .Fl m
574 option,
575 .Cm got import
576 opens a temporary file in an editor where a tag message can be written.
577 .It Fl r Ar repository-path
578 Use the repository at the specified path.
579 If not specified, assume the repository is located at or above the current
580 working directory.
581 If this directory is a
582 .Nm
583 work tree, use the repository path associated with this work tree.
584 .It Fl l
585 List all existing tags in the repository instead of creating a new tag.
586 If this option is used, no other command-line arguments are allowed.
587 .El
588 .Pp
589 By design, the
590 .Cm got tag
591 command will not delete tags or change existing tags.
592 If a tag must be deleted, the
593 .Cm got ref
594 command may be used to delete a tag's reference.
595 This should only be done if the tag has not already been copied to
596 another repository.
597 .It Cm add Ar file-path ...
598 Schedule unversioned files in a work tree for addition to the
599 repository in the next commit.
600 .It Cm remove Ar file-path ...
601 Remove versioned files from a work tree and schedule them for deletion
602 from the repository in the next commit.
603 .Pp
604 The options for
605 .Cm got remove
606 are as follows:
607 .Bl -tag -width Ds
608 .It Fl f
609 Perform the operation even if a file contains uncommitted modifications.
610 .El
611 .It Cm rm
612 Short alias for
613 .Cm remove .
614 .It Cm revert Oo Fl p Oc Oo Fl F Ar response-script Oc Oo Fl R Oc Ar path ...
615 Revert any uncommitted changes in files at the specified paths.
616 File contents will be overwritten with those contained in the
617 work tree's base commit.
618 There is no way to bring discarded changes back after
619 .Cm got revert !
620 .Pp
621 If a file was added with
622 .Cm got add
623 it will become an unversioned file again.
624 If a file was deleted with
625 .Cm got remove
626 it will be restored.
627 .Pp
628 The options for
629 .Cm got revert
630 are as follows:
631 .Bl -tag -width Ds
632 .It Fl p
633 Instead of reverting all changes in files, interactively select or reject
634 changes to revert based on
635 .Dq y
636 (revert change),
637 .Dq n
638 (keep change), and
639 .Dq q
640 (quit reverting this file) responses.
641 If a file is in modified status, individual patches derived from the
642 modified file content can be reverted.
643 Files in added or deleted status may only be reverted in their entirety.
644 .It Fl F Ar response-script
645 With the
646 .Fl p
647 option, read
648 .Dq y ,
649 .Dq n ,
650 and
651 .Dq q
652 responses line-by-line from the specified
653 .Ar response-script
654 file instead of prompting interactively.
655 .It Fl R
656 Permit recursion into directories.
657 If this option is not specified,
658 .Cm got revert
659 will refuse to run if a specified
660 .Ar path
661 is a directory.
662 .El
663 .It Cm rv
664 Short alias for
665 .Cm revert .
666 .It Cm commit Oo Fl m Ar message Oc Op Ar path ...
667 Create a new commit in the repository from changes in a work tree
668 and use this commit as the new base commit for the work tree.
669 If no
670 .Ar path
671 is specified, commit all changes in the work tree.
672 Otherwise, commit changes at or within the specified paths.
673 .Pp
674 If changes have been explicitly staged for commit with
675 .Cm got stage ,
676 only commit staged changes and reject any specified paths which
677 have not been staged.
678 .Pp
679 Show the status of each affected file, using the following status codes:
680 .Bl -column YXZ description
681 .It M Ta modified file
682 .It D Ta file was deleted
683 .It A Ta new file was added
684 .El
685 .Pp
686 Files which are not part of the new commit will retain their previously
687 recorded base commit.
688 Some
689 .Nm
690 commands may refuse to run while the work tree contains files from
691 multiple base commits.
692 The base commit of such a work tree can be made consistent by running
693 .Cm got update
694 across the entire work tree.
695 .Pp
696 The
697 .Cm got commit
698 command requires the
699 .Ev GOT_AUTHOR
700 environment variable to be set,
701 unless Git's
702 .Dv user.name
703 and
704 .Dv user.email configuration settings can be
705 obtained from the repository's
706 .Pa .git/config
707 file.
708 .Pp
709 The options for
710 .Cm got commit
711 are as follows:
712 .Bl -tag -width Ds
713 .It Fl m Ar message
714 Use the specified log message when creating the new commit.
715 Without the
716 .Fl m
717 option,
718 .Cm got commit
719 opens a temporary file in an editor where a log message can be written.
720 .El
721 .Pp
722 .Cm got commit
723 will refuse to run if certain preconditions are not met.
724 If the work tree's current branch is not in the
725 .Dq refs/heads/
726 reference namespace, new commits may not be created on this branch.
727 Local changes may only be committed if they are based on file content
728 found in the most recent commit on the work tree's branch.
729 If a path is found to be out of date,
730 .Cm got update
731 must be used first in order to merge local changes with changes made
732 in the repository.
733 .It Cm ci
734 Short alias for
735 .Cm commit .
736 .It Cm cherrypick Ar commit
737 Merge changes from a single
738 .Ar commit
739 into the work tree.
740 The specified
741 .Ar commit
742 must be on a different branch than the work tree's base commit.
743 The expected argument is a reference or a commit ID SHA1 hash.
744 An abbreviated hash argument will be expanded to a full SHA1 hash
745 automatically, provided the abbreviation is unique.
746 .Pp
747 Show the status of each affected file, using the following status codes:
748 .Bl -column YXZ description
749 .It G Ta file was merged
750 .It C Ta file was merged and conflicts occurred during merge
751 .It ! Ta changes destined for a missing file were not merged
752 .It D Ta file was deleted
753 .It d Ta file's deletion was obstructed by local modifications
754 .It A Ta new file was added
755 .It \(a~ Ta changes destined for a non-regular file were not merged
756 .El
757 .Pp
758 The merged changes will appear as local changes in the work tree, which
759 may be viewed with
760 .Cm got diff ,
761 amended manually or with further
762 .Cm got cherrypick
763 commands,
764 committed with
765 .Cm got commit ,
766 or discarded again with
767 .Cm got revert .
768 .Pp
769 .Cm got cherrypick
770 will refuse to run if certain preconditions are not met.
771 If the work tree contains multiple base commits it must first be updated
772 to a single base commit with
773 .Cm got update .
774 If the work tree already contains files with merge conflicts, these
775 conflicts must be resolved first.
776 .It Cm cy
777 Short alias for
778 .Cm cherrypick .
779 .It Cm backout Ar commit
780 Reverse-merge changes from a single
781 .Ar commit
782 into the work tree.
783 The specified
784 .Ar commit
785 must be on the same branch as the work tree's base commit.
786 The expected argument is a reference or a commit ID SHA1 hash.
787 An abbreviated hash argument will be expanded to a full SHA1 hash
788 automatically, provided the abbreviation is unique.
789 .Pp
790 Show the status of each affected file, using the following status codes:
791 .Bl -column YXZ description
792 .It G Ta file was merged
793 .It C Ta file was merged and conflicts occurred during merge
794 .It ! Ta changes destined for a missing file were not merged
795 .It D Ta file was deleted
796 .It d Ta file's deletion was obstructed by local modifications
797 .It A Ta new file was added
798 .It \(a~ Ta changes destined for a non-regular file were not merged
799 .El
800 .Pp
801 The reverse-merged changes will appear as local changes in the work tree,
802 which may be viewed with
803 .Cm got diff ,
804 amended manually or with further
805 .Cm got backout
806 commands,
807 committed with
808 .Cm got commit ,
809 or discarded again with
810 .Cm got revert .
811 .Pp
812 .Cm got backout
813 will refuse to run if certain preconditions are not met.
814 If the work tree contains multiple base commits it must first be updated
815 to a single base commit with
816 .Cm got update .
817 If the work tree already contains files with merge conflicts, these
818 conflicts must be resolved first.
819 .It Cm bo
820 Short alias for
821 .Cm backout .
822 .It Cm rebase Oo Fl a Oc Oo Fl c Oc Op Ar branch
823 Rebase commits on the specified
824 .Ar branch
825 onto the tip of the current branch of the work tree.
826 The
827 .Ar branch
828 must share common ancestry with the work tree's current branch.
829 Rebasing begins with the first descendant commit of the youngest
830 common ancestor commit shared by the specified
831 .Ar branch
832 and the work tree's current branch, and stops once the tip commit
833 of the specified
834 .Ar branch
835 has been rebased.
836 .Pp
837 Rebased commits are accumulated on a temporary branch which the work tree
838 will remain switched to throughout the entire rebase operation.
839 Commits on this branch represent the same changes with the same log
840 messages as their counterparts on the original
841 .Ar branch ,
842 but with different commit IDs.
843 Once rebasing has completed successfully, the temporary branch becomes
844 the new version of the specified
845 .Ar branch
846 and the work tree is automatically switched to it.
847 .Pp
848 While rebasing commits, show the status of each affected file,
849 using the following status codes:
850 .Bl -column YXZ description
851 .It G Ta file was merged
852 .It C Ta file was merged and conflicts occurred during merge
853 .It ! Ta changes destined for a missing file were not merged
854 .It D Ta file was deleted
855 .It d Ta file's deletion was obstructed by local modifications
856 .It A Ta new file was added
857 .It \(a~ Ta changes destined for a non-regular file were not merged
858 .El
859 .Pp
860 If merge conflicts occur the rebase operation is interrupted and may
861 be continued once conflicts have been resolved.
862 Alternatively, the rebase operation may be aborted which will leave
863 .Ar branch
864 unmodified and the work tree switched back to its original branch.
865 .Pp
866 If a merge conflict is resolved in a way which renders the merged
867 change into a no-op change, the corresponding commit will be elided
868 when the rebase operation continues.
869 .Pp
870 .Cm got rebase
871 will refuse to run if certain preconditions are not met.
872 If the work tree contains multiple base commits it must first be updated
873 to a single base commit with
874 .Cm got update .
875 If changes have been staged with
876 .Cm got stage ,
877 these changes must first be committed with
878 .Cm got commit
879 or unstaged with
880 .Cm got unstage .
881 If the work tree contains local changes, these changes must first be
882 committed with
883 .Cm got commit
884 or reverted with
885 .Cm got revert .
886 If the
887 .Ar branch
888 contains changes to files outside of the work tree's path prefix,
889 the work tree cannot be used to rebase this branch.
890 .Pp
891 The
892 .Cm got update
893 and
894 .Cm got commit
895 commands will refuse to run while a rebase operation is in progress.
896 Other commands which manipulate the work tree may be used for
897 conflict resolution purposes.
898 .Pp
899 The options for
900 .Cm got rebase
901 are as follows:
902 .Bl -tag -width Ds
903 .It Fl a
904 Abort an interrupted rebase operation.
905 If this option is used, no other command-line arguments are allowed.
906 .It Fl c
907 Continue an interrupted rebase operation.
908 If this option is used, no other command-line arguments are allowed.
909 .El
910 .It Cm rb
911 Short alias for
912 .Cm rebase .
913 .It Cm histedit Oo Fl a Oc Oo Fl c Oc Op Fl F Ar histedit-script
914 Edit commit history between the work tree's current base commit and
915 the tip commit of the work tree's current branch.
916 .Pp
917 Editing of commit history is controlled via a
918 .Ar histedit script
919 which can be edited interactively or passed on the command line.
920 The format of the histedit script is line-based.
921 Each line in the script begins with a command name, followed by
922 whitespace and an argument.
923 For most commands, the expected argument is a commit ID SHA1 hash.
924 Any remaining text on the line is ignored.
925 Lines which begin with the
926 .Sq #
927 character are ignored entirely.
928 .Pp
929 The available commands are as follows:
930 .Bl -column YXZ pick-commit
931 .It pick Ar commit Ta Use the specified commit as it is.
932 .It edit Ar commit Ta Use the specified commit but once changes have been
933 merged into the work tree interrupt the histedit operation for amending.
934 .It fold Ar commit Ta Combine the specified commit with the next commit
935 listed further below that will be used.
936 .It drop Ar commit Ta Remove this commit from the edited history.
937 .It mesg Ar log-message Ta Use the specified single-line log message for
938 the commit on the previous line.
939 If the log message argument is left empty, open an editor where a new
940 log message can be written.
941 .El
942 .Pp
943 Every commit in the history being edited must be mentioned in the script.
944 Lines may be re-ordered to change the order of commits in the edited history.
945 .Pp
946 Edited commits are accumulated on a temporary branch which the work tree
947 will remain switched to throughout the entire histedit operation.
948 Once history editing has completed successfully, the temporary branch becomes
949 the new version of the work tree's branch and the work tree is automatically
950 switched to it.
951 .Pp
952 While merging commits, show the status of each affected file,
953 using the following status codes:
954 .Bl -column YXZ description
955 .It G Ta file was merged
956 .It C Ta file was merged and conflicts occurred during merge
957 .It ! Ta changes destined for a missing file were not merged
958 .It D Ta file was deleted
959 .It d Ta file's deletion was obstructed by local modifications
960 .It A Ta new file was added
961 .It \(a~ Ta changes destined for a non-regular file were not merged
962 .El
963 .Pp
964 If merge conflicts occur the histedit operation is interrupted and may
965 be continued once conflicts have been resolved.
966 Alternatively, the histedit operation may be aborted which will leave
967 the work tree switched back to its original branch.
968 .Pp
969 If a merge conflict is resolved in a way which renders the merged
970 change into a no-op change, the corresponding commit will be elided
971 when the histedit operation continues.
972 .Pp
973 .Cm got histedit
974 will refuse to run if certain preconditions are not met.
975 If the work tree's current branch is not in the
976 .Dq refs/heads/
977 reference namespace, the history of the branch may not be edited.
978 If the work tree contains multiple base commits it must first be updated
979 to a single base commit with
980 .Cm got update .
981 If changes have been staged with
982 .Cm got stage ,
983 these changes must first be committed with
984 .Cm got commit
985 or unstaged with
986 .Cm got unstage .
987 If the work tree contains local changes, these changes must first be
988 committed with
989 .Cm got commit
990 or reverted with
991 .Cm got revert .
992 If the edited history contains changes to files outside of the work tree's
993 path prefix, the work tree cannot be used to edit the history of this branch.
994 .Pp
995 The
996 .Cm got update
997 command will refuse to run while a histedit operation is in progress.
998 Other commands which manipulate the work tree may be used, and the
999 .Cm got commit
1000 command may be used to commit arbitrary changes to the temporary branch
1001 while the histedit operation is interrupted.
1002 .Pp
1003 The options for
1004 .Cm got histedit
1005 are as follows:
1006 .Bl -tag -width Ds
1007 .It Fl a
1008 Abort an interrupted histedit operation.
1009 If this option is used, no other command-line arguments are allowed.
1010 .It Fl c
1011 Continue an interrupted histedit operation.
1012 If this option is used, no other command-line arguments are allowed.
1013 .El
1014 .It Cm he
1015 Short alias for
1016 .Cm histedit .
1017 .It Cm stage Oo Fl l Oc Oo Fl p Oc Oo Fl F Ar response-script Oc Op Ar path ...
1018 Stage local changes for inclusion in the next commit.
1019 If no
1020 .Ar path
1021 is specified, stage all changes in the work tree.
1022 Otherwise, stage changes at or within the specified paths.
1023 Paths may be staged if they are added, modified, or deleted according to
1024 .Cm got status .
1025 .Pp
1026 Show the status of each affected file, using the following status codes:
1027 .Bl -column YXZ description
1028 .It A Ta file addition has been staged
1029 .It M Ta file modification has been staged
1030 .It D Ta file deletion has been staged
1031 .El
1032 .Pp
1033 Staged file contents are saved in newly created blob objects in the repository.
1034 These blobs will be referred to by tree objects once staged changes have been
1035 committed.
1036 .Pp
1037 Staged changes affect the behaviour of
1038 .Cm got commit ,
1039 .Cm got status ,
1040 and
1041 .Cm got diff .
1042 While paths with staged changes exist, the
1043 .Cm got commit
1044 command will refuse to commit any paths which do not have staged changes.
1045 Local changes created on top of staged changes can only be committed if
1046 the path is staged again, or if the staged changes are committed first.
1047 The
1048 .Cm got status
1049 command will show both local changes and staged changes.
1050 The
1051 .Cm got diff
1052 command is able to display local changes relative to staged changes,
1053 and to display staged changes relative to the repository.
1054 The
1055 .Cm got revert
1056 command cannot revert staged changes but may be used to revert
1057 local changes created on top of staged changes.
1058 .Pp
1059 The options for
1060 .Cm got stage
1061 are as follows:
1062 .Bl -tag -width Ds
1063 .It Fl l
1064 Instead of staging new changes, list paths which are already staged,
1065 along with the IDs of staged blob objects and stage status codes.
1066 If paths were provided in the command line show the staged paths
1067 among the specified paths.
1068 Otherwise, show all staged paths.
1069 .It Fl p
1070 Instead of staging the entire content of a changed file, interactively
1071 select or reject changes for staging based on
1072 .Dq y
1073 (stage change),
1074 .Dq n
1075 (reject change), and
1076 .Dq q
1077 (quit staging this file) responses.
1078 If a file is in modified status, individual patches derived from the
1079 modified file content can be staged.
1080 Files in added or deleted status may only be staged or rejected in
1081 their entirety.
1082 .It Fl F Ar response-script
1083 With the
1084 .Fl p
1085 option, read
1086 .Dq y ,
1087 .Dq n ,
1088 and
1089 .Dq q
1090 responses line-by-line from the specified
1091 .Ar response-script
1092 file instead of prompting interactively.
1093 .El
1094 .Pp
1095 .Cm got stage
1096 will refuse to run if certain preconditions are not met.
1097 If a file contains merge conflicts, these conflicts must be resolved first.
1098 If a file is found to be out of date relative to the head commit on the
1099 work tree's current branch, the file must be updated with
1100 .Cm got update
1101 before it can be staged (however, this does not prevent the file from
1102 becoming out-of-date at some point after having been staged).
1103 .Pp
1104 The
1105 .Cm got update ,
1106 .Cm got rebase ,
1107 and
1108 .Cm got histedit
1109 commands will refuse to run while staged changes exist.
1110 If staged changes cannot be committed because a staged path
1111 is out of date, the path must be unstaged with
1112 .Cm got unstage
1113 before it can be updated with
1114 .Cm got update ,
1115 and may then be staged again if necessary.
1116 .It Cm sg
1117 Short alias for
1118 .Cm stage .
1119 .It Cm unstage Oo Fl p Oc Oo Fl F Ar response-script Oc Op Ar path ...
1120 Merge staged changes back into the work tree and put affected paths
1121 back into non-staged status.
1122 If no
1123 .Ar path
1124 is specified, unstage all staged changes across the entire work tree.
1125 Otherwise, unstage changes at or within the specified paths.
1126 .Pp
1127 Show the status of each affected file, using the following status codes:
1128 .Bl -column YXZ description
1129 .It G Ta file was unstaged
1130 .It C Ta file was unstaged and conflicts occurred during merge
1131 .It ! Ta changes destined for a missing file were not merged
1132 .It D Ta file was staged as deleted and still is deleted
1133 .It d Ta file's deletion was obstructed by local modifications
1134 .It \(a~ Ta changes destined for a non-regular file were not merged
1135 .El
1136 .Pp
1137 The options for
1138 .Cm got unstage
1139 are as follows:
1140 .Bl -tag -width Ds
1141 .It Fl p
1142 Instead of unstaging the entire content of a changed file, interactively
1143 select or reject changes for unstaging based on
1144 .Dq y
1145 (unstage change),
1146 .Dq n
1147 (keep change staged), and
1148 .Dq q
1149 (quit unstaging this file) responses.
1150 If a file is staged in modified status, individual patches derived from the
1151 staged file content can be unstaged.
1152 Files staged in added or deleted status may only be unstaged in their entirety.
1153 .It Fl F Ar response-script
1154 With the
1155 .Fl p
1156 option, read
1157 .Dq y ,
1158 .Dq n ,
1159 and
1160 .Dq q
1161 responses line-by-line from the specified
1162 .Ar response-script
1163 file instead of prompting interactively.
1164 .El
1165 .It Cm ug
1166 Short alias for
1167 .Cm unstage .
1168 .It Cm cat Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Oo Fl P Oc Ar arg ...
1169 Parse and print contents of objects to standard output in a line-based
1170 text format.
1171 Content of commit, tree, and tag objects is printed in a way similar
1172 to the actual content stored in such objects.
1173 Blob object contents are printed as they would appear in files on disk.
1174 .Pp
1175 Attempt to interpret each argument as a reference, a tag name, or
1176 an object ID SHA1 hash.
1177 References will be resolved to an object ID.
1178 Tag names will resolved to a tag object.
1179 An abbreviated hash argument will be expanded to a full SHA1 hash
1180 automatically, provided the abbreviation is unique.
1181 .Pp
1182 If none of the above interpretations produce a valid result, or if the
1183 .Fl P
1184 option is used, attempt to interpret the argument as a path which will
1185 be resolved to the ID of an object found at this path in the repository.
1186 .Pp
1187 The options for
1188 .Cm got cat
1189 are as follows:
1190 .Bl -tag -width Ds
1191 .It Fl c Ar commit
1192 Look up paths in the specified
1193 .Ar commit .
1194 If this option is not used, paths are looked up in the commit resolved
1195 via the repository's HEAD reference.
1196 The expected argument is a commit ID SHA1 hash or an existing reference
1197 or tag name which will be resolved to a commit ID.
1198 An abbreviated hash argument will be expanded to a full SHA1 hash
1199 automatically, provided the abbreviation is unique.
1200 .It Fl r Ar repository-path
1201 Use the repository at the specified path.
1202 If not specified, assume the repository is located at or above the current
1203 working directory.
1204 If this directory is a
1205 .Nm
1206 work tree, use the repository path associated with this work tree.
1207 .It Fl P
1208 Interpret all arguments as paths only.
1209 This option can be used to resolve ambiguity in cases where paths
1210 look like tag names, reference names, or object IDs.
1211 .El
1212 .El
1213 .Sh ENVIRONMENT
1214 .Bl -tag -width GOT_AUTHOR
1215 .It Ev GOT_AUTHOR
1216 The author's name and email address for
1217 .Cm got commit
1218 and
1219 .Cm got import ,
1220 for example:
1221 .Dq An Flan Hacker Aq Mt flan_hacker@openbsd.org .
1222 Because
1223 .Xr git 1
1224 may fail to parse commits without an email address in author data,
1225 .Nm
1226 attempts to reject
1227 .Ev GOT_AUTHOR
1228 environment variables with a missing email address.
1229 Git's
1230 .Dv user.name
1231 and
1232 .Dv user.email configuration settings in the repository's
1233 .Pa .git/config
1234 file will override the value of
1235 .Ev GOT_AUTHOR .
1236 .It Ev VISUAL , EDITOR
1237 The editor spawned by
1238 .Cm got commit ,
1239 .Cm got import ,
1241 .Cm got tag .
1242 .It Ev GOT_LOG_DEFAULT_LIMIT
1243 The default limit on the number of commits traversed by
1244 .Cm got log .
1245 If set to zero, the limit is unbounded.
1246 This variable will be silently ignored if it is set to a non-numeric value.
1247 .El
1248 .Sh EXIT STATUS
1249 .Ex -std got
1250 .Sh EXAMPLES
1251 Clone an existing Git repository for use with
1252 .Nm .
1253 This step currently requires
1254 .Xr git 1 :
1255 .Pp
1256 .Dl $ cd /var/git/
1257 .Dl $ git clone --bare https://github.com/openbsd/src.git
1258 .Pp
1259 Alternatively, for quick and dirty local testing of
1260 .Nm
1261 a new Git repository could be created and populated with files,
1262 e.g. from a temporary CVS checkout located at
1263 .Pa /tmp/src :
1264 .Pp
1265 .Dl $ got init /var/git/src.git
1266 .Dl $ got import -r /var/git/src.git -I CVS -I obj /tmp/src
1267 .Pp
1268 Check out a work tree from the Git repository to /usr/src:
1269 .Pp
1270 .Dl $ got checkout /var/git/src.git /usr/src
1271 .Pp
1272 View local changes in a work tree directory:
1273 .Pp
1274 .Dl $ got status
1275 .Dl $ got diff | less
1276 .Pp
1277 Interactively revert selected local changes in a work tree directory:
1278 .Pp
1279 .Dl $ got revert -p -R\ .
1280 .Pp
1281 In a work tree or a git repository directory, list all branch references:
1282 .Pp
1283 .Dl $ got branch -l
1284 .Pp
1285 In a work tree or a git repository directory, create a new branch called
1286 .Dq unified-buffer-cache
1287 which is forked off the
1288 .Dq master
1289 branch:
1290 .Pp
1291 .Dl $ got branch unified-buffer-cache master
1292 .Pp
1293 Switch an existing work tree to the branch
1294 .Dq unified-buffer-cache .
1295 Local changes in the work tree will be preserved and merged if necessary:
1296 .Pp
1297 .Dl $ got update -b unified-buffer-cache
1298 .Pp
1299 Create a new commit from local changes in a work tree directory.
1300 This new commit will become the head commit of the work tree's current branch:
1301 .Pp
1302 .Dl $ got commit
1303 .Pp
1304 In a work tree or a git repository directory, view changes committed in
1305 the 3 most recent commits to the work tree's branch, or the branch resolved
1306 via the repository's HEAD reference, respectively:
1307 .Pp
1308 .Dl $ got log -p -l 3 -f
1309 .Pp
1310 Add new files and remove obsolete files in a work tree directory:
1311 .Pp
1312 .Dl $ got add sys/uvm/uvm_ubc.c
1313 .Dl $ got remove sys/uvm/uvm_vnode.c
1314 .Pp
1315 Create a new commit from local changes in a work tree directory
1316 with a pre-defined log message.
1317 .Pp
1318 .Dl $ got commit -m 'unify the buffer cache'
1319 .Pp
1320 Update any work tree checked out from the
1321 .Dq unified-buffer-cache
1322 branch to the latest commit on this branch:
1323 .Pp
1324 .Dl $ got update
1325 .Pp
1326 Roll file content on the unified-buffer-cache branch back by one commit,
1327 and then fetch the rolled-back change into the work tree as a local change
1328 to be amended and perhaps committed again:
1329 .Pp
1330 .Dl $ got backout unified-buffer-cache
1331 .Dl $ got commit -m 'roll back previous'
1332 .Dl $ # now back out the previous backout :-)
1333 .Dl $ got backout unified-buffer-cache
1334 .Pp
1335 Fetch new upstream commits into the local repository's master branch.
1336 This step currently requires
1337 .Xr git 1 :
1338 .Pp
1339 .Dl $ cd /var/git/src.git
1340 .Dl $ git fetch origin master:master
1341 .Pp
1342 Rebase the
1343 .Dq unified-buffer-cache
1344 branch on top of the new head commit of the
1345 .Dq master
1346 branch.
1347 .Pp
1348 .Dl $ got update -b master
1349 .Dl $ got rebase unified-buffer-cache
1350 .Pp
1351 Create a patch from all changes on the unified-buffer-cache branch.
1352 The patch can be mailed out for review and applied to
1353 .Ox Ns 's
1354 CVS tree:
1355 .Pp
1356 .Dl $ got diff master unified-buffer-cache > /tmp/ubc.diff
1357 .Pp
1358 Edit the entire commit history of the
1359 .Dq unified-buffer-cache
1360 branch:
1361 .Pp
1362 .Dl $ got update -b unified-buffer-cache
1363 .Dl $ got update -c master
1364 .Dl $ got histedit
1365 .Pp
1366 Additional steps are necessary if local changes need to be pushed back
1367 to the remote repository, which currently requires
1368 .Cm git fetch
1369 and
1370 .Cm git push .
1371 Before working against existing branches in a repository cloned with
1372 .Dq git clone --bare ,
1373 a Git
1374 .Dq refspec
1375 must be configured to map all references in the remote repository
1376 into the
1377 .Dq refs/remotes
1378 namespace of the local repository.
1379 This can achieved by setting Git's
1380 .Pa remote.origin.fetch
1381 configuration variable to the value
1382 .Dq +refs/heads/*:refs/remotes/origin/*
1383 with the
1384 .Cm git config
1385 command:
1386 .Pp
1387 .Dl $ cd /var/git/repo
1388 .Dl $ git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
1389 .Pp
1390 Alternatively, the following
1391 .Pa fetch
1392 configuration item can be added manually to the Git repository's
1393 .Pa config
1394 file:
1395 .Pp
1396 .Dl [remote "origin"]
1397 .Dl url = ...
1398 .Dl fetch = +refs/heads/*:refs/remotes/origin/*
1399 .Pp
1400 This configuration leaves the local repository's
1401 .Dq refs/heads
1402 namespace free for use by local branches checked out with
1403 .Cm got checkout
1404 and, if needed, created with
1405 .Cm got branch .
1406 .Pp
1407 Branches in the
1408 .Dq remotes/origin
1409 namespace can be updated with incoming changes from the remote
1410 repository with
1411 .Cm git fetch :
1412 .Pp
1413 .Dl $ cd /var/git/repo
1414 .Dl $ git fetch
1415 .Pp
1416 Before outgoing changes on the local
1417 .Dq master
1418 branch can be pushed to the remote repository, the local
1419 .Dq master
1420 branch must be rebased onto the
1421 .Dq origin/master
1422 branch:
1423 .Pp
1424 .Dl $ got update -b origin/master
1425 .Dl $ got rebase master
1426 .Pp
1427 Changes on the local
1428 .Dq master
1429 branch can then be pushed to the remote
1430 repository with
1431 .Cm git push :
1432 .Pp
1433 .Dl $ cd /var/git/repo
1434 .Dl $ git push origin master
1435 .Sh SEE ALSO
1436 .Xr tog 1 ,
1437 .Xr git-repository 5 ,
1438 .Xr got-worktree 5
1439 .Sh AUTHORS
1440 .An Stefan Sperling Aq Mt stsp@openbsd.org
1441 .An Martin Pieuchot Aq Mt mpi@openbsd.org
1442 .An Joshua Stein Aq Mt jcs@openbsd.org
1443 .Sh CAVEATS
1444 .Nm
1445 is a work-in-progress and many commands remain to be implemented.
1446 At present, the user has to fall back on
1447 .Xr git 1
1448 to perform many tasks, in particular tasks related to repository
1449 administration and tasks which require a network connection.