2 5c860e29 2018-03-12 stsp .\" Copyright (c) 2017 Martin Pieuchot
3 3f0da4df 2018-04-01 stsp .\" Copyright (c) 2018 Stefan Sperling
5 5c860e29 2018-03-12 stsp .\" Permission to use, copy, modify, and distribute this software for any
6 5c860e29 2018-03-12 stsp .\" purpose with or without fee is hereby granted, provided that the above
7 5c860e29 2018-03-12 stsp .\" copyright notice and this permission notice appear in all copies.
9 5c860e29 2018-03-12 stsp .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 5c860e29 2018-03-12 stsp .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 5c860e29 2018-03-12 stsp .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 5c860e29 2018-03-12 stsp .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 5c860e29 2018-03-12 stsp .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 5c860e29 2018-03-12 stsp .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 5c860e29 2018-03-12 stsp .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 5c860e29 2018-03-12 stsp .Dd $Mdocdate$
22 97925469 2018-03-17 stsp .Nd version control system
23 5c860e29 2018-03-12 stsp .Sh SYNOPSIS
27 5c860e29 2018-03-12 stsp .Op Ar arg ...
28 5c860e29 2018-03-12 stsp .Sh DESCRIPTION
30 97925469 2018-03-17 stsp is a version control system which prioritizes ease of use and simplicity
31 97925469 2018-03-17 stsp over flexibility.
34 70f9e387 2018-04-01 stsp stores the history of tracked files in a repository which uses
35 97925469 2018-03-17 stsp the same on-disk format as
37 70f9e387 2018-04-01 stsp repositories used by the Git version control system.
38 285dc8a4 2018-03-13 stsp This repository format is described in
39 5e5560e1 2018-08-01 stsp .Xr git-repository 5 .
43 97925469 2018-03-17 stsp .Em distributed
44 4129c201 2018-03-13 stsp version control system because every copy of a repository is writeable.
45 4129c201 2018-03-13 stsp Modifications made to files can be synchronized between repositories
46 97925469 2018-03-17 stsp at any time.
48 285dc8a4 2018-03-13 stsp Files managed by
50 4129c201 2018-03-13 stsp must be checked out from the repository for modification.
51 285dc8a4 2018-03-13 stsp Checked out files are stored in a
52 285dc8a4 2018-03-13 stsp .Em work tree
53 c5867b47 2018-03-13 stsp which can be placed at an arbitrary directory in the filesystem hierarchy.
54 97925469 2018-03-17 stsp The on-disk format of a
56 285dc8a4 2018-03-13 stsp work tree is described in
57 285dc8a4 2018-03-13 stsp .Xr got-worktree 5 .
60 285dc8a4 2018-03-13 stsp provides global and command-specific options.
61 285dc8a4 2018-03-13 stsp Global options must preceed the command name, and are as follows:
62 1b6b95a8 2018-03-12 stsp .Bl -tag -width tenletters
64 1b6b95a8 2018-03-12 stsp Display usage information.
67 38e11793 2018-06-13 stsp The commands for
69 38e11793 2018-06-13 stsp are as follows:
70 0bb8a95e 2018-03-12 stsp .Bl -tag -width checkout
71 5d7c1dab 2018-04-01 stsp .It Cm checkout [ Fl p Ar path-prefix ] repository-path [ work-tree-path ]
72 0bb8a95e 2018-03-12 stsp Copy files from a repository into a new work tree.
74 5d7c1dab 2018-04-01 stsp .Ar work tree path
75 5d7c1dab 2018-04-01 stsp is not specified, either use the base name of the
76 5d7c1dab 2018-04-01 stsp .Ar repository path ,
78 5d7c1dab 2018-04-01 stsp .Ar path prefix
79 5d7c1dab 2018-04-01 stsp was specified use the base name of the
80 5d7c1dab 2018-04-01 stsp .Ar path prefix .
82 38e11793 2018-06-13 stsp The options for
83 38e11793 2018-06-13 stsp .Cm got checkout
84 38e11793 2018-06-13 stsp are as follows:
85 38e11793 2018-06-13 stsp .Bl -tag -width Ds
86 38e11793 2018-06-13 stsp .It Fl p Ar path-prefix
87 38e11793 2018-06-13 stsp Restrict the work tree to a subset of the repository's tree hierarchy.
88 38e11793 2018-06-13 stsp Only files beneath the specified
89 38e11793 2018-06-13 stsp .Ar path-prefix
90 38e11793 2018-06-13 stsp will be checked out.
92 507dc3bb 2018-12-29 stsp .It Cm update [ Fl c Ar commit ] [ work-tree-path ]
93 507dc3bb 2018-12-29 stsp Update an existing work tree to another commit.
94 507dc3bb 2018-12-29 stsp By default, the latest commit on the current branch is assumed.
96 507dc3bb 2018-12-29 stsp .Ar work tree path
97 507dc3bb 2018-12-29 stsp is omitted, use the current working directory.
99 507dc3bb 2018-12-29 stsp The options for
100 507dc3bb 2018-12-29 stsp .Cm got update
101 507dc3bb 2018-12-29 stsp are as follows:
102 507dc3bb 2018-12-29 stsp .Bl -tag -width Ds
103 507dc3bb 2018-12-29 stsp .It Fl c Ar commit
104 507dc3bb 2018-12-29 stsp Update the work tree to the specified
105 507dc3bb 2018-12-29 stsp .Ar commit .
106 507dc3bb 2018-12-29 stsp The expected argument is the name of a branch or a SHA1 hash which corresponds
107 507dc3bb 2018-12-29 stsp to a commit object.
109 0bb8a95e 2018-03-12 stsp .\".It Cm status
110 0bb8a95e 2018-03-12 stsp .\"Show current status of files.
111 ae9f01af 2018-10-18 stsp .It Cm log [ Fl c Ar commit ] [ Fl C Ar number ] [ Fl f ] [ Fl l Ar N ] [ Fl p ] [ Fl r Ar repository-path ] [ path ]
112 38e11793 2018-06-13 stsp Display history of a repository.
115 04ca23f4 2018-07-16 stsp is specified, show only commits which modified this path.
117 38e11793 2018-06-13 stsp The options for
118 38e11793 2018-06-13 stsp .Cm got log
119 38e11793 2018-06-13 stsp are as follows:
120 38e11793 2018-06-13 stsp .Bl -tag -width Ds
121 38e11793 2018-06-13 stsp .It Fl c Ar commit
122 38e11793 2018-06-13 stsp Start traversing history at the specified
123 38e11793 2018-06-13 stsp .Ar commit .
124 d1f2edc9 2018-06-13 stsp The expected argument is the name of a branch or a SHA1 hash which corresponds
125 1cfab718 2018-06-13 stsp to a commit object.
126 c0cc5c62 2018-10-18 stsp .It Fl C Ar number
127 c0cc5c62 2018-10-18 stsp Set the number of context lines shown in diffs with
129 c0cc5c62 2018-10-18 stsp By default, 3 lines of context are shown.
131 38e11793 2018-06-13 stsp Restrict history traversal to the first parent of each commit.
132 38e11793 2018-06-13 stsp This shows the linear history of the current branch only.
133 38e11793 2018-06-13 stsp Merge commits which affected the current branch will be shown but
134 38e11793 2018-06-13 stsp individual commits which originated on other branches will be omitted.
135 6238ee32 2018-06-13 stsp .It Fl l Ar N
136 6238ee32 2018-06-13 stsp Limit history traversal to a given number of commits.
138 6238ee32 2018-06-13 stsp Display the patch of modifications made in each commit.
139 04ca23f4 2018-07-16 stsp .It Fl r Ar repository-path
140 04ca23f4 2018-07-16 stsp Use the repository at the specified path.
141 04ca23f4 2018-07-16 stsp If not specified, assume the repository is located at or above the current
142 04ca23f4 2018-07-16 stsp working directory.
144 ae9f01af 2018-10-18 stsp .It Cm diff [ Fl C Ar number ] [ Ar repository-path ] Ar object1 Ar object2
145 3f8b7d6a 2018-04-01 stsp Display the differences between two objects in the repository.
148 21294684 2018-04-01 stsp argument is a SHA1 hash which corresponds to the object.
149 3f8b7d6a 2018-04-01 stsp Both objects must be of the same type (blobs, trees, or commits).
151 3f8b7d6a 2018-04-01 stsp .Ar repository path
152 3f8b7d6a 2018-04-01 stsp is omitted, use the current working directory.
154 c0cc5c62 2018-10-18 stsp The options for
155 c0cc5c62 2018-10-18 stsp .Cm got diff
156 c0cc5c62 2018-10-18 stsp are as follows:
157 c0cc5c62 2018-10-18 stsp .Bl -tag -width Ds
158 c0cc5c62 2018-10-18 stsp .It Fl C Ar number
159 c0cc5c62 2018-10-18 stsp Set the number of context lines shown in the diff.
160 c0cc5c62 2018-10-18 stsp By default, 3 lines of context are shown.
162 1ff8e573 2018-08-02 stsp .It Cm blame [ Fl c Ar commit ] [ Fl r Ar repository-path ] Ar path
163 1ff8e573 2018-08-02 stsp Display line-by-line history of a file at the specified path.
165 1ff8e573 2018-08-02 stsp The options for
166 1ff8e573 2018-08-02 stsp .Cm got blame
167 1ff8e573 2018-08-02 stsp are as follows:
168 1ff8e573 2018-08-02 stsp .Bl -tag -width Ds
169 1ff8e573 2018-08-02 stsp .It Fl c Ar commit
170 1ff8e573 2018-08-02 stsp Start traversing history at the specified
171 1ff8e573 2018-08-02 stsp .Ar commit .
172 1ff8e573 2018-08-02 stsp The expected argument is the name of a branch or a SHA1 hash which corresponds
173 1ff8e573 2018-08-02 stsp to a commit object.
174 1ff8e573 2018-08-02 stsp .It Fl r Ar repository-path
175 1ff8e573 2018-08-02 stsp Use the repository at the specified path.
176 1ff8e573 2018-08-02 stsp If not specified, assume the repository is located at or above the current
177 1ff8e573 2018-08-02 stsp working directory.
179 c1669e2e 2019-01-09 stsp .It Cm tree [ Fl c Ar commit ] [ Fl r Ar repository-path ] [ Fl i ] [ Fl R] [ Ar path ]
180 5de5890b 2018-10-18 stsp Display a listing of files and directories at the specified
181 5de5890b 2018-10-18 stsp directory path in the repository.
182 5de5890b 2018-10-18 stsp If no path is specified, the root directory is listed.
184 5de5890b 2018-10-18 stsp The options for
185 5de5890b 2018-10-18 stsp .Cm got tree
186 5de5890b 2018-10-18 stsp are as follows:
187 5de5890b 2018-10-18 stsp .Bl -tag -width Ds
188 5de5890b 2018-10-18 stsp .It Fl c Ar commit
189 5de5890b 2018-10-18 stsp List files and directories as they appear in the specified
190 5de5890b 2018-10-18 stsp .Ar commit .
191 5de5890b 2018-10-18 stsp The expected argument is the name of a branch or a SHA1 hash which corresponds
192 5de5890b 2018-10-18 stsp to a commit object.
193 5de5890b 2018-10-18 stsp .It Fl r Ar repository-path
194 5de5890b 2018-10-18 stsp Use the repository at the specified path.
195 5de5890b 2018-10-18 stsp If not specified, assume the repository is located at or above the current
196 5de5890b 2018-10-18 stsp working directory.
198 5de5890b 2018-10-18 stsp Show object IDs of files (blob objects) and directories (tree objects).
200 c1669e2e 2019-01-09 stsp Recurse into sub-directories.
202 5c860e29 2018-03-12 stsp .Sh EXIT STATUS
203 5c860e29 2018-03-12 stsp .Ex -std got
204 97925469 2018-03-17 stsp .Sh EXAMPLES
205 97925469 2018-03-17 stsp Check out a work tree of
207 97925469 2018-03-17 stsp kernel sources from a Git repository at /var/repo/openbsd-src to ~/sys:
209 97925469 2018-03-17 stsp .Dl $ got checkout -p sys /var/repo/openbsd-src ~/sys
210 5c860e29 2018-03-12 stsp .Sh SEE ALSO
211 5e5560e1 2018-08-01 stsp .Xr git-repository 5
212 285dc8a4 2018-03-13 stsp .Xr got-worktree 5
213 1a208aaf 2018-04-01 stsp .Sh AUTHORS
214 1a208aaf 2018-04-01 stsp .An Stefan Sperling Aq Mt stsp@openbsd.org
215 1a208aaf 2018-04-01 stsp .An Martin Pieuchot Aq Mt mpi@openbsd.org