2 5c860e29 2018-03-12 stsp .\" Copyright (c) 2017 Martin Pieuchot
4 5c860e29 2018-03-12 stsp .\" Permission to use, copy, modify, and distribute this software for any
5 5c860e29 2018-03-12 stsp .\" purpose with or without fee is hereby granted, provided that the above
6 5c860e29 2018-03-12 stsp .\" copyright notice and this permission notice appear in all copies.
8 5c860e29 2018-03-12 stsp .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 5c860e29 2018-03-12 stsp .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 5c860e29 2018-03-12 stsp .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 5c860e29 2018-03-12 stsp .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 5c860e29 2018-03-12 stsp .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 5c860e29 2018-03-12 stsp .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 5c860e29 2018-03-12 stsp .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 5c860e29 2018-03-12 stsp .Dd $Mdocdate$
21 97925469 2018-03-17 stsp .Nd version control system
22 5c860e29 2018-03-12 stsp .Sh SYNOPSIS
26 5c860e29 2018-03-12 stsp .Op Ar arg ...
27 5c860e29 2018-03-12 stsp .Sh DESCRIPTION
29 97925469 2018-03-17 stsp is a version control system which prioritizes ease of use and simplicity
30 97925469 2018-03-17 stsp over flexibility.
33 97925469 2018-03-17 stsp stores the history of tracked files in a repository which happens to use
34 97925469 2018-03-17 stsp the same on-disk format as
36 97925469 2018-03-17 stsp repositories used by the popular Git version control system.
37 285dc8a4 2018-03-13 stsp This repository format is described in
38 285dc8a4 2018-03-13 stsp .Xr got-repository 5 .
42 97925469 2018-03-17 stsp .Em distributed
43 4129c201 2018-03-13 stsp version control system because every copy of a repository is writeable.
44 4129c201 2018-03-13 stsp Modifications made to files can be synchronized between repositories
45 97925469 2018-03-17 stsp at any time.
47 285dc8a4 2018-03-13 stsp Files managed by
49 4129c201 2018-03-13 stsp must be checked out from the repository for modification.
50 285dc8a4 2018-03-13 stsp Checked out files are stored in a
51 285dc8a4 2018-03-13 stsp .Em work tree
52 c5867b47 2018-03-13 stsp which can be placed at an arbitrary directory in the filesystem hierarchy.
53 97925469 2018-03-17 stsp The on-disk format of a
55 285dc8a4 2018-03-13 stsp work tree is described in
56 285dc8a4 2018-03-13 stsp .Xr got-worktree 5 .
59 285dc8a4 2018-03-13 stsp provides global and command-specific options.
60 285dc8a4 2018-03-13 stsp Global options must preceed the command name, and are as follows:
61 1b6b95a8 2018-03-12 stsp .Bl -tag -width tenletters
63 1b6b95a8 2018-03-12 stsp Display usage information.
66 5c860e29 2018-03-12 stsp The commands are as follows:
67 0bb8a95e 2018-03-12 stsp .Bl -tag -width checkout
68 5d7c1dab 2018-04-01 stsp .It Cm checkout [ Fl p Ar path-prefix ] repository-path [ work-tree-path ]
69 0bb8a95e 2018-03-12 stsp Copy files from a repository into a new work tree.
70 67d6b2d2 2018-03-13 stsp The work tree may be restricted to a subset of the repository's tree
71 67d6b2d2 2018-03-13 stsp hierarchy by specifying the
72 5d7c1dab 2018-04-01 stsp .Fl p Ar path-prefix
74 5d7c1dab 2018-04-01 stsp In this case, only files beneath the specified prefix will
75 67d6b2d2 2018-03-13 stsp be checked out.
77 5d7c1dab 2018-04-01 stsp .Ar work tree path
78 5d7c1dab 2018-04-01 stsp is not specified, either use the base name of the
79 5d7c1dab 2018-04-01 stsp .Ar repository path ,
81 5d7c1dab 2018-04-01 stsp .Ar path prefix
82 5d7c1dab 2018-04-01 stsp was specified use the base name of the
83 5d7c1dab 2018-04-01 stsp .Ar path prefix .
84 0bb8a95e 2018-03-12 stsp .\".It Cm status
85 0bb8a95e 2018-03-12 stsp .\"Show current status of files.
86 64a96a6d 2018-04-01 stsp .It Cm log [ Fl p ] [ Fl c Ar commit ] [ Fl l Ar N ] [ Ar repository-path ]
87 5c860e29 2018-03-12 stsp Display history of the repository.
90 64a96a6d 2018-04-01 stsp option is given, display the patch of modifications made in each commit.
93 d142fc45 2018-04-01 stsp is specified with the
95 d142fc45 2018-04-01 stsp option, start traversing history at this commit.
98 64a96a6d 2018-04-01 stsp option limits the output to a number of
102 d142fc45 2018-04-01 stsp .Ar repository path
103 d142fc45 2018-04-01 stsp is omitted, use the current working directory.
104 3f8b7d6a 2018-04-01 stsp .It Cm diff [ Ar repository-path ] Ar object1 Ar object2
105 3f8b7d6a 2018-04-01 stsp Display the differences between two objects in the repository.
106 3f8b7d6a 2018-04-01 stsp Both objects must be of the same type (blobs, trees, or commits).
108 3f8b7d6a 2018-04-01 stsp .Ar repository path
109 3f8b7d6a 2018-04-01 stsp is omitted, use the current working directory.
111 5c860e29 2018-03-12 stsp .Sh EXIT STATUS
112 5c860e29 2018-03-12 stsp .Ex -std got
113 97925469 2018-03-17 stsp .Sh EXAMPLES
114 97925469 2018-03-17 stsp Check out a work tree of
116 97925469 2018-03-17 stsp kernel sources from a Git repository at /var/repo/openbsd-src to ~/sys:
118 97925469 2018-03-17 stsp .Dl $ got checkout -p sys /var/repo/openbsd-src ~/sys
119 5c860e29 2018-03-12 stsp .Sh SEE ALSO
120 285dc8a4 2018-03-13 stsp .Xr got-repository 5
121 285dc8a4 2018-03-13 stsp .Xr got-worktree 5