Blame


1 5c860e29 2018-03-12 stsp .\"
2 5c860e29 2018-03-12 stsp .\" Copyright (c) 2017 Martin Pieuchot
3 5d56da81 2019-01-13 stsp .\" Copyright (c) 2018, 2019 Stefan Sperling
4 5c860e29 2018-03-12 stsp .\"
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.
8 5c860e29 2018-03-12 stsp .\"
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.
16 5c860e29 2018-03-12 stsp .\"
17 5c860e29 2018-03-12 stsp .Dd $Mdocdate$
18 5c860e29 2018-03-12 stsp .Dt GOT 1
19 5c860e29 2018-03-12 stsp .Os
20 5c860e29 2018-03-12 stsp .Sh NAME
21 5c860e29 2018-03-12 stsp .Nm got
22 eb7dbff5 2019-05-09 stsp .Nd game of trees
23 5c860e29 2018-03-12 stsp .Sh SYNOPSIS
24 0bb8a95e 2018-03-12 stsp .Nm
25 5c860e29 2018-03-12 stsp .Ar command
26 1b6b95a8 2018-03-12 stsp .Op Fl h
27 5c860e29 2018-03-12 stsp .Op Ar arg ...
28 5c860e29 2018-03-12 stsp .Sh DESCRIPTION
29 5c860e29 2018-03-12 stsp .Nm
30 4dfb2f0f 2019-03-26 stsp is a version control system which stores the history of tracked files
31 4dfb2f0f 2019-03-26 stsp in a Git repository, as used by the Git version control system.
32 285dc8a4 2018-03-13 stsp This repository format is described in
33 5e5560e1 2018-08-01 stsp .Xr git-repository 5 .
34 285dc8a4 2018-03-13 stsp .Pp
35 4129c201 2018-03-13 stsp .Nm
36 4129c201 2018-03-13 stsp is a
37 ae73e26f 2019-03-26 stsp .Dq distributed
38 4129c201 2018-03-13 stsp version control system because every copy of a repository is writeable.
39 4129c201 2018-03-13 stsp Modifications made to files can be synchronized between repositories
40 97925469 2018-03-17 stsp at any time.
41 4129c201 2018-03-13 stsp .Pp
42 285dc8a4 2018-03-13 stsp Files managed by
43 285dc8a4 2018-03-13 stsp .Nm
44 4129c201 2018-03-13 stsp must be checked out from the repository for modification.
45 285dc8a4 2018-03-13 stsp Checked out files are stored in a
46 285dc8a4 2018-03-13 stsp .Em work tree
47 c5867b47 2018-03-13 stsp which can be placed at an arbitrary directory in the filesystem hierarchy.
48 fb2921d0 2019-03-26 stsp The on-disk format of this work tree is described in
49 285dc8a4 2018-03-13 stsp .Xr got-worktree 5 .
50 285dc8a4 2018-03-13 stsp .Pp
51 285dc8a4 2018-03-13 stsp .Nm
52 285dc8a4 2018-03-13 stsp provides global and command-specific options.
53 285dc8a4 2018-03-13 stsp Global options must preceed the command name, and are as follows:
54 1b6b95a8 2018-03-12 stsp .Bl -tag -width tenletters
55 1b6b95a8 2018-03-12 stsp .It Fl h
56 1b6b95a8 2018-03-12 stsp Display usage information.
57 1b6b95a8 2018-03-12 stsp .El
58 1b6b95a8 2018-03-12 stsp .Pp
59 38e11793 2018-06-13 stsp The commands for
60 38e11793 2018-06-13 stsp .Nm
61 38e11793 2018-06-13 stsp are as follows:
62 0bb8a95e 2018-03-12 stsp .Bl -tag -width checkout
63 2c7829a4 2019-06-17 stsp .It Cm init Ar path
64 2c7829a4 2019-06-17 stsp Create a new empty repository at the specified
65 2c7829a4 2019-06-17 stsp .Ar path .
66 08573d5b 2019-05-14 stsp .It Cm checkout [ Fl b Ar branch ] [ Fl c Ar commit ] [ Fl p Ar path-prefix ] repository-path [ work-tree-path ]
67 0bb8a95e 2018-03-12 stsp Copy files from a repository into a new work tree.
68 5d7c1dab 2018-04-01 stsp If the
69 5d7c1dab 2018-04-01 stsp .Ar work tree path
70 c844a238 2019-02-06 stsp is not specified, either use the last component of
71 5d7c1dab 2018-04-01 stsp .Ar repository path ,
72 5d7c1dab 2018-04-01 stsp or if a
73 5d7c1dab 2018-04-01 stsp .Ar path prefix
74 c844a238 2019-02-06 stsp was specified use the last component of
75 5d7c1dab 2018-04-01 stsp .Ar path prefix .
76 38e11793 2018-06-13 stsp .Pp
77 38e11793 2018-06-13 stsp The options for
78 38e11793 2018-06-13 stsp .Cm got checkout
79 38e11793 2018-06-13 stsp are as follows:
80 38e11793 2018-06-13 stsp .Bl -tag -width Ds
81 08573d5b 2019-05-14 stsp .It Fl b Ar branch
82 08573d5b 2019-05-14 stsp Check out files from the specified
83 08573d5b 2019-05-14 stsp .Ar branch .
84 08573d5b 2019-05-14 stsp If this option is not specified, a branch resolved via the repository's HEAD
85 08573d5b 2019-05-14 stsp reference will be used.
86 8069f636 2019-01-12 stsp .It Fl c Ar commit
87 8069f636 2019-01-12 stsp Check out files from the specified
88 8069f636 2019-01-12 stsp .Ar commit .
89 0e1b0230 2019-07-07 stsp The expected argument is a commit ID SHA1 hash.
90 0e1b0230 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
91 0e1b0230 2019-07-07 stsp automatically, provided the abbreviation is unique.
92 08573d5b 2019-05-14 stsp If this option is not specified, the most recent commit on the selected
93 08573d5b 2019-05-14 stsp branch will be used.
94 38e11793 2018-06-13 stsp .It Fl p Ar path-prefix
95 38e11793 2018-06-13 stsp Restrict the work tree to a subset of the repository's tree hierarchy.
96 38e11793 2018-06-13 stsp Only files beneath the specified
97 38e11793 2018-06-13 stsp .Ar path-prefix
98 38e11793 2018-06-13 stsp will be checked out.
99 38e11793 2018-06-13 stsp .El
100 97b3a7be 2019-07-09 stsp .It Cm co
101 97b3a7be 2019-07-09 stsp Short alias for
102 97b3a7be 2019-07-09 stsp .Cm checkout .
103 024e9686 2019-05-14 stsp .It Cm update [ Fl b Ar branch ] [ Fl c Ar commit ] [ Ar path ]
104 024e9686 2019-05-14 stsp Update an existing work tree to a different commit.
105 7f838b36 2019-02-08 stsp Show the status of each affected file, using the following status codes:
106 7f838b36 2019-02-08 stsp .Bl -column YXZ description
107 7f838b36 2019-02-08 stsp .It U Ta file was updated and contained no local changes
108 7f838b36 2019-02-08 stsp .It G Ta file was updated and local changes were merged cleanly
109 7f838b36 2019-02-08 stsp .It C Ta file was updated and conflicts occurred during merge
110 7f838b36 2019-02-08 stsp .It D Ta file was deleted
111 7f838b36 2019-02-08 stsp .It A Ta new file was added
112 7f838b36 2019-02-08 stsp .It ~ Ta versioned file is obstructed by a non-regular file
113 a378724f 2019-02-10 stsp .It ! Ta a missing versioned file was restored
114 7f838b36 2019-02-08 stsp .El
115 7f838b36 2019-02-08 stsp .Pp
116 c4cdcb68 2019-04-03 stsp If a
117 c4cdcb68 2019-04-03 stsp .Ar path
118 c4cdcb68 2019-04-03 stsp is specified, restrict the update operation to files at or within this path.
119 f2cf8fbb 2019-04-04 stsp The path is required to exist in the update operation's target commit.
120 f2cf8fbb 2019-04-04 stsp Files in the work tree outside this path will remain unchanged and will
121 f2cf8fbb 2019-04-04 stsp retain their previously recorded base commit.
122 f2cf8fbb 2019-04-04 stsp Some
123 f2cf8fbb 2019-04-04 stsp .Nm
124 f2cf8fbb 2019-04-04 stsp commands may refuse to run while the work tree contains files from
125 c4cdcb68 2019-04-03 stsp multiple base commits.
126 f2cf8fbb 2019-04-04 stsp The base commit of such a work tree can be made consistent by running
127 47ec7be7 2019-05-12 stsp .Cm got update
128 47ec7be7 2019-05-12 stsp across the entire work tree.
129 024e9686 2019-05-14 stsp Specifying a
130 024e9686 2019-05-14 stsp .Ar path
131 024e9686 2019-05-14 stsp is incompatible with the
132 024e9686 2019-05-14 stsp .Fl b
133 024e9686 2019-05-14 stsp option.
134 7f838b36 2019-02-08 stsp .Pp
135 507dc3bb 2018-12-29 stsp The options for
136 507dc3bb 2018-12-29 stsp .Cm got update
137 507dc3bb 2018-12-29 stsp are as follows:
138 507dc3bb 2018-12-29 stsp .Bl -tag -width Ds
139 024e9686 2019-05-14 stsp .It Fl b Ar branch
140 024e9686 2019-05-14 stsp Switch the work tree's branch reference to the specified
141 024e9686 2019-05-14 stsp .Ar branch
142 024e9686 2019-05-14 stsp before updating the work tree.
143 024e9686 2019-05-14 stsp This option requires that all paths in the work tree are updated.
144 507dc3bb 2018-12-29 stsp .It Fl c Ar commit
145 507dc3bb 2018-12-29 stsp Update the work tree to the specified
146 507dc3bb 2018-12-29 stsp .Ar commit .
147 a54b6686 2019-06-28 stsp The expected argument is a commit ID SHA1 hash.
148 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
149 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
150 024e9686 2019-05-14 stsp If this option is not specified, the most recent commit on the work tree's
151 024e9686 2019-05-14 stsp branch will be used.
152 507dc3bb 2018-12-29 stsp .El
153 97b3a7be 2019-07-09 stsp .It Cm up
154 97b3a7be 2019-07-09 stsp Short alias for
155 97b3a7be 2019-07-09 stsp .Cm update .
156 927df6b7 2019-02-10 stsp .It Cm status [ Ar path ]
157 6cd959e6 2019-03-26 stsp Show the current modification status of files in a work tree,
158 6bad629b 2019-02-04 stsp using the following status codes:
159 6bad629b 2019-02-04 stsp .Bl -column YXZ description
160 6bad629b 2019-02-04 stsp .It M Ta modified file
161 079890a9 2019-03-26 stsp .It A Ta file scheduled for addition in next commit
162 079890a9 2019-03-26 stsp .It D Ta file scheduled for deletion in next commit
163 7154f6ce 2019-03-27 stsp .It C Ta modified or added file which contains merge conflicts
164 6bad629b 2019-02-04 stsp .It ! Ta versioned file was expected on disk but is missing
165 0dbc2271 2019-02-05 stsp .It ~ Ta versioned file is obstructed by a non-regular file
166 6bad629b 2019-02-04 stsp .It ? Ta unversioned item not tracked by
167 6bad629b 2019-02-04 stsp .Nm
168 6bad629b 2019-02-04 stsp .El
169 6bad629b 2019-02-04 stsp .Pp
170 927df6b7 2019-02-10 stsp If a
171 927df6b7 2019-02-10 stsp .Ar path
172 927df6b7 2019-02-10 stsp is specified, only show modifications within this path.
173 97b3a7be 2019-07-09 stsp .It Cm st
174 97b3a7be 2019-07-09 stsp Short alias for
175 97b3a7be 2019-07-09 stsp .Cm status .
176 499d7ecc 2019-05-22 stsp .It Cm log [ Fl b ] [ Fl c Ar commit ] [ Fl C Ar number ] [ Fl l Ar N ] [ Fl p ] [ Fl r Ar repository-path ] [ path ]
177 38e11793 2018-06-13 stsp Display history of a repository.
178 04ca23f4 2018-07-16 stsp If a
179 04ca23f4 2018-07-16 stsp .Ar path
180 04ca23f4 2018-07-16 stsp is specified, show only commits which modified this path.
181 38e11793 2018-06-13 stsp .Pp
182 38e11793 2018-06-13 stsp The options for
183 38e11793 2018-06-13 stsp .Cm got log
184 38e11793 2018-06-13 stsp are as follows:
185 38e11793 2018-06-13 stsp .Bl -tag -width Ds
186 499d7ecc 2019-05-22 stsp .It Fl b
187 43205691 2019-05-22 stsp Show the linear line of history of the current branch.
188 43205691 2019-05-22 stsp This option restricts history traversal to the first parent of each commit.
189 43205691 2019-05-22 stsp Commits which the branch was based on and merge commits which affected the
190 43205691 2019-05-22 stsp branch will be shown, but individual commits created on parallel branches
191 43205691 2019-05-22 stsp will be omitted.
192 38e11793 2018-06-13 stsp .It Fl c Ar commit
193 38e11793 2018-06-13 stsp Start traversing history at the specified
194 38e11793 2018-06-13 stsp .Ar commit .
195 a54b6686 2019-06-28 stsp The expected argument is the name of a branch or a commit ID SHA1 hash.
196 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
197 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
198 1cc14b9f 2019-05-14 stsp If this option is not specified, default to the work tree's current branch
199 1cc14b9f 2019-05-14 stsp if invoked in a work tree, or to the repository's HEAD reference.
200 c0cc5c62 2018-10-18 stsp .It Fl C Ar number
201 c0cc5c62 2018-10-18 stsp Set the number of context lines shown in diffs with
202 c0cc5c62 2018-10-18 stsp .Fl p .
203 c0cc5c62 2018-10-18 stsp By default, 3 lines of context are shown.
204 6238ee32 2018-06-13 stsp .It Fl l Ar N
205 6238ee32 2018-06-13 stsp Limit history traversal to a given number of commits.
206 6238ee32 2018-06-13 stsp .It Fl p
207 6238ee32 2018-06-13 stsp Display the patch of modifications made in each commit.
208 04ca23f4 2018-07-16 stsp .It Fl r Ar repository-path
209 04ca23f4 2018-07-16 stsp Use the repository at the specified path.
210 04ca23f4 2018-07-16 stsp If not specified, assume the repository is located at or above the current
211 04ca23f4 2018-07-16 stsp working directory.
212 e9cf2e30 2019-02-05 stsp If this directory is a
213 e9cf2e30 2019-02-05 stsp .Nm
214 e9cf2e30 2019-02-05 stsp work tree, use the repository path associated with this work tree.
215 38e11793 2018-06-13 stsp .El
216 927df6b7 2019-02-10 stsp .It Cm diff [ Fl C Ar number ] [ Fl r Ar repository-path ] [ Ar object1 Ar object2 | Ar path ]
217 927df6b7 2019-02-10 stsp When invoked within a work tree with less than two arguments, display
218 927df6b7 2019-02-10 stsp uncommitted changes in the work tree.
219 927df6b7 2019-02-10 stsp If a
220 927df6b7 2019-02-10 stsp .Ar path
221 927df6b7 2019-02-10 stsp is specified, only show changes within this path.
222 927df6b7 2019-02-10 stsp .Pp
223 e02e74af 2019-05-28 stsp If two arguments are provided, treat each argument as a reference,
224 a54b6686 2019-06-28 stsp or an object ID SHA1 hash, and display differences between these objects.
225 3f8b7d6a 2018-04-01 stsp Both objects must be of the same type (blobs, trees, or commits).
226 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
227 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
228 c0cc5c62 2018-10-18 stsp .Pp
229 c0cc5c62 2018-10-18 stsp The options for
230 c0cc5c62 2018-10-18 stsp .Cm got diff
231 c0cc5c62 2018-10-18 stsp are as follows:
232 c0cc5c62 2018-10-18 stsp .Bl -tag -width Ds
233 c0cc5c62 2018-10-18 stsp .It Fl C Ar number
234 c0cc5c62 2018-10-18 stsp Set the number of context lines shown in the diff.
235 c0cc5c62 2018-10-18 stsp By default, 3 lines of context are shown.
236 b72f483a 2019-02-05 stsp .It Fl r Ar repository-path
237 b72f483a 2019-02-05 stsp Use the repository at the specified path.
238 b72f483a 2019-02-05 stsp If not specified, assume the repository is located at or above the current
239 b72f483a 2019-02-05 stsp working directory.
240 b72f483a 2019-02-05 stsp If this directory is a
241 b72f483a 2019-02-05 stsp .Nm
242 b72f483a 2019-02-05 stsp work tree, use the repository path associated with this work tree.
243 c0cc5c62 2018-10-18 stsp .El
244 1ff8e573 2018-08-02 stsp .It Cm blame [ Fl c Ar commit ] [ Fl r Ar repository-path ] Ar path
245 1ff8e573 2018-08-02 stsp Display line-by-line history of a file at the specified path.
246 1ff8e573 2018-08-02 stsp .Pp
247 1ff8e573 2018-08-02 stsp The options for
248 1ff8e573 2018-08-02 stsp .Cm got blame
249 1ff8e573 2018-08-02 stsp are as follows:
250 1ff8e573 2018-08-02 stsp .Bl -tag -width Ds
251 1ff8e573 2018-08-02 stsp .It Fl c Ar commit
252 1ff8e573 2018-08-02 stsp Start traversing history at the specified
253 1ff8e573 2018-08-02 stsp .Ar commit .
254 a54b6686 2019-06-28 stsp The expected argument is the name of a branch or a commit ID SHA1 hash.
255 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
256 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
257 1ff8e573 2018-08-02 stsp .It Fl r Ar repository-path
258 1ff8e573 2018-08-02 stsp Use the repository at the specified path.
259 1ff8e573 2018-08-02 stsp If not specified, assume the repository is located at or above the current
260 1ff8e573 2018-08-02 stsp working directory.
261 0c06baac 2019-02-05 stsp If this directory is a
262 0c06baac 2019-02-05 stsp .Nm
263 0c06baac 2019-02-05 stsp work tree, use the repository path associated with this work tree.
264 5c860e29 2018-03-12 stsp .El
265 c1669e2e 2019-01-09 stsp .It Cm tree [ Fl c Ar commit ] [ Fl r Ar repository-path ] [ Fl i ] [ Fl R] [ Ar path ]
266 5de5890b 2018-10-18 stsp Display a listing of files and directories at the specified
267 5de5890b 2018-10-18 stsp directory path in the repository.
268 db0c2996 2019-02-10 stsp Entries shown in this listing may carry one of the following trailing
269 db0c2996 2019-02-10 stsp annotations:
270 db0c2996 2019-02-10 stsp .Bl -column YXZ description
271 db0c2996 2019-02-10 stsp .It / Ta entry is a directory
272 db0c2996 2019-02-10 stsp .It * Ta entry is an executable file
273 db0c2996 2019-02-10 stsp .El
274 db0c2996 2019-02-10 stsp .Pp
275 0c849583 2019-02-05 stsp If no
276 0c849583 2019-02-05 stsp .Ar path
277 0c849583 2019-02-05 stsp is specified, list the repository path corresponding to the current
278 0c849583 2019-02-05 stsp directory of the work tree, or the root directory of the repository
279 0c849583 2019-02-05 stsp if there is no work tree.
280 5de5890b 2018-10-18 stsp .Pp
281 5de5890b 2018-10-18 stsp The options for
282 5de5890b 2018-10-18 stsp .Cm got tree
283 5de5890b 2018-10-18 stsp are as follows:
284 5de5890b 2018-10-18 stsp .Bl -tag -width Ds
285 5de5890b 2018-10-18 stsp .It Fl c Ar commit
286 5de5890b 2018-10-18 stsp List files and directories as they appear in the specified
287 5de5890b 2018-10-18 stsp .Ar commit .
288 a54b6686 2019-06-28 stsp The expected argument is the name of a branch or a commit ID SHA1 hash.
289 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
290 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
291 5de5890b 2018-10-18 stsp .It Fl r Ar repository-path
292 5de5890b 2018-10-18 stsp Use the repository at the specified path.
293 5de5890b 2018-10-18 stsp If not specified, assume the repository is located at or above the current
294 5de5890b 2018-10-18 stsp working directory.
295 0c849583 2019-02-05 stsp If this directory is a
296 0c849583 2019-02-05 stsp .Nm
297 0c849583 2019-02-05 stsp work tree, use the repository path associated with this work tree.
298 5de5890b 2018-10-18 stsp .It Fl i
299 5de5890b 2018-10-18 stsp Show object IDs of files (blob objects) and directories (tree objects).
300 c1669e2e 2019-01-09 stsp .It Fl R
301 0c849583 2019-02-05 stsp Recurse into sub-directories in the repository.
302 d0eebce4 2019-03-11 stsp .El
303 d83d9d5c 2019-05-13 stsp .It Cm ref [ Fl r Ar repository-path ] [ Fl l ] [ Fl d Ar name ] [ Ar name Ar target ]
304 d0eebce4 2019-03-11 stsp Manage references in a repository.
305 d0eebce4 2019-03-11 stsp .Pp
306 d0eebce4 2019-03-11 stsp If no options are passed, expect two arguments and attempt to create,
307 d0eebce4 2019-03-11 stsp or update, the reference with the given
308 d0eebce4 2019-03-11 stsp .Ar name ,
309 d0eebce4 2019-03-11 stsp and make it point at the given
310 d83d9d5c 2019-05-13 stsp .Ar target .
311 a54b6686 2019-06-28 stsp The target may be an object ID SHA1 hash or an existing reference which
312 a54b6686 2019-06-28 stsp will be resolved to an object ID.
313 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
314 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
315 d0eebce4 2019-03-11 stsp .Pp
316 d0eebce4 2019-03-11 stsp The options for
317 d0eebce4 2019-03-11 stsp .Cm got ref
318 d0eebce4 2019-03-11 stsp are as follows:
319 d0eebce4 2019-03-11 stsp .Bl -tag -width Ds
320 d0eebce4 2019-03-11 stsp .It Fl r Ar repository-path
321 d0eebce4 2019-03-11 stsp Use the repository at the specified path.
322 d0eebce4 2019-03-11 stsp If not specified, assume the repository is located at or above the current
323 d0eebce4 2019-03-11 stsp working directory.
324 d0eebce4 2019-03-11 stsp If this directory is a
325 d0eebce4 2019-03-11 stsp .Nm
326 d0eebce4 2019-03-11 stsp work tree, use the repository path associated with this work tree.
327 d0eebce4 2019-03-11 stsp .It Fl l
328 d0eebce4 2019-03-11 stsp List all existing references in the repository.
329 d0eebce4 2019-03-11 stsp .It Fl d Ar name
330 d0eebce4 2019-03-11 stsp Delete the reference with the specified name from the repository.
331 4e759de4 2019-06-26 stsp .El
332 4e759de4 2019-06-26 stsp .It Cm branch [ Fl r Ar repository-path ] [ Fl l ] [ Fl d Ar name ] [ Ar name [ Ar base-branch ] ]
333 4e759de4 2019-06-26 stsp Manage branches in a repository.
334 4e759de4 2019-06-26 stsp .Pp
335 4e759de4 2019-06-26 stsp Branches are managed via references which live in the
336 4e759de4 2019-06-26 stsp .Dq refs/heads/
337 4e759de4 2019-06-26 stsp reference namespace.
338 4e759de4 2019-06-26 stsp The
339 4e759de4 2019-06-26 stsp .Cm got branch
340 4e759de4 2019-06-26 stsp command operates on references in this namespace only.
341 4e759de4 2019-06-26 stsp .Pp
342 4e759de4 2019-06-26 stsp If no options are passed, expect one or two arguments and attempt to create
343 4e759de4 2019-06-26 stsp a branch with the given
344 4e759de4 2019-06-26 stsp .Ar name ,
345 4e759de4 2019-06-26 stsp and make it point at the given
346 4e759de4 2019-06-26 stsp .Ar base-branch .
347 4e759de4 2019-06-26 stsp If no
348 4e759de4 2019-06-26 stsp .Ar base-branch
349 4e759de4 2019-06-26 stsp is specified, default to the work tree's current branch if invoked in a
350 4e759de4 2019-06-26 stsp work tree, or to the repository's HEAD reference.
351 4e759de4 2019-06-26 stsp .Pp
352 4e759de4 2019-06-26 stsp The options for
353 4e759de4 2019-06-26 stsp .Cm got branch
354 4e759de4 2019-06-26 stsp are as follows:
355 4e759de4 2019-06-26 stsp .Bl -tag -width Ds
356 4e759de4 2019-06-26 stsp .It Fl r Ar repository-path
357 4e759de4 2019-06-26 stsp Use the repository at the specified path.
358 4e759de4 2019-06-26 stsp If not specified, assume the repository is located at or above the current
359 4e759de4 2019-06-26 stsp working directory.
360 4e759de4 2019-06-26 stsp If this directory is a
361 4e759de4 2019-06-26 stsp .Nm
362 4e759de4 2019-06-26 stsp work tree, use the repository path associated with this work tree.
363 4e759de4 2019-06-26 stsp .It Fl l
364 4e759de4 2019-06-26 stsp List all existing branches in the repository.
365 ba882ee3 2019-07-11 stsp .Pp
366 ba882ee3 2019-07-11 stsp If invoked in a work tree, the work tree's current branch is shown
367 ba882ee3 2019-07-11 stsp with one the following annotations:
368 ba882ee3 2019-07-11 stsp .Bl -column YXZ description
369 ba882ee3 2019-07-11 stsp .It * Ta work tree's base commit matches the branch tip
370 ba882ee3 2019-07-11 stsp .It ~ Ta work tree's base commit is out-of-date
371 ba882ee3 2019-07-11 stsp .El
372 4e759de4 2019-06-26 stsp .It Fl d Ar name
373 4e759de4 2019-06-26 stsp Delete the branch with the specified name from the repository.
374 7acfb25b 2019-07-11 stsp Only the branch reference is deleted.
375 7acfb25b 2019-07-11 stsp Any commit, tree, and blob objects belonging to the branch
376 74d012d1 2019-07-11 stsp remain in the repository and may be removed separately with
377 7acfb25b 2019-07-11 stsp .Xr git-gc 1 .
378 5de5890b 2018-10-18 stsp .El
379 97b3a7be 2019-07-09 stsp .It Cm br
380 97b3a7be 2019-07-09 stsp Short alias for
381 97b3a7be 2019-07-09 stsp .Cm branch .
382 fbb7e5c7 2019-05-11 stsp .It Cm add Ar file-path ...
383 8125ddca 2019-05-11 stsp Schedule unversioned files in a work tree for addition to the
384 d00136be 2019-03-26 stsp repository in the next commit.
385 648e4ef7 2019-07-09 stsp .It Cm remove Ar file-path ...
386 17ed4618 2019-06-02 stsp Remove versioned files from a work tree and schedule them for deletion
387 2ec1f75b 2019-03-26 stsp from the repository in the next commit.
388 2ec1f75b 2019-03-26 stsp .Pp
389 2ec1f75b 2019-03-26 stsp The options for
390 86d25a1b 2019-07-11 stsp .Cm got remove
391 2ec1f75b 2019-03-26 stsp are as follows:
392 2ec1f75b 2019-03-26 stsp .Bl -tag -width Ds
393 2ec1f75b 2019-03-26 stsp .It Fl f
394 17ed4618 2019-06-02 stsp Perform the operation even if a file contains uncommitted modifications.
395 d0eebce4 2019-03-11 stsp .El
396 648e4ef7 2019-07-09 stsp .It Cm rm
397 648e4ef7 2019-07-09 stsp Short alias for
398 648e4ef7 2019-07-09 stsp .Cm remove .
399 e20a8b6f 2019-06-04 stsp .It Cm revert Ar file-path ...
400 e20a8b6f 2019-06-04 stsp Revert any uncommited changes in files at the specified paths.
401 a129376b 2019-03-28 stsp File contents will be overwritten with those contained in the
402 a129376b 2019-03-28 stsp work tree's base commit. There is no way to bring discarded
403 a129376b 2019-03-28 stsp changes back after
404 a129376b 2019-03-28 stsp .Cm got revert !
405 a129376b 2019-03-28 stsp .Pp
406 e20a8b6f 2019-06-04 stsp If a file was added with
407 a129376b 2019-03-28 stsp .Cm got add
408 a129376b 2019-03-28 stsp it will become an unversioned file again.
409 e20a8b6f 2019-06-04 stsp If a file was deleted with
410 86d25a1b 2019-07-11 stsp .Cm got remove
411 a129376b 2019-03-28 stsp it will be restored.
412 97b3a7be 2019-07-09 stsp .It Cm rv
413 97b3a7be 2019-07-09 stsp Short alias for
414 97b3a7be 2019-07-09 stsp .Cm revert .
415 74ff3f23 2019-07-07 stsp .It Cm commit [ Fl m Ar message ] [ file-path ]
416 15cd91f7 2019-05-12 stsp Create a new commit in the repository from local changes in a work tree
417 15cd91f7 2019-05-12 stsp and use this commit as the new base commit for the work tree.
418 15cd91f7 2019-05-12 stsp .Pp
419 15cd91f7 2019-05-12 stsp Show the status of each affected file, using the following status codes:
420 15cd91f7 2019-05-12 stsp .Bl -column YXZ description
421 15cd91f7 2019-05-12 stsp .It M Ta modified file
422 15cd91f7 2019-05-12 stsp .It D Ta file was deleted
423 15cd91f7 2019-05-12 stsp .It A Ta new file was added
424 15cd91f7 2019-05-12 stsp .El
425 15cd91f7 2019-05-12 stsp .Pp
426 15cd91f7 2019-05-12 stsp Files without local changes will retain their previously recorded base
427 15cd91f7 2019-05-12 stsp commit.
428 15cd91f7 2019-05-12 stsp Some
429 15cd91f7 2019-05-12 stsp .Nm
430 15cd91f7 2019-05-12 stsp commands may refuse to run while the work tree contains files from
431 15cd91f7 2019-05-12 stsp multiple base commits.
432 15cd91f7 2019-05-12 stsp The base commit of such a work tree can be made consistent by running
433 47ec7be7 2019-05-12 stsp .Cm got update
434 47ec7be7 2019-05-12 stsp across the entire work tree.
435 15cd91f7 2019-05-12 stsp .Pp
436 15cd91f7 2019-05-12 stsp The
437 15cd91f7 2019-05-12 stsp .Cm got commit
438 15cd91f7 2019-05-12 stsp command requires the
439 74416c47 2019-05-09 stsp .Ev GOT_AUTHOR
440 74416c47 2019-05-09 stsp environment variable to be set.
441 74416c47 2019-05-09 stsp .Pp
442 74416c47 2019-05-09 stsp The options for
443 74416c47 2019-05-09 stsp .Cm got commit
444 74416c47 2019-05-09 stsp are as follows:
445 74416c47 2019-05-09 stsp .Bl -tag -width Ds
446 74ff3f23 2019-07-07 stsp .It Fl m Ar message
447 74416c47 2019-05-09 stsp Use the specified log message when creating the new commit.
448 23594da9 2019-05-13 stsp Without the
449 23594da9 2019-05-13 stsp .Fl m
450 23594da9 2019-05-13 stsp option,
451 23594da9 2019-05-13 stsp .Cm got commit
452 23594da9 2019-05-13 stsp opens a temporary file in an editor where a log message can be written.
453 2ec1f75b 2019-03-26 stsp .El
454 97b3a7be 2019-07-09 stsp .It Cm ci
455 97b3a7be 2019-07-09 stsp Short alias for
456 97b3a7be 2019-07-09 stsp .Cm commit .
457 234035bc 2019-06-01 stsp .It Cm cherrypick Ar commit
458 234035bc 2019-06-01 stsp Merge changes from a single
459 234035bc 2019-06-01 stsp .Ar commit
460 234035bc 2019-06-01 stsp into the work tree.
461 234035bc 2019-06-01 stsp The specified
462 234035bc 2019-06-01 stsp .Ar commit
463 234035bc 2019-06-01 stsp must be on a different branch than the work tree's base commit.
464 a54b6686 2019-06-28 stsp The expected argument is a reference or a commit ID SHA1 hash.
465 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
466 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
467 234035bc 2019-06-01 stsp .Pp
468 234035bc 2019-06-01 stsp Show the status of each affected file, using the following status codes:
469 234035bc 2019-06-01 stsp .Bl -column YXZ description
470 234035bc 2019-06-01 stsp .It G Ta file was merged
471 234035bc 2019-06-01 stsp .It C Ta file was merged and conflicts occurred during merge
472 234035bc 2019-06-01 stsp .It ! Ta changes destined for a missing file were not merged
473 234035bc 2019-06-01 stsp .It D Ta file was deleted
474 2b92fad7 2019-06-02 stsp .It d Ta file's deletion was obstructed by local modifications
475 234035bc 2019-06-01 stsp .It A Ta new file was added
476 2b92fad7 2019-06-02 stsp .It ~ Ta changes destined for a non-regular file were not merged
477 74416c47 2019-05-09 stsp .El
478 234035bc 2019-06-01 stsp .Pp
479 234035bc 2019-06-01 stsp The merged changes will appear as local changes in the work tree, which
480 234035bc 2019-06-01 stsp may be viewed with
481 234035bc 2019-06-01 stsp .Cm got diff ,
482 234035bc 2019-06-01 stsp amended manually or with further
483 234035bc 2019-06-01 stsp .Cm got cherrypick
484 234035bc 2019-06-01 stsp comands,
485 234035bc 2019-06-01 stsp committed with
486 234035bc 2019-06-01 stsp .Cm got commit ,
487 234035bc 2019-06-01 stsp or discarded again with
488 234035bc 2019-06-01 stsp .Cm got revert .
489 234035bc 2019-06-01 stsp .Pp
490 234035bc 2019-06-01 stsp .Cm got cherrypick
491 234035bc 2019-06-01 stsp will refuse to run if certain preconditions are not met.
492 234035bc 2019-06-01 stsp If the work tree contains multiple base commits it must first be updated
493 234035bc 2019-06-01 stsp to a single base commit with
494 234035bc 2019-06-01 stsp .Cm got update .
495 234035bc 2019-06-01 stsp If the work tree already contains files with merge conflicts, these
496 234035bc 2019-06-01 stsp conflicts must be resolved first.
497 016477fd 2019-07-09 stsp .It Cm cy
498 97b3a7be 2019-07-09 stsp Short alias for
499 97b3a7be 2019-07-09 stsp .Cm cherrypick .
500 5ef14e63 2019-06-02 stsp .It Cm backout Ar commit
501 5ef14e63 2019-06-02 stsp Reverse-merge changes from a single
502 5ef14e63 2019-06-02 stsp .Ar commit
503 5ef14e63 2019-06-02 stsp into the work tree.
504 5ef14e63 2019-06-02 stsp The specified
505 5ef14e63 2019-06-02 stsp .Ar commit
506 5ef14e63 2019-06-02 stsp must be on the same branch as the work tree's base commit.
507 a54b6686 2019-06-28 stsp The expected argument is a reference or a commit ID SHA1 hash.
508 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
509 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
510 5ef14e63 2019-06-02 stsp .Pp
511 5ef14e63 2019-06-02 stsp Show the status of each affected file, using the following status codes:
512 5ef14e63 2019-06-02 stsp .Bl -column YXZ description
513 5ef14e63 2019-06-02 stsp .It G Ta file was merged
514 5ef14e63 2019-06-02 stsp .It C Ta file was merged and conflicts occurred during merge
515 5ef14e63 2019-06-02 stsp .It ! Ta changes destined for a missing file were not merged
516 5ef14e63 2019-06-02 stsp .It D Ta file was deleted
517 5ef14e63 2019-06-02 stsp .It d Ta file's deletion was obstructed by local modifications
518 5ef14e63 2019-06-02 stsp .It A Ta new file was added
519 5ef14e63 2019-06-02 stsp .It ~ Ta changes destined for a non-regular file were not merged
520 234035bc 2019-06-01 stsp .El
521 5ef14e63 2019-06-02 stsp .Pp
522 5ef14e63 2019-06-02 stsp The reverse-merged changes will appear as local changes in the work tree,
523 5ef14e63 2019-06-02 stsp which may be viewed with
524 5ef14e63 2019-06-02 stsp .Cm got diff ,
525 5ef14e63 2019-06-02 stsp amended manually or with further
526 778a73c2 2019-07-12 stsp .Cm got backout
527 5ef14e63 2019-06-02 stsp comands,
528 5ef14e63 2019-06-02 stsp committed with
529 5ef14e63 2019-06-02 stsp .Cm got commit ,
530 5ef14e63 2019-06-02 stsp or discarded again with
531 5ef14e63 2019-06-02 stsp .Cm got revert .
532 5ef14e63 2019-06-02 stsp .Pp
533 92228c38 2019-06-02 stsp .Cm got backout
534 92228c38 2019-06-02 stsp will refuse to run if certain preconditions are not met.
535 92228c38 2019-06-02 stsp If the work tree contains multiple base commits it must first be updated
536 92228c38 2019-06-02 stsp to a single base commit with
537 92228c38 2019-06-02 stsp .Cm got update .
538 92228c38 2019-06-02 stsp If the work tree already contains files with merge conflicts, these
539 92228c38 2019-06-02 stsp conflicts must be resolved first.
540 97b3a7be 2019-07-09 stsp .It Cm bo
541 97b3a7be 2019-07-09 stsp Short alias for
542 97b3a7be 2019-07-09 stsp .Cm backout .
543 818c7501 2019-07-11 stsp .It Cm rebase Ar branch
544 818c7501 2019-07-11 stsp Rebase commits on the specified
545 818c7501 2019-07-11 stsp .Ar branch
546 818c7501 2019-07-11 stsp onto the tip of the current branch of the work tree.
547 818c7501 2019-07-11 stsp The
548 818c7501 2019-07-11 stsp .Ar branch
549 818c7501 2019-07-11 stsp must share common ancestry with the work tree's current branch.
550 f09e2405 2019-07-11 stsp Rebasing begins with the first descendent commit of the youngest
551 f09e2405 2019-07-11 stsp common ancestor commit shared by the specified
552 818c7501 2019-07-11 stsp .Ar branch
553 818c7501 2019-07-11 stsp and the work tree's current branch, and stops once the tip commit
554 f09e2405 2019-07-11 stsp of the specified
555 818c7501 2019-07-11 stsp .Ar branch
556 f09e2405 2019-07-11 stsp has been rebased.
557 818c7501 2019-07-11 stsp .Pp
558 818c7501 2019-07-11 stsp Rebased commits are accumulated on a temporary branch and represent
559 f09e2405 2019-07-11 stsp the same changes with the same log messages as their counterparts
560 f09e2405 2019-07-11 stsp on the original
561 818c7501 2019-07-11 stsp .Ar branch ,
562 818c7501 2019-07-11 stsp but with different commit IDs.
563 818c7501 2019-07-11 stsp Once rebasing has completed successfully, the temporary branch becomes
564 f09e2405 2019-07-11 stsp the new version of the specified
565 818c7501 2019-07-11 stsp .Ar branch
566 818c7501 2019-07-11 stsp and the work tree is automatically switched to it.
567 818c7501 2019-07-11 stsp .Pp
568 818c7501 2019-07-11 stsp While rebasing commits, show the status of each affected file,
569 818c7501 2019-07-11 stsp using the following status codes:
570 818c7501 2019-07-11 stsp .Bl -column YXZ description
571 818c7501 2019-07-11 stsp .It G Ta file was merged
572 818c7501 2019-07-11 stsp .It C Ta file was merged and conflicts occurred during merge
573 818c7501 2019-07-11 stsp .It ! Ta changes destined for a missing file were not merged
574 818c7501 2019-07-11 stsp .It D Ta file was deleted
575 818c7501 2019-07-11 stsp .It d Ta file's deletion was obstructed by local modifications
576 818c7501 2019-07-11 stsp .It A Ta new file was added
577 818c7501 2019-07-11 stsp .It ~ Ta changes destined for a non-regular file were not merged
578 5ef14e63 2019-06-02 stsp .El
579 818c7501 2019-07-11 stsp .Pp
580 f09e2405 2019-07-11 stsp If merge conflicts occur the rebase operation is interrupted and may
581 f09e2405 2019-07-11 stsp be continued once conflicts have been resolved.
582 818c7501 2019-07-11 stsp Alternatively, the rebase operation may be aborted which will leave
583 818c7501 2019-07-11 stsp .Ar branch
584 818c7501 2019-07-11 stsp unmodified and the work tree switched back to its original branch.
585 818c7501 2019-07-11 stsp .Pp
586 ff0d2220 2019-07-11 stsp If a merge conflict is resolved in a way which renders the merged
587 f09e2405 2019-07-11 stsp change into a no-op change, the corresponding commit will be elided
588 f09e2405 2019-07-11 stsp when the rebase operation continues.
589 ff0d2220 2019-07-11 stsp .Pp
590 818c7501 2019-07-11 stsp .Cm got rebase
591 818c7501 2019-07-11 stsp will refuse to run if certain preconditions are not met.
592 818c7501 2019-07-11 stsp If the work tree contains multiple base commits it must first be updated
593 818c7501 2019-07-11 stsp to a single base commit with
594 818c7501 2019-07-11 stsp .Cm got update .
595 f09e2405 2019-07-11 stsp If the work tree contains local changes, these changes must first be
596 f09e2405 2019-07-11 stsp committed with
597 f09e2405 2019-07-11 stsp .Cm got commit
598 f09e2405 2019-07-11 stsp or reverted with
599 f09e2405 2019-07-11 stsp .Cm got revert .
600 64c6d990 2019-07-11 stsp If the
601 64c6d990 2019-07-11 stsp .Ar branch
602 64c6d990 2019-07-11 stsp contains changes to files outside of the work tree's path prefix,
603 64c6d990 2019-07-11 stsp the work tree cannot be used to rebase this branch.
604 818c7501 2019-07-11 stsp .Pp
605 7d5807f4 2019-07-11 stsp The
606 7d5807f4 2019-07-11 stsp .Cm got update
607 7d5807f4 2019-07-11 stsp and
608 7d5807f4 2019-07-11 stsp .Cm got commit
609 7d5807f4 2019-07-11 stsp commands will refuse to run while a rebase operation is in progress.
610 7d5807f4 2019-07-11 stsp Other commands which manipulate the work tree may be used for
611 7d5807f4 2019-07-11 stsp conflict resolution purposes.
612 818c7501 2019-07-11 stsp .Pp
613 818c7501 2019-07-11 stsp The options for
614 818c7501 2019-07-11 stsp .Cm got rebase
615 818c7501 2019-07-11 stsp are as follows:
616 818c7501 2019-07-11 stsp .Bl -tag -width Ds
617 818c7501 2019-07-11 stsp .It Fl a
618 818c7501 2019-07-11 stsp Abort an interrupted rebase operation.
619 818c7501 2019-07-11 stsp .It Fl c
620 06067b48 2019-07-11 stsp Continue an interrupted rebase operation.
621 818c7501 2019-07-11 stsp .El
622 818c7501 2019-07-11 stsp .It Cm rb
623 818c7501 2019-07-11 stsp Short alias for
624 818c7501 2019-07-11 stsp .Cm rebase .
625 818c7501 2019-07-11 stsp .El
626 74416c47 2019-05-09 stsp .Sh ENVIRONMENT
627 74416c47 2019-05-09 stsp .Bl -tag -width GOT_AUTHOR
628 74416c47 2019-05-09 stsp .It Ev GOT_AUTHOR
629 74416c47 2019-05-09 stsp The author's name and email address for
630 74416c47 2019-05-09 stsp .Cm got commit ,
631 74416c47 2019-05-09 stsp for example:
632 74416c47 2019-05-09 stsp .An Stefan Sperling Aq Mt stsp@openbsd.org
633 23594da9 2019-05-13 stsp .It Ev VISUAL, Ev EDITOR
634 23594da9 2019-05-13 stsp The editor spawned by
635 23594da9 2019-05-13 stsp .Cm got commit .
636 74416c47 2019-05-09 stsp .El
637 5c860e29 2018-03-12 stsp .Sh EXIT STATUS
638 5c860e29 2018-03-12 stsp .Ex -std got
639 97925469 2018-03-17 stsp .Sh EXAMPLES
640 97925469 2018-03-17 stsp .Pp
641 fa6e0e48 2019-05-23 stsp Clone an existing Git repository for use with
642 fa6e0e48 2019-05-23 stsp .Nm .
643 fa6e0e48 2019-05-23 stsp This step currently requires
644 fa6e0e48 2019-05-23 stsp .Xr git 1 :
645 d83d9d5c 2019-05-13 stsp .Pp
646 fa6e0e48 2019-05-23 stsp .Dl $ cd /var/git/
647 fa6e0e48 2019-05-23 stsp .Dl $ git clone --bare https://github.com/openbsd/src.git
648 fa6e0e48 2019-05-23 stsp .Pp
649 fa6e0e48 2019-05-23 stsp Check out a work tree from this Git repository to /usr/src:
650 fa6e0e48 2019-05-23 stsp .Pp
651 fa6e0e48 2019-05-23 stsp .Dl $ got checkout /var/git/src.git /usr/src
652 fa6e0e48 2019-05-23 stsp .Pp
653 e70c17ce 2019-05-22 stsp View local changes in a work tree directory:
654 e70c17ce 2019-05-22 stsp .Pp
655 e70c17ce 2019-05-22 stsp .Dl $ got status
656 e70c17ce 2019-05-22 stsp .Dl $ got diff | less
657 e70c17ce 2019-05-22 stsp .Pp
658 e70c17ce 2019-05-22 stsp In a work tree or a git repository directory, list all branch references:
659 e70c17ce 2019-05-22 stsp .Pp
660 4e759de4 2019-06-26 stsp .Dl $ got branch -l
661 e70c17ce 2019-05-22 stsp .Pp
662 fa6e0e48 2019-05-23 stsp In a work tree or a git repository directory, create a new branch called
663 e70c17ce 2019-05-22 stsp .Dq unified-buffer-cache
664 d83d9d5c 2019-05-13 stsp which is forked off the
665 d83d9d5c 2019-05-13 stsp .Dq master
666 d83d9d5c 2019-05-13 stsp branch:
667 d83d9d5c 2019-05-13 stsp .Pp
668 4e759de4 2019-06-26 stsp .Dl $ got branch unified-buffer-cache master
669 e70c17ce 2019-05-22 stsp .Pp
670 e70c17ce 2019-05-22 stsp Switch an existing work tree to the branch
671 e70c17ce 2019-05-22 stsp .Dq unified-buffer-cache .
672 e70c17ce 2019-05-22 stsp Local changes in the work tree will be preserved and merged if necessary:
673 e70c17ce 2019-05-22 stsp .Pp
674 e70c17ce 2019-05-22 stsp .Dl $ got update -b unified-buffer-cache
675 e70c17ce 2019-05-22 stsp .Pp
676 fa6e0e48 2019-05-23 stsp Create a new commit from local changes in a work tree directory.
677 fa6e0e48 2019-05-23 stsp This new commit will become the head commit of the work tree's current branch:
678 fa6e0e48 2019-05-23 stsp .Pp
679 fa6e0e48 2019-05-23 stsp .Dl $ got commit
680 fa6e0e48 2019-05-23 stsp .Pp
681 fa6e0e48 2019-05-23 stsp In a work tree or a git repository directory, view changes committed in
682 fa6e0e48 2019-05-23 stsp the 3 most recent commits to the work tree's branch, or the branch resolved
683 fa6e0e48 2019-05-23 stsp via the repository's HEAD reference, respectively:
684 fa6e0e48 2019-05-23 stsp .Pp
685 fa6e0e48 2019-05-23 stsp .Dl $ got log -p -l 3 -b
686 fa6e0e48 2019-05-23 stsp .Pp
687 e70c17ce 2019-05-22 stsp Add new files and remove obsolete files in a work tree directory:
688 e70c17ce 2019-05-22 stsp .Pp
689 fa6e0e48 2019-05-23 stsp .Dl $ got add sys/uvm/uvm_ubc.c
690 86d25a1b 2019-07-11 stsp .Dl $ got remove sys/uvm/uvm_vnode.c
691 e70c17ce 2019-05-22 stsp .Pp
692 e70c17ce 2019-05-22 stsp Create a new commit from local changes in a work tree directory
693 e70c17ce 2019-05-22 stsp with a pre-defined log message.
694 e70c17ce 2019-05-22 stsp .Pp
695 e70c17ce 2019-05-22 stsp .Dl $ got commit -m 'unify the buffer cache'
696 e70c17ce 2019-05-22 stsp .Pp
697 e70c17ce 2019-05-22 stsp Update any work tree checked out from the
698 e70c17ce 2019-05-22 stsp .Dq unified-buffer-cache
699 e70c17ce 2019-05-22 stsp branch to the latest commit on this branch:
700 fa6e0e48 2019-05-23 stsp .Pp
701 fa6e0e48 2019-05-23 stsp .Dl $ got update
702 e70c17ce 2019-05-22 stsp .Pp
703 9221fb1e 2019-06-26 stsp Fetch new upstream commits into the local repository's master branch.
704 9221fb1e 2019-06-26 stsp This step currently requires
705 9221fb1e 2019-06-26 stsp .Xr git 1 :
706 fa6e0e48 2019-05-23 stsp .Pp
707 fa6e0e48 2019-05-23 stsp .Dl $ cd /var/git/src.git
708 fa6e0e48 2019-05-23 stsp .Dl $ git fetch origin master:master
709 fa6e0e48 2019-05-23 stsp .Pp
710 fa6e0e48 2019-05-23 stsp Rebase the
711 fa6e0e48 2019-05-23 stsp .Dq unified-buffer-cache
712 fa6e0e48 2019-05-23 stsp branch on top of the new head commit of the
713 fa6e0e48 2019-05-23 stsp .Dq master
714 fa6e0e48 2019-05-23 stsp branch.
715 fa6e0e48 2019-05-23 stsp .Pp
716 818c7501 2019-07-11 stsp .Dl $ got update -b master
717 818c7501 2019-07-11 stsp .Dl $ got rebase unified-buffer-cache
718 5c860e29 2018-03-12 stsp .Sh SEE ALSO
719 5e5560e1 2018-08-01 stsp .Xr git-repository 5
720 285dc8a4 2018-03-13 stsp .Xr got-worktree 5
721 1a208aaf 2018-04-01 stsp .Sh AUTHORS
722 1a208aaf 2018-04-01 stsp .An Stefan Sperling Aq Mt stsp@openbsd.org
723 1a208aaf 2018-04-01 stsp .An Martin Pieuchot Aq Mt mpi@openbsd.org
724 72e28b48 2019-05-14 stsp .An joshua stein Aq Mt jcs@openbsd.org
725 fa6e0e48 2019-05-23 stsp .Sh CAVEATS
726 fa6e0e48 2019-05-23 stsp .Nm
727 fa6e0e48 2019-05-23 stsp is a work-in-progress and many commands remain to be implemented.
728 fa6e0e48 2019-05-23 stsp At present, the user has to fall back on
729 fa6e0e48 2019-05-23 stsp .Xr git 1
730 fa6e0e48 2019-05-23 stsp to perform many basic tasks.
731 fa6e0e48 2019-05-23 stsp .Pp
732 fa6e0e48 2019-05-23 stsp When working against a repository created with
733 fa6e0e48 2019-05-23 stsp .Dq git clone --bare ,
734 fa6e0e48 2019-05-23 stsp local commits to the
735 fa6e0e48 2019-05-23 stsp .Dq master
736 fa6e0e48 2019-05-23 stsp branch are discouraged, for now, if changes committed to the upstream
737 fa6e0e48 2019-05-23 stsp repository need to be tracked.
738 fa6e0e48 2019-05-23 stsp See the EXAMPLES section.