Blame


1 5c860e29 2018-03-12 stsp .\"
2 5c860e29 2018-03-12 stsp .\" Copyright (c) 2017 Martin Pieuchot
3 5aa81393 2020-01-06 stsp .\" Copyright (c) 2018, 2019, 2020 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 8e13c46f 2019-08-05 stsp .Nd Game of Trees
23 5c860e29 2018-03-12 stsp .Sh SYNOPSIS
24 0bb8a95e 2018-03-12 stsp .Nm
25 0a58e722 2022-10-04 thomas .Op Fl hV
26 5c860e29 2018-03-12 stsp .Ar command
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 bc3056e3 2019-08-18 stsp Global options must precede 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 fef8a0d3 2019-08-04 stsp Display usage information and exit immediately.
57 1795b260 2021-04-02 kn .It Fl V , -version
58 53ccebc2 2019-07-30 stsp Display program version and exit immediately.
59 1b6b95a8 2018-03-12 stsp .El
60 1b6b95a8 2018-03-12 stsp .Pp
61 38e11793 2018-06-13 stsp The commands for
62 38e11793 2018-06-13 stsp .Nm
63 38e11793 2018-06-13 stsp are as follows:
64 0bb8a95e 2018-03-12 stsp .Bl -tag -width checkout
65 e8aa341a 2021-10-08 thomas .Tg im
66 56c96eff 2022-08-30 thomas .It Xo
67 56c96eff 2022-08-30 thomas .Cm import
68 56c96eff 2022-08-30 thomas .Op Fl b Ar branch
69 56c96eff 2022-08-30 thomas .Op Fl I Ar pattern
70 56c96eff 2022-08-30 thomas .Op Fl m Ar message
71 56c96eff 2022-08-30 thomas .Op Fl r Ar repository-path
72 56c96eff 2022-08-30 thomas .Ar directory
73 56c96eff 2022-08-30 thomas .Xc
74 d912d125 2021-11-04 thomas .Dl Pq alias: Cm im
75 3ce1b845 2019-07-15 stsp Create an initial commit in a repository from the file hierarchy
76 3ce1b845 2019-07-15 stsp within the specified
77 3ce1b845 2019-07-15 stsp .Ar directory .
78 3ce1b845 2019-07-15 stsp The created commit will not have any parent commits, i.e. it will be a
79 3ce1b845 2019-07-15 stsp root commit.
80 3ce1b845 2019-07-15 stsp Also create a new reference which provides a branch name for the newly
81 3ce1b845 2019-07-15 stsp created commit.
82 21a44f98 2019-07-15 stsp Show the path of each imported file to indicate progress.
83 3ce1b845 2019-07-15 stsp .Pp
84 21a44f98 2019-07-15 stsp The
85 21a44f98 2019-07-15 stsp .Cm got import
86 21a44f98 2019-07-15 stsp command requires the
87 21a44f98 2019-07-15 stsp .Ev GOT_AUTHOR
88 aba9c984 2019-09-08 stsp environment variable to be set,
89 257add31 2020-09-09 stsp unless an author has been configured in
90 257add31 2020-09-09 stsp .Xr got.conf 5
91 257add31 2020-09-09 stsp or Git's
92 aba9c984 2019-09-08 stsp .Dv user.name
93 aba9c984 2019-09-08 stsp and
94 709ae9eb 2019-09-08 stsp .Dv user.email
95 709ae9eb 2019-09-08 stsp configuration settings can be obtained from the repository's
96 aba9c984 2019-09-08 stsp .Pa .git/config
97 c9956ddf 2019-09-08 stsp file or from Git's global
98 c9956ddf 2019-09-08 stsp .Pa ~/.gitconfig
99 c9956ddf 2019-09-08 stsp configuration file.
100 3ce1b845 2019-07-15 stsp .Pp
101 3ce1b845 2019-07-15 stsp The options for
102 3ce1b845 2019-07-15 stsp .Cm got import
103 3ce1b845 2019-07-15 stsp are as follows:
104 3ce1b845 2019-07-15 stsp .Bl -tag -width Ds
105 3ce1b845 2019-07-15 stsp .It Fl b Ar branch
106 3ce1b845 2019-07-15 stsp Create the specified
107 e9424ba1 2022-09-20 thomas .Ar branch .
108 e9424ba1 2022-09-20 thomas If this option is not specified, a branch corresponding to the repository's
109 e9424ba1 2022-09-20 thomas HEAD reference will be used.
110 e9424ba1 2022-09-20 thomas Use of this option is required if the branch resolved via the repository's
111 e9424ba1 2022-09-20 thomas HEAD reference already exists.
112 d6506a3d 2022-08-16 thomas .It Fl I Ar pattern
113 d6506a3d 2022-08-16 thomas Ignore files or directories with a name which matches the specified
114 d6506a3d 2022-08-16 thomas .Ar pattern .
115 d6506a3d 2022-08-16 thomas This option may be specified multiple times to build a list of ignore patterns.
116 d6506a3d 2022-08-16 thomas The
117 d6506a3d 2022-08-16 thomas .Ar pattern
118 d6506a3d 2022-08-16 thomas follows the globbing rules documented in
119 d6506a3d 2022-08-16 thomas .Xr glob 7 .
120 e012cf94 2023-02-07 thomas Ignore patterns which end with a slash,
121 e012cf94 2023-02-07 thomas .Dq / ,
122 e012cf94 2023-02-07 thomas will only match directories.
123 3ce1b845 2019-07-15 stsp .It Fl m Ar message
124 3ce1b845 2019-07-15 stsp Use the specified log message when creating the new commit.
125 3ce1b845 2019-07-15 stsp Without the
126 3ce1b845 2019-07-15 stsp .Fl m
127 3ce1b845 2019-07-15 stsp option,
128 3ce1b845 2019-07-15 stsp .Cm got import
129 3ce1b845 2019-07-15 stsp opens a temporary file in an editor where a log message can be written.
130 3ce1b845 2019-07-15 stsp .It Fl r Ar repository-path
131 3ce1b845 2019-07-15 stsp Use the repository at the specified path.
132 3ce1b845 2019-07-15 stsp If not specified, assume the repository is located at or above the current
133 3ce1b845 2019-07-15 stsp working directory.
134 3ce1b845 2019-07-15 stsp .El
135 e8aa341a 2021-10-08 thomas .Tg cl
136 56c96eff 2022-08-30 thomas .It Xo
137 56c96eff 2022-08-30 thomas .Cm clone
138 56c96eff 2022-08-30 thomas .Op Fl almqv
139 56c96eff 2022-08-30 thomas .Op Fl b Ar branch
140 56c96eff 2022-08-30 thomas .Op Fl R Ar reference
141 56c96eff 2022-08-30 thomas .Ar repository-URL
142 56c96eff 2022-08-30 thomas .Op Ar directory
143 56c96eff 2022-08-30 thomas .Xc
144 d912d125 2021-11-04 thomas .Dl Pq alias: Cm cl
145 2ab43947 2020-03-18 stsp Clone a Git repository at the specified
146 2ab43947 2020-03-18 stsp .Ar repository-URL
147 2ab43947 2020-03-18 stsp into the specified
148 3493b628 2020-03-20 stsp .Ar directory .
149 2ab43947 2020-03-18 stsp If no
150 3493b628 2020-03-20 stsp .Ar directory
151 4b06140e 2022-03-22 thomas is specified, the directory name will be derived from the name of the
152 2ab43947 2020-03-18 stsp cloned repository.
153 2ab43947 2020-03-18 stsp .Cm got clone
154 2ab43947 2020-03-18 stsp will refuse to run if the
155 3493b628 2020-03-20 stsp .Ar directory
156 2ab43947 2020-03-18 stsp already exists.
157 2ab43947 2020-03-18 stsp .Pp
158 2ab43947 2020-03-18 stsp The
159 2ab43947 2020-03-18 stsp .Ar repository-URL
160 619eb6dd 2020-03-20 stsp specifies a protocol scheme, a server hostname, an optional port number
161 619eb6dd 2020-03-20 stsp separated from the hostname by a colon, and a path to the repository on
162 619eb6dd 2020-03-20 stsp the server:
163 619eb6dd 2020-03-20 stsp .Lk scheme://hostname:port/path/to/repository
164 2ab43947 2020-03-18 stsp .Pp
165 2ab43947 2020-03-18 stsp The following protocol schemes are supported:
166 2ab43947 2020-03-18 stsp .Bl -tag -width git+ssh
167 2ab43947 2020-03-18 stsp .It git
168 2ab43947 2020-03-18 stsp The Git protocol as implemented by the
169 2ab43947 2020-03-18 stsp .Xr git-daemon 1
170 2ab43947 2020-03-18 stsp server.
171 10c073e7 2020-03-20 stsp Use of this protocol is discouraged since it supports neither authentication
172 10c073e7 2020-03-20 stsp nor encryption.
173 2ab43947 2020-03-18 stsp .It git+ssh
174 2ab43947 2020-03-18 stsp The Git protocol wrapped in an authenticated and encrypted
175 2ab43947 2020-03-18 stsp .Xr ssh 1
176 2ab43947 2020-03-18 stsp tunnel.
177 2ab43947 2020-03-18 stsp With this protocol the hostname may contain an embedded username for
178 2ab43947 2020-03-18 stsp .Xr ssh 1
179 2ab43947 2020-03-18 stsp to use:
180 2ab43947 2020-03-18 stsp .Mt user@hostname
181 2ab43947 2020-03-18 stsp .It ssh
182 2ab43947 2020-03-18 stsp Short alias for git+ssh.
183 2ab43947 2020-03-18 stsp .El
184 89c3c67b 2020-03-20 stsp .Pp
185 89c3c67b 2020-03-20 stsp Objects in the cloned repository are stored in a pack file which is downloaded
186 89c3c67b 2020-03-20 stsp from the server.
187 89c3c67b 2020-03-20 stsp This pack file will then be indexed to facilitate access to the objects stored
188 89c3c67b 2020-03-20 stsp within.
189 89c3c67b 2020-03-20 stsp If any objects in the pack file are stored in deltified form, all deltas will
190 89c3c67b 2020-03-20 stsp be fully resolved in order to compute the ID of such objects.
191 89c3c67b 2020-03-20 stsp This can take some time.
192 010f7279 2020-03-20 stsp More details about the pack file format are documented in
193 010f7279 2020-03-20 stsp .Xr git-repository 5 .
194 2ab43947 2020-03-18 stsp .Pp
195 7848a0e1 2020-03-19 stsp .Cm got clone
196 7848a0e1 2020-03-19 stsp creates a remote repository entry in the
197 257add31 2020-09-09 stsp .Xr got.conf 5
198 257add31 2020-09-09 stsp and
199 7848a0e1 2020-03-19 stsp .Pa config
200 257add31 2020-09-09 stsp files of the cloned repository to store the
201 7848a0e1 2020-03-19 stsp .Ar repository-url
202 99495ddb 2021-01-10 stsp and any
203 15d3c221 2021-01-05 stsp .Ar branch
204 99495ddb 2021-01-10 stsp or
205 99495ddb 2021-01-10 stsp .Ar reference
206 132af4a5 2021-01-05 stsp arguments for future use by
207 7848a0e1 2020-03-19 stsp .Cm got fetch
208 fc24bb3a 2020-03-21 stsp or
209 7848a0e1 2020-03-19 stsp .Xr git-fetch 1 .
210 7848a0e1 2020-03-19 stsp .Pp
211 2ab43947 2020-03-18 stsp The options for
212 2ab43947 2020-03-18 stsp .Cm got clone
213 2ab43947 2020-03-18 stsp are as follows:
214 2ab43947 2020-03-18 stsp .Bl -tag -width Ds
215 659e7fbd 2020-03-20 stsp .It Fl a
216 1d4b192f 2020-03-21 stsp Fetch all branches from the remote repository's
217 1d4b192f 2020-03-21 stsp .Dq refs/heads/
218 5aa20203 2021-01-05 stsp reference namespace and set
219 25eb5847 2022-07-03 thomas .Cm fetch_all_branches
220 5aa20203 2021-01-05 stsp in the cloned repository's
221 5aa20203 2021-01-05 stsp .Xr got.conf 5
222 5aa20203 2021-01-05 stsp file for future use by
223 5aa20203 2021-01-05 stsp .Cm got fetch .
224 4ba14133 2020-03-20 stsp If this option is not specified, a branch resolved via the remote
225 4ba14133 2020-03-20 stsp repository's HEAD reference will be fetched.
226 4ba14133 2020-03-20 stsp Cannot be used together with the
227 4ba14133 2020-03-20 stsp .Fl b
228 4ba14133 2020-03-20 stsp option.
229 4ba14133 2020-03-20 stsp .It Fl b Ar branch
230 4ba14133 2020-03-20 stsp Fetch the specified
231 4ba14133 2020-03-20 stsp .Ar branch
232 1d4b192f 2020-03-21 stsp from the remote repository's
233 1d4b192f 2020-03-21 stsp .Dq refs/heads/
234 1d4b192f 2020-03-21 stsp reference namespace.
235 4ba14133 2020-03-20 stsp This option may be specified multiple times to build a list of branches
236 4ba14133 2020-03-20 stsp to fetch.
237 4ba14133 2020-03-20 stsp If the branch corresponding to the remote repository's HEAD reference is not
238 4ba14133 2020-03-20 stsp in this list, the cloned repository's HEAD reference will be set to the first
239 4ba14133 2020-03-20 stsp branch which was fetched.
240 4ba14133 2020-03-20 stsp If this option is not specified, a branch resolved via the remote
241 4ba14133 2020-03-20 stsp repository's HEAD reference will be fetched.
242 4ba14133 2020-03-20 stsp Cannot be used together with the
243 4ba14133 2020-03-20 stsp .Fl a
244 4ba14133 2020-03-20 stsp option.
245 41b0de12 2020-03-21 stsp .It Fl l
246 a18cccf9 2020-03-21 stsp List branches and tags available for fetching from the remote repository
247 41b0de12 2020-03-21 stsp and exit immediately.
248 41b0de12 2020-03-21 stsp Cannot be used together with any of the other options except
249 a5a46be2 2021-01-27 stsp .Fl q
250 a5a46be2 2021-01-27 stsp and
251 41b0de12 2020-03-21 stsp .Fl v .
252 469dd726 2020-03-20 stsp .It Fl m
253 469dd726 2020-03-20 stsp Create the cloned repository as a mirror of the original repository.
254 469dd726 2020-03-20 stsp This is useful if the cloned repository will not be used to store
255 bd81cfb7 2020-04-19 stsp locally created commits.
256 469dd726 2020-03-20 stsp .Pp
257 469dd726 2020-03-20 stsp The repository's
258 257add31 2020-09-09 stsp .Xr got.conf 5
259 257add31 2020-09-09 stsp and
260 469dd726 2020-03-20 stsp .Pa config
261 257add31 2020-09-09 stsp files will be set up with the
262 469dd726 2020-03-20 stsp .Dq mirror
263 469dd726 2020-03-20 stsp option enabled, such that
264 469dd726 2020-03-20 stsp .Cm got fetch
265 469dd726 2020-03-20 stsp or
266 469dd726 2020-03-20 stsp .Xr git-fetch 1
267 bd81cfb7 2020-04-19 stsp will write incoming changes directly to branches in the
268 469dd726 2020-03-20 stsp .Dq refs/heads/
269 469dd726 2020-03-20 stsp reference namespace, rather than to branches in the
270 469dd726 2020-03-20 stsp .Dq refs/remotes/
271 469dd726 2020-03-20 stsp namespace.
272 469dd726 2020-03-20 stsp This avoids the usual requirement of having to run
273 469dd726 2020-03-20 stsp .Cm got rebase
274 469dd726 2020-03-20 stsp after
275 469dd726 2020-03-20 stsp .Cm got fetch
276 bd81cfb7 2020-04-19 stsp in order to make incoming changes appear on branches in the
277 bd81cfb7 2020-04-19 stsp .Dq refs/heads/
278 bd81cfb7 2020-04-19 stsp namespace.
279 bd81cfb7 2020-04-19 stsp But maintaining custom changes in the cloned repository becomes difficult
280 bd81cfb7 2020-04-19 stsp since such changes will be at risk of being discarded whenever incoming
281 498ef124 2020-03-21 stsp changes are fetched.
282 2ab43947 2020-03-18 stsp .It Fl q
283 2ab43947 2020-03-18 stsp Suppress progress reporting output.
284 2ab43947 2020-03-18 stsp The same option will be passed to
285 2ab43947 2020-03-18 stsp .Xr ssh 1
286 2ab43947 2020-03-18 stsp if applicable.
287 0e4002ca 2020-03-21 stsp .It Fl R Ar reference
288 0e4002ca 2020-03-21 stsp In addition to the branches and tags that will be fetched, fetch an arbitrary
289 0e4002ca 2020-03-21 stsp .Ar reference
290 0e4002ca 2020-03-21 stsp from the remote repository's
291 0e4002ca 2020-03-21 stsp .Dq refs/
292 0e4002ca 2020-03-21 stsp namespace.
293 0e4002ca 2020-03-21 stsp This option may be specified multiple times to build a list of additional
294 0e4002ca 2020-03-21 stsp references to fetch.
295 71f12362 2020-03-21 stsp The specified
296 71f12362 2020-03-21 stsp .Ar reference
297 a18cccf9 2020-03-21 stsp may either be a path to a specific reference, or a reference namespace
298 71f12362 2020-03-21 stsp which will cause all references in this namespace to be fetched.
299 0e4002ca 2020-03-21 stsp .Pp
300 71f12362 2020-03-21 stsp Each reference will be mapped into the cloned repository's
301 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
302 0e4002ca 2020-03-21 stsp namespace, unless the
303 0e4002ca 2020-03-21 stsp .Fl m
304 0e4002ca 2020-03-21 stsp option is used to mirror references directly into the cloned repository's
305 0e4002ca 2020-03-21 stsp .Dq refs/
306 0e4002ca 2020-03-21 stsp namespace.
307 0e4002ca 2020-03-21 stsp .Pp
308 0e4002ca 2020-03-21 stsp .Cm got clone
309 0e4002ca 2020-03-21 stsp will refuse to fetch references from the remote repository's
310 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
311 0e4002ca 2020-03-21 stsp or
312 0e4002ca 2020-03-21 stsp .Dq refs/got/
313 0e4002ca 2020-03-21 stsp namespace.
314 d6506a3d 2022-08-16 thomas .It Fl v
315 d6506a3d 2022-08-16 thomas Verbose mode.
316 d6506a3d 2022-08-16 thomas Causes
317 d6506a3d 2022-08-16 thomas .Cm got clone
318 d6506a3d 2022-08-16 thomas to print debugging messages to standard error output.
319 d6506a3d 2022-08-16 thomas This option will be passed to
320 d6506a3d 2022-08-16 thomas .Xr ssh 1
321 d6506a3d 2022-08-16 thomas if applicable.
322 d6506a3d 2022-08-16 thomas Multiple -v options increase the verbosity.
323 d6506a3d 2022-08-16 thomas The maximum is 3.
324 2ab43947 2020-03-18 stsp .El
325 e8aa341a 2021-10-08 thomas .Tg fe
326 56c96eff 2022-08-30 thomas .It Xo
327 56c96eff 2022-08-30 thomas .Cm fetch
328 56c96eff 2022-08-30 thomas .Op Fl adlqtvX
329 56c96eff 2022-08-30 thomas .Op Fl b Ar branch
330 56c96eff 2022-08-30 thomas .Op Fl R Ar reference
331 56c96eff 2022-08-30 thomas .Op Fl r Ar repository-path
332 56c96eff 2022-08-30 thomas .Op Ar remote-repository
333 56c96eff 2022-08-30 thomas .Xc
334 d912d125 2021-11-04 thomas .Dl Pq alias: Cm fe
335 7848a0e1 2020-03-19 stsp Fetch new changes from a remote repository.
336 7848a0e1 2020-03-19 stsp If no
337 4ba14133 2020-03-20 stsp .Ar remote-repository
338 4ba14133 2020-03-20 stsp is specified,
339 7848a0e1 2020-03-19 stsp .Dq origin
340 7848a0e1 2020-03-19 stsp will be used.
341 50b0790e 2020-09-11 stsp The remote repository's URL is obtained from the corresponding entry in
342 257add31 2020-09-09 stsp .Xr got.conf 5
343 50b0790e 2020-09-11 stsp or Git's
344 7848a0e1 2020-03-19 stsp .Pa config
345 f8ab0c60 2020-03-20 stsp file of the local repository, as created by
346 7848a0e1 2020-03-19 stsp .Cm got clone .
347 7848a0e1 2020-03-19 stsp .Pp
348 8d0dceb3 2023-02-07 thomas By default, any branches configured in
349 8d0dceb3 2023-02-07 thomas .Xr got.conf 5
350 8d0dceb3 2023-02-07 thomas for the
351 7917d6d5 2023-02-17 thomas .Ar remote-repository
352 8d0dceb3 2023-02-07 thomas will be fetched.
353 8d0dceb3 2023-02-07 thomas If
354 8d0dceb3 2023-02-07 thomas .Cm got fetch
355 8d0dceb3 2023-02-07 thomas is invoked in a work tree then this work tree's current branch will be
356 8d0dceb3 2023-02-07 thomas fetched, too, provided it is present on the server.
357 7917d6d5 2023-02-17 thomas If no branches to fetch can be found in
358 7917d6d5 2023-02-17 thomas .Xr got.conf 5
359 7917d6d5 2023-02-17 thomas or via a work tree, or said branches are not found on the server, a branch
360 7917d6d5 2023-02-17 thomas resolved via the remote repository's HEAD reference will be fetched.
361 7abf1863 2023-02-20 thomas Likewise, if a HEAD reference for the
362 7abf1863 2023-02-20 thomas .Ar remote-repository
363 7abf1863 2023-02-20 thomas exists but its target no longer matches the remote HEAD, then
364 7abf1863 2023-02-20 thomas the new target branch will be fetched.
365 8d0dceb3 2023-02-07 thomas This default behaviour can be overridden with the
366 8d0dceb3 2023-02-07 thomas .Fl a
367 8d0dceb3 2023-02-07 thomas and
368 8d0dceb3 2023-02-07 thomas .Fl b
369 8d0dceb3 2023-02-07 thomas options.
370 8d0dceb3 2023-02-07 thomas .Pp
371 89c3c67b 2020-03-20 stsp New changes will be stored in a separate pack file downloaded from the server.
372 89c3c67b 2020-03-20 stsp Optionally, separate pack files stored in the repository can be combined with
373 89c3c67b 2020-03-20 stsp .Xr git-repack 1 .
374 89c3c67b 2020-03-20 stsp .Pp
375 498ef124 2020-03-21 stsp By default, branch references in the
376 7848a0e1 2020-03-19 stsp .Dq refs/remotes/
377 498ef124 2020-03-21 stsp reference namespace will be updated to point at the newly fetched commits.
378 498ef124 2020-03-21 stsp The
379 498ef124 2020-03-21 stsp .Cm got rebase
380 bd81cfb7 2020-04-19 stsp command can then be used to make new changes visible on branches in the
381 7848a0e1 2020-03-19 stsp .Dq refs/heads/
382 bd81cfb7 2020-04-19 stsp namespace, merging incoming changes with the changes on those branches
383 bd81cfb7 2020-04-19 stsp as necessary.
384 7848a0e1 2020-03-19 stsp .Pp
385 498ef124 2020-03-21 stsp If the repository was created as a mirror with
386 4b06140e 2022-03-22 thomas .Cm got clone -m ,
387 498ef124 2020-03-21 stsp then all branches in the
388 469dd726 2020-03-20 stsp .Dq refs/heads/
389 498ef124 2020-03-21 stsp namespace will be updated directly to match the corresponding branches in
390 498ef124 2020-03-21 stsp the remote repository.
391 175367bd 2020-03-20 stsp If those branches contained local commits, these commits will no longer be
392 175367bd 2020-03-20 stsp reachable via a reference and will therefore be at risk of being discarded
393 e6786710 2021-07-03 stsp by Git's garbage collector or
394 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
395 bd81cfb7 2020-04-19 stsp Maintaining custom changes in a mirror repository is therefore discouraged.
396 469dd726 2020-03-20 stsp .Pp
397 db6d8ad8 2020-03-21 stsp In any case, references in the
398 7848a0e1 2020-03-19 stsp .Dq refs/tags/
399 db6d8ad8 2020-03-21 stsp namespace will always be fetched and mapped directly to local references
400 db6d8ad8 2020-03-21 stsp in the same namespace.
401 7848a0e1 2020-03-19 stsp .Pp
402 7848a0e1 2020-03-19 stsp The options for
403 7848a0e1 2020-03-19 stsp .Cm got fetch
404 7848a0e1 2020-03-19 stsp are as follows:
405 7848a0e1 2020-03-19 stsp .Bl -tag -width Ds
406 659e7fbd 2020-03-20 stsp .It Fl a
407 1d4b192f 2020-03-21 stsp Fetch all branches from the remote repository's
408 1d4b192f 2020-03-21 stsp .Dq refs/heads/
409 1d4b192f 2020-03-21 stsp reference namespace.
410 0c8b29c5 2021-01-05 stsp This option can be enabled by default for specific repositories in
411 0c8b29c5 2021-01-05 stsp .Xr got.conf 5 .
412 4ba14133 2020-03-20 stsp Cannot be used together with the
413 4ba14133 2020-03-20 stsp .Fl b
414 4ba14133 2020-03-20 stsp option.
415 4ba14133 2020-03-20 stsp .It Fl b Ar branch
416 4ba14133 2020-03-20 stsp Fetch the specified
417 4ba14133 2020-03-20 stsp .Ar branch
418 1d4b192f 2020-03-21 stsp from the remote repository's
419 1d4b192f 2020-03-21 stsp .Dq refs/heads/
420 1d4b192f 2020-03-21 stsp reference namespace.
421 4ba14133 2020-03-20 stsp This option may be specified multiple times to build a list of branches
422 4ba14133 2020-03-20 stsp to fetch.
423 4ba14133 2020-03-20 stsp Cannot be used together with the
424 4ba14133 2020-03-20 stsp .Fl a
425 4ba14133 2020-03-20 stsp option.
426 f21ec2f0 2020-03-21 stsp .It Fl d
427 f21ec2f0 2020-03-21 stsp Delete branches and tags from the local repository which are no longer
428 f21ec2f0 2020-03-21 stsp present in the remote repository.
429 f21ec2f0 2020-03-21 stsp Only references are deleted.
430 239821eb 2020-03-21 stsp Any commit, tree, tag, and blob objects belonging to deleted branches or
431 f21ec2f0 2020-03-21 stsp tags remain in the repository and may be removed separately with
432 e6786710 2021-07-03 stsp Git's garbage collector or
433 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
434 41b0de12 2020-03-21 stsp .It Fl l
435 41b0de12 2020-03-21 stsp List branches and tags available for fetching from the remote repository
436 41b0de12 2020-03-21 stsp and exit immediately.
437 41b0de12 2020-03-21 stsp Cannot be used together with any of the other options except
438 612392ee 2021-01-05 stsp .Fl v ,
439 612392ee 2021-01-05 stsp .Fl q ,
440 41b0de12 2020-03-21 stsp and
441 41b0de12 2020-03-21 stsp .Fl r .
442 7848a0e1 2020-03-19 stsp .It Fl q
443 7848a0e1 2020-03-19 stsp Suppress progress reporting output.
444 7848a0e1 2020-03-19 stsp The same option will be passed to
445 7848a0e1 2020-03-19 stsp .Xr ssh 1
446 7848a0e1 2020-03-19 stsp if applicable.
447 0e4002ca 2020-03-21 stsp .It Fl R Ar reference
448 0e4002ca 2020-03-21 stsp In addition to the branches and tags that will be fetched, fetch an arbitrary
449 0e4002ca 2020-03-21 stsp .Ar reference
450 0e4002ca 2020-03-21 stsp from the remote repository's
451 0e4002ca 2020-03-21 stsp .Dq refs/
452 0e4002ca 2020-03-21 stsp namespace.
453 0e4002ca 2020-03-21 stsp This option may be specified multiple times to build a list of additional
454 0e4002ca 2020-03-21 stsp references to fetch.
455 71f12362 2020-03-21 stsp The specified
456 71f12362 2020-03-21 stsp .Ar reference
457 a18cccf9 2020-03-21 stsp may either be a path to a specific reference, or a reference namespace
458 71f12362 2020-03-21 stsp which will cause all references in this namespace to be fetched.
459 0e4002ca 2020-03-21 stsp .Pp
460 0e4002ca 2020-03-21 stsp Each reference will be mapped into the local repository's
461 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
462 0e4002ca 2020-03-21 stsp namespace, unless the local repository was created as a mirror with
463 a18cccf9 2020-03-21 stsp .Cm got clone -m
464 a18cccf9 2020-03-21 stsp in which case references will be mapped directly into the local repository's
465 a18cccf9 2020-03-21 stsp .Dq refs/
466 a18cccf9 2020-03-21 stsp namespace.
467 a18cccf9 2020-03-21 stsp .Pp
468 bd81cfb7 2020-04-19 stsp Once a reference has been fetched, a branch based on it can be created with
469 0e4002ca 2020-03-21 stsp .Cm got branch
470 0e4002ca 2020-03-21 stsp if needed.
471 0e4002ca 2020-03-21 stsp .Pp
472 0e4002ca 2020-03-21 stsp .Cm got fetch
473 0e4002ca 2020-03-21 stsp will refuse to fetch references from the remote repository's
474 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
475 0e4002ca 2020-03-21 stsp or
476 0e4002ca 2020-03-21 stsp .Dq refs/got/
477 0e4002ca 2020-03-21 stsp namespace.
478 d6506a3d 2022-08-16 thomas .It Fl r Ar repository-path
479 d6506a3d 2022-08-16 thomas Use the repository at the specified path.
480 d6506a3d 2022-08-16 thomas If not specified, assume the repository is located at or above the current
481 d6506a3d 2022-08-16 thomas working directory.
482 d6506a3d 2022-08-16 thomas If this directory is a
483 d6506a3d 2022-08-16 thomas .Nm
484 d6506a3d 2022-08-16 thomas work tree, use the repository path associated with this work tree.
485 d6506a3d 2022-08-16 thomas .It Fl t
486 d6506a3d 2022-08-16 thomas Allow existing references in the
487 d6506a3d 2022-08-16 thomas .Dq refs/tags
488 d6506a3d 2022-08-16 thomas namespace to be updated if they have changed on the server.
489 d6506a3d 2022-08-16 thomas If not specified, only new tag references will be created.
490 d6506a3d 2022-08-16 thomas .It Fl v
491 d6506a3d 2022-08-16 thomas Verbose mode.
492 d6506a3d 2022-08-16 thomas Causes
493 d6506a3d 2022-08-16 thomas .Cm got fetch
494 d6506a3d 2022-08-16 thomas to print debugging messages to standard error output.
495 d6506a3d 2022-08-16 thomas The same option will be passed to
496 d6506a3d 2022-08-16 thomas .Xr ssh 1
497 d6506a3d 2022-08-16 thomas if applicable.
498 d6506a3d 2022-08-16 thomas Multiple -v options increase the verbosity.
499 d6506a3d 2022-08-16 thomas The maximum is 3.
500 161728eb 2021-07-24 stsp .It Fl X
501 161728eb 2021-07-24 stsp Delete all references which correspond to a particular
502 161728eb 2021-07-24 stsp .Ar remote-repository
503 161728eb 2021-07-24 stsp instead of fetching new changes.
504 161728eb 2021-07-24 stsp This can be useful when a remote repository is being removed from
505 161728eb 2021-07-24 stsp .Xr got.conf 5 .
506 161728eb 2021-07-24 stsp .Pp
507 161728eb 2021-07-24 stsp With
508 161728eb 2021-07-24 stsp .Fl X ,
509 161728eb 2021-07-24 stsp the
510 161728eb 2021-07-24 stsp .Ar remote-repository
511 161728eb 2021-07-24 stsp argument is mandatory and no other options except
512 161728eb 2021-07-24 stsp .Fl r ,
513 161728eb 2021-07-24 stsp .Fl v ,
514 161728eb 2021-07-24 stsp and
515 161728eb 2021-07-24 stsp .Fl q
516 161728eb 2021-07-24 stsp are allowed.
517 161728eb 2021-07-24 stsp .Pp
518 161728eb 2021-07-24 stsp Only references are deleted.
519 161728eb 2021-07-24 stsp Any commit, tree, tag, and blob objects fetched from a remote repository
520 161728eb 2021-07-24 stsp will generally be stored in pack files and may be removed separately with
521 161728eb 2021-07-24 stsp .Xr git-repack 1
522 161728eb 2021-07-24 stsp and Git's garbage collector.
523 7848a0e1 2020-03-19 stsp .El
524 e8aa341a 2021-10-08 thomas .Tg co
525 56c96eff 2022-08-30 thomas .It Xo
526 56c96eff 2022-08-30 thomas .Cm checkout
527 56c96eff 2022-08-30 thomas .Op Fl Eq
528 56c96eff 2022-08-30 thomas .Op Fl b Ar branch
529 56c96eff 2022-08-30 thomas .Op Fl c Ar commit
530 56c96eff 2022-08-30 thomas .Op Fl p Ar path-prefix
531 56c96eff 2022-08-30 thomas .Ar repository-path
532 56c96eff 2022-08-30 thomas .Op Ar work-tree-path
533 56c96eff 2022-08-30 thomas .Xc
534 d912d125 2021-11-04 thomas .Dl Pq alias: Cm co
535 0bb8a95e 2018-03-12 stsp Copy files from a repository into a new work tree.
536 bb51a5b4 2020-01-13 stsp Show the status of each affected file, using the following status codes:
537 bb51a5b4 2020-01-13 stsp .Bl -column YXZ description
538 bb51a5b4 2020-01-13 stsp .It A Ta new file was added
539 bb51a5b4 2020-01-13 stsp .It E Ta file already exists in work tree's meta-data
540 bb51a5b4 2020-01-13 stsp .El
541 bb51a5b4 2020-01-13 stsp .Pp
542 5d7c1dab 2018-04-01 stsp If the
543 5d7c1dab 2018-04-01 stsp .Ar work tree path
544 c844a238 2019-02-06 stsp is not specified, either use the last component of
545 5d7c1dab 2018-04-01 stsp .Ar repository path ,
546 5d7c1dab 2018-04-01 stsp or if a
547 5d7c1dab 2018-04-01 stsp .Ar path prefix
548 c844a238 2019-02-06 stsp was specified use the last component of
549 5d7c1dab 2018-04-01 stsp .Ar path prefix .
550 38e11793 2018-06-13 stsp .Pp
551 38e11793 2018-06-13 stsp The options for
552 38e11793 2018-06-13 stsp .Cm got checkout
553 38e11793 2018-06-13 stsp are as follows:
554 38e11793 2018-06-13 stsp .Bl -tag -width Ds
555 08573d5b 2019-05-14 stsp .It Fl b Ar branch
556 3c575567 2019-07-28 stsp Check out files from a commit on the specified
557 08573d5b 2019-05-14 stsp .Ar branch .
558 08573d5b 2019-05-14 stsp If this option is not specified, a branch resolved via the repository's HEAD
559 08573d5b 2019-05-14 stsp reference will be used.
560 8069f636 2019-01-12 stsp .It Fl c Ar commit
561 8069f636 2019-01-12 stsp Check out files from the specified
562 3c575567 2019-07-28 stsp .Ar commit
563 3c575567 2019-07-28 stsp on the selected branch.
564 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
565 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
566 0e1b0230 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
567 0e1b0230 2019-07-07 stsp automatically, provided the abbreviation is unique.
568 08573d5b 2019-05-14 stsp If this option is not specified, the most recent commit on the selected
569 08573d5b 2019-05-14 stsp branch will be used.
570 4b6c9460 2020-03-05 stsp .Pp
571 4b6c9460 2020-03-05 stsp If the specified
572 4b6c9460 2020-03-05 stsp .Ar commit
573 4b6c9460 2020-03-05 stsp is not contained in the selected branch, a different branch which contains
574 4b6c9460 2020-03-05 stsp this commit must be specified with the
575 4b6c9460 2020-03-05 stsp .Fl b
576 4b6c9460 2020-03-05 stsp option.
577 4b06140e 2022-03-22 thomas If no such branch is known, a new branch must be created for this
578 4b6c9460 2020-03-05 stsp commit with
579 4b6c9460 2020-03-05 stsp .Cm got branch
580 4b6c9460 2020-03-05 stsp before
581 4b6c9460 2020-03-05 stsp .Cm got checkout
582 4b6c9460 2020-03-05 stsp can be used.
583 4b6c9460 2020-03-05 stsp Checking out work trees with an unknown branch is intentionally not supported.
584 d6506a3d 2022-08-16 thomas .It Fl E
585 d6506a3d 2022-08-16 thomas Proceed with the checkout operation even if the directory at
586 d6506a3d 2022-08-16 thomas .Ar work-tree-path
587 d6506a3d 2022-08-16 thomas is not empty.
588 d6506a3d 2022-08-16 thomas Existing files will be left intact.
589 38e11793 2018-06-13 stsp .It Fl p Ar path-prefix
590 38e11793 2018-06-13 stsp Restrict the work tree to a subset of the repository's tree hierarchy.
591 38e11793 2018-06-13 stsp Only files beneath the specified
592 38e11793 2018-06-13 stsp .Ar path-prefix
593 38e11793 2018-06-13 stsp will be checked out.
594 4ad4a1ec 2021-09-13 tracey .It Fl q
595 4ad4a1ec 2021-09-13 tracey Silence progress output.
596 38e11793 2018-06-13 stsp .El
597 e8aa341a 2021-10-08 thomas .Tg up
598 56c96eff 2022-08-30 thomas .It Xo
599 56c96eff 2022-08-30 thomas .Cm update
600 56c96eff 2022-08-30 thomas .Op Fl q
601 56c96eff 2022-08-30 thomas .Op Fl b Ar branch
602 56c96eff 2022-08-30 thomas .Op Fl c Ar commit
603 56c96eff 2022-08-30 thomas .Op Ar path ...
604 56c96eff 2022-08-30 thomas .Xc
605 d912d125 2021-11-04 thomas .Dl Pq alias: Cm up
606 4f331d3a 2020-04-01 stsp Update an existing work tree to a different
607 4f331d3a 2020-04-01 stsp .Ar commit .
608 4f331d3a 2020-04-01 stsp Change existing files in the work tree as necessary to match file contents
609 4f331d3a 2020-04-01 stsp of this commit.
610 4f331d3a 2020-04-01 stsp Preserve any local changes in the work tree and merge them with the
611 4f331d3a 2020-04-01 stsp incoming changes.
612 4f331d3a 2020-04-01 stsp .Pp
613 5036ab18 2020-04-18 stsp Files which already contain merge conflicts will not be updated to avoid
614 5036ab18 2020-04-18 stsp further complications.
615 5036ab18 2020-04-18 stsp Such files will be updated when
616 5036ab18 2020-04-18 stsp .Cm got update
617 5036ab18 2020-04-18 stsp is run again after merge conflicts have been resolved.
618 4b06140e 2022-03-22 thomas If the conflicting changes are no longer needed, affected files can be
619 5036ab18 2020-04-18 stsp reverted with
620 5036ab18 2020-04-18 stsp .Cm got revert
621 5036ab18 2020-04-18 stsp before running
622 5036ab18 2020-04-18 stsp .Cm got update
623 5036ab18 2020-04-18 stsp again.
624 5036ab18 2020-04-18 stsp .Pp
625 7f838b36 2019-02-08 stsp Show the status of each affected file, using the following status codes:
626 7f838b36 2019-02-08 stsp .Bl -column YXZ description
627 7f838b36 2019-02-08 stsp .It U Ta file was updated and contained no local changes
628 7f838b36 2019-02-08 stsp .It G Ta file was updated and local changes were merged cleanly
629 7f838b36 2019-02-08 stsp .It C Ta file was updated and conflicts occurred during merge
630 7f838b36 2019-02-08 stsp .It D Ta file was deleted
631 9f323212 2023-03-10 thomas .It d Ta file's deletion was prevented by local modifications
632 7f838b36 2019-02-08 stsp .It A Ta new file was added
633 1dd86744 2019-08-12 anthony .It \(a~ Ta versioned file is obstructed by a non-regular file
634 a378724f 2019-02-10 stsp .It ! Ta a missing versioned file was restored
635 5036ab18 2020-04-18 stsp .It # Ta file was not updated because it contains merge conflicts
636 3b9f0f87 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
637 7f838b36 2019-02-08 stsp .El
638 7f838b36 2019-02-08 stsp .Pp
639 f2ea84fa 2019-07-27 stsp If no
640 c4cdcb68 2019-04-03 stsp .Ar path
641 f2ea84fa 2019-07-27 stsp is specified, update the entire work tree.
642 f2ea84fa 2019-07-27 stsp Otherwise, restrict the update operation to files at or within the
643 f2ea84fa 2019-07-27 stsp specified paths.
644 f2ea84fa 2019-07-27 stsp Each path is required to exist in the update operation's target commit.
645 f2ea84fa 2019-07-27 stsp Files in the work tree outside specified paths will remain unchanged and
646 f2ea84fa 2019-07-27 stsp will retain their previously recorded base commit.
647 f2cf8fbb 2019-04-04 stsp Some
648 f2cf8fbb 2019-04-04 stsp .Nm
649 f2cf8fbb 2019-04-04 stsp commands may refuse to run while the work tree contains files from
650 c4cdcb68 2019-04-03 stsp multiple base commits.
651 f2cf8fbb 2019-04-04 stsp The base commit of such a work tree can be made consistent by running
652 47ec7be7 2019-05-12 stsp .Cm got update
653 47ec7be7 2019-05-12 stsp across the entire work tree.
654 024e9686 2019-05-14 stsp Specifying a
655 024e9686 2019-05-14 stsp .Ar path
656 024e9686 2019-05-14 stsp is incompatible with the
657 024e9686 2019-05-14 stsp .Fl b
658 024e9686 2019-05-14 stsp option.
659 7f838b36 2019-02-08 stsp .Pp
660 4ed9f614 2019-08-04 stsp .Cm got update
661 4ed9f614 2019-08-04 stsp cannot update paths with staged changes.
662 4ed9f614 2019-08-04 stsp If changes have been staged with
663 4ed9f614 2019-08-04 stsp .Cm got stage ,
664 bc3056e3 2019-08-18 stsp these changes must first be committed with
665 4ed9f614 2019-08-04 stsp .Cm got commit
666 4ed9f614 2019-08-04 stsp or unstaged with
667 4ed9f614 2019-08-04 stsp .Cm got unstage .
668 4ed9f614 2019-08-04 stsp .Pp
669 507dc3bb 2018-12-29 stsp The options for
670 507dc3bb 2018-12-29 stsp .Cm got update
671 507dc3bb 2018-12-29 stsp are as follows:
672 507dc3bb 2018-12-29 stsp .Bl -tag -width Ds
673 024e9686 2019-05-14 stsp .It Fl b Ar branch
674 024e9686 2019-05-14 stsp Switch the work tree's branch reference to the specified
675 024e9686 2019-05-14 stsp .Ar branch
676 024e9686 2019-05-14 stsp before updating the work tree.
677 024e9686 2019-05-14 stsp This option requires that all paths in the work tree are updated.
678 4f331d3a 2020-04-01 stsp .Pp
679 4f331d3a 2020-04-01 stsp As usual, any local changes in the work tree will be preserved.
680 4f331d3a 2020-04-01 stsp This can be useful when switching to a newly created branch in order
681 4f331d3a 2020-04-01 stsp to commit existing local changes to this branch.
682 4f331d3a 2020-04-01 stsp .Pp
683 4f331d3a 2020-04-01 stsp Any local changes must be dealt with separately in order to obtain a
684 4f331d3a 2020-04-01 stsp work tree with pristine file contents corresponding exactly to the specified
685 4f331d3a 2020-04-01 stsp .Ar branch .
686 4f331d3a 2020-04-01 stsp Such changes could first be committed to a different branch with
687 4f331d3a 2020-04-01 stsp .Cm got commit ,
688 4f331d3a 2020-04-01 stsp or could be discarded with
689 4f331d3a 2020-04-01 stsp .Cm got revert .
690 507dc3bb 2018-12-29 stsp .It Fl c Ar commit
691 507dc3bb 2018-12-29 stsp Update the work tree to the specified
692 507dc3bb 2018-12-29 stsp .Ar commit .
693 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
694 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
695 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
696 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
697 024e9686 2019-05-14 stsp If this option is not specified, the most recent commit on the work tree's
698 024e9686 2019-05-14 stsp branch will be used.
699 4ad4a1ec 2021-09-13 tracey .It Fl q
700 4ad4a1ec 2021-09-13 tracey Silence progress output.
701 507dc3bb 2018-12-29 stsp .El
702 e8aa341a 2021-10-08 thomas .Tg st
703 56c96eff 2022-08-30 thomas .It Xo
704 56c96eff 2022-08-30 thomas .Cm status
705 56c96eff 2022-08-30 thomas .Op Fl I
706 56c96eff 2022-08-30 thomas .Op Fl S Ar status-codes
707 56c96eff 2022-08-30 thomas .Op Fl s Ar status-codes
708 56c96eff 2022-08-30 thomas .Op Ar path ...
709 56c96eff 2022-08-30 thomas .Xc
710 d912d125 2021-11-04 thomas .Dl Pq alias: Cm st
711 6cd959e6 2019-03-26 stsp Show the current modification status of files in a work tree,
712 6bad629b 2019-02-04 stsp using the following status codes:
713 6bad629b 2019-02-04 stsp .Bl -column YXZ description
714 6bad629b 2019-02-04 stsp .It M Ta modified file
715 079890a9 2019-03-26 stsp .It A Ta file scheduled for addition in next commit
716 079890a9 2019-03-26 stsp .It D Ta file scheduled for deletion in next commit
717 7154f6ce 2019-03-27 stsp .It C Ta modified or added file which contains merge conflicts
718 6bad629b 2019-02-04 stsp .It ! Ta versioned file was expected on disk but is missing
719 1dd86744 2019-08-12 anthony .It \(a~ Ta versioned file is obstructed by a non-regular file
720 6bad629b 2019-02-04 stsp .It ? Ta unversioned item not tracked by
721 6bad629b 2019-02-04 stsp .Nm
722 1ebedb77 2019-10-19 stsp .It m Ta modified file modes (executable bit only)
723 2a06fe5f 2019-08-24 stsp .It N Ta non-existent
724 2a06fe5f 2019-08-24 stsp .Ar path
725 2a06fe5f 2019-08-24 stsp specified on the command line
726 6bad629b 2019-02-04 stsp .El
727 6bad629b 2019-02-04 stsp .Pp
728 72ea6654 2019-07-27 stsp If no
729 927df6b7 2019-02-10 stsp .Ar path
730 72ea6654 2019-07-27 stsp is specified, show modifications in the entire work tree.
731 72ea6654 2019-07-27 stsp Otherwise, show modifications at or within the specified paths.
732 4ed9f614 2019-08-04 stsp .Pp
733 4ed9f614 2019-08-04 stsp If changes have been staged with
734 4ed9f614 2019-08-04 stsp .Cm got stage ,
735 4ed9f614 2019-08-04 stsp staged changes are shown in the second output column, using the following
736 4ed9f614 2019-08-04 stsp status codes:
737 4ed9f614 2019-08-04 stsp .Bl -column YXZ description
738 4ed9f614 2019-08-04 stsp .It M Ta file modification is staged
739 4ed9f614 2019-08-04 stsp .It A Ta file addition is staged
740 4ed9f614 2019-08-04 stsp .It D Ta file deletion is staged
741 4ed9f614 2019-08-04 stsp .El
742 4ed9f614 2019-08-04 stsp .Pp
743 95ac67f0 2019-08-08 stsp Changes created on top of staged changes are indicated in the first column:
744 4ed9f614 2019-08-04 stsp .Bl -column YXZ description
745 95ac67f0 2019-08-08 stsp .It MM Ta file was modified after earlier changes have been staged
746 95ac67f0 2019-08-08 stsp .It MA Ta file was modified after having been staged for addition
747 4ed9f614 2019-08-04 stsp .El
748 6841da00 2019-08-08 stsp .Pp
749 081470ac 2020-08-13 stsp The options for
750 081470ac 2020-08-13 stsp .Cm got status
751 081470ac 2020-08-13 stsp are as follows:
752 081470ac 2020-08-13 stsp .Bl -tag -width Ds
753 f6343036 2021-06-22 stsp .It Fl I
754 f6343036 2021-06-22 stsp Show unversioned files even if they match an ignore pattern.
755 d6506a3d 2022-08-16 thomas .It Fl S Ar status-codes
756 d6506a3d 2022-08-16 thomas Suppress the output of files with a modification status matching any of the
757 00357e4d 2021-09-14 tracey single-character status codes contained in the
758 00357e4d 2021-09-14 tracey .Ar status-codes
759 00357e4d 2021-09-14 tracey argument.
760 00357e4d 2021-09-14 tracey Any combination of codes from the above list of possible status codes
761 00357e4d 2021-09-14 tracey may be specified.
762 00357e4d 2021-09-14 tracey For staged files, status codes displayed in either column will be matched.
763 b043307b 2021-09-14 stsp Cannot be used together with the
764 d6506a3d 2022-08-16 thomas .Fl s
765 b043307b 2021-09-14 stsp option.
766 d6506a3d 2022-08-16 thomas .It Fl s Ar status-codes
767 d6506a3d 2022-08-16 thomas Only show files with a modification status matching any of the
768 081470ac 2020-08-13 stsp single-character status codes contained in the
769 081470ac 2020-08-13 stsp .Ar status-codes
770 081470ac 2020-08-13 stsp argument.
771 081470ac 2020-08-13 stsp Any combination of codes from the above list of possible status codes
772 081470ac 2020-08-13 stsp may be specified.
773 081470ac 2020-08-13 stsp For staged files, status codes displayed in either column will be matched.
774 b043307b 2021-09-14 stsp Cannot be used together with the
775 d6506a3d 2022-08-16 thomas .Fl S
776 b043307b 2021-09-14 stsp option.
777 081470ac 2020-08-13 stsp .El
778 081470ac 2020-08-13 stsp .Pp
779 6841da00 2019-08-08 stsp For compatibility with
780 bd8de430 2019-10-04 stsp .Xr cvs 1
781 bd8de430 2019-10-04 stsp and
782 bd8de430 2019-10-04 stsp .Xr git 1 ,
783 6841da00 2019-08-08 stsp .Cm got status
784 bd8de430 2019-10-04 stsp reads
785 bd8de430 2019-10-04 stsp .Xr glob 7
786 bd8de430 2019-10-04 stsp patterns from
787 6841da00 2019-08-08 stsp .Pa .cvsignore
788 bd8de430 2019-10-04 stsp and
789 bd8de430 2019-10-04 stsp .Pa .gitignore
790 6841da00 2019-08-08 stsp files in each traversed directory and will not display unversioned files
791 bd8de430 2019-10-04 stsp which match these patterns.
792 1b5d300f 2023-02-20 thomas Ignore patterns which end with a slash,
793 1b5d300f 2023-02-20 thomas .Dq / ,
794 1b5d300f 2023-02-20 thomas will only match directories.
795 bd8de430 2019-10-04 stsp As an extension to
796 6841da00 2019-08-08 stsp .Xr glob 7
797 bd8de430 2019-10-04 stsp matching rules,
798 bd8de430 2019-10-04 stsp .Cm got status
799 bd8de430 2019-10-04 stsp supports consecutive asterisks,
800 bd8de430 2019-10-04 stsp .Dq ** ,
801 bd8de430 2019-10-04 stsp which will match an arbitrary amount of directories.
802 6841da00 2019-08-08 stsp Unlike
803 6841da00 2019-08-08 stsp .Xr cvs 1 ,
804 6841da00 2019-08-08 stsp .Cm got status
805 6841da00 2019-08-08 stsp only supports a single ignore pattern per line.
806 bd8de430 2019-10-04 stsp Unlike
807 bd8de430 2019-10-04 stsp .Xr git 1 ,
808 bd8de430 2019-10-04 stsp .Cm got status
809 bd8de430 2019-10-04 stsp does not support negated ignore patterns prefixed with
810 bd8de430 2019-10-04 stsp .Dq \&! ,
811 bd8de430 2019-10-04 stsp and gives no special significance to the location of path component separators,
812 bd8de430 2019-10-04 stsp .Dq / ,
813 bd8de430 2019-10-04 stsp in a pattern.
814 56c96eff 2022-08-30 thomas .It Xo
815 56c96eff 2022-08-30 thomas .Cm log
816 f3ad4b0a 2023-01-07 thomas .Op Fl bdPpRs
817 56c96eff 2022-08-30 thomas .Op Fl C Ar number
818 56c96eff 2022-08-30 thomas .Op Fl c Ar commit
819 56c96eff 2022-08-30 thomas .Op Fl l Ar N
820 56c96eff 2022-08-30 thomas .Op Fl r Ar repository-path
821 56c96eff 2022-08-30 thomas .Op Fl S Ar search-pattern
822 56c96eff 2022-08-30 thomas .Op Fl x Ar commit
823 56c96eff 2022-08-30 thomas .Op Ar path
824 56c96eff 2022-08-30 thomas .Xc
825 38e11793 2018-06-13 stsp Display history of a repository.
826 04ca23f4 2018-07-16 stsp If a
827 04ca23f4 2018-07-16 stsp .Ar path
828 04ca23f4 2018-07-16 stsp is specified, show only commits which modified this path.
829 dc990cbf 2020-02-22 stsp If invoked in a work tree, the
830 dc990cbf 2020-02-22 stsp .Ar path
831 dc990cbf 2020-02-22 stsp is interpreted relative to the current working directory,
832 dc990cbf 2020-02-22 stsp and the work tree's path prefix is implicitly prepended.
833 dc990cbf 2020-02-22 stsp Otherwise, the path is interpreted relative to the repository root.
834 38e11793 2018-06-13 stsp .Pp
835 38e11793 2018-06-13 stsp The options for
836 38e11793 2018-06-13 stsp .Cm got log
837 38e11793 2018-06-13 stsp are as follows:
838 38e11793 2018-06-13 stsp .Bl -tag -width Ds
839 48c8c60d 2020-01-27 stsp .It Fl b
840 1137e0ae 2020-01-27 stsp Display individual commits which were merged into the current branch
841 1137e0ae 2020-01-27 stsp from other branches.
842 48c8c60d 2020-01-27 stsp By default,
843 48c8c60d 2020-01-27 stsp .Cm got log
844 48c8c60d 2020-01-27 stsp shows the linear history of the current branch only.
845 d6506a3d 2022-08-16 thomas .It Fl C Ar number
846 d6506a3d 2022-08-16 thomas Set the number of context lines shown in diffs with
847 d6506a3d 2022-08-16 thomas .Fl p .
848 d6506a3d 2022-08-16 thomas By default, 3 lines of context are shown.
849 38e11793 2018-06-13 stsp .It Fl c Ar commit
850 38e11793 2018-06-13 stsp Start traversing history at the specified
851 38e11793 2018-06-13 stsp .Ar commit .
852 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
853 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
854 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
855 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
856 1cc14b9f 2019-05-14 stsp If this option is not specified, default to the work tree's current branch
857 1cc14b9f 2019-05-14 stsp if invoked in a work tree, or to the repository's HEAD reference.
858 772fcad5 2023-01-07 thomas .It Fl d
859 be97ab03 2023-01-19 thomas Display diffstat of changes introduced in each commit.
860 772fcad5 2023-01-07 thomas Cannot be used with the
861 772fcad5 2023-01-07 thomas .Fl s
862 772fcad5 2023-01-07 thomas option.
863 6238ee32 2018-06-13 stsp .It Fl l Ar N
864 6238ee32 2018-06-13 stsp Limit history traversal to a given number of commits.
865 b1ebc001 2019-08-13 stsp If this option is not specified, a default limit value of zero is used,
866 b1ebc001 2019-08-13 stsp which is treated as an unbounded limit.
867 b1ebc001 2019-08-13 stsp The
868 b1ebc001 2019-08-13 stsp .Ev GOT_LOG_DEFAULT_LIMIT
869 b1ebc001 2019-08-13 stsp environment variable may be set to change this default value.
870 0208f208 2020-05-05 stsp .It Fl P
871 0208f208 2020-05-05 stsp Display the list of file paths changed in each commit, using the following
872 0208f208 2020-05-05 stsp status codes:
873 0208f208 2020-05-05 stsp .Bl -column YXZ description
874 0208f208 2020-05-05 stsp .It M Ta modified file
875 0208f208 2020-05-05 stsp .It D Ta file was deleted
876 0208f208 2020-05-05 stsp .It A Ta new file was added
877 0208f208 2020-05-05 stsp .It m Ta modified file modes (executable bit only)
878 0208f208 2020-05-05 stsp .El
879 e2f45bc4 2022-06-13 thomas .Pp
880 2f7ada20 2022-06-13 thomas Cannot be used with the
881 2f7ada20 2022-06-13 thomas .Fl s
882 2f7ada20 2022-06-13 thomas option.
883 d6506a3d 2022-08-16 thomas .It Fl p
884 d6506a3d 2022-08-16 thomas Display the patch of modifications made in each commit.
885 d6506a3d 2022-08-16 thomas If a
886 d6506a3d 2022-08-16 thomas .Ar path
887 d6506a3d 2022-08-16 thomas is specified, only show the patch of modifications at or within this path.
888 d6506a3d 2022-08-16 thomas Cannot be used with the
889 d6506a3d 2022-08-16 thomas .Fl s
890 2f7ada20 2022-06-13 thomas option.
891 d6506a3d 2022-08-16 thomas .It Fl R
892 d6506a3d 2022-08-16 thomas Determine a set of commits to display as usual, but display these commits
893 d6506a3d 2022-08-16 thomas in reverse order.
894 d6506a3d 2022-08-16 thomas .It Fl r Ar repository-path
895 d6506a3d 2022-08-16 thomas Use the repository at the specified path.
896 d6506a3d 2022-08-16 thomas If not specified, assume the repository is located at or above the current
897 d6506a3d 2022-08-16 thomas working directory.
898 d6506a3d 2022-08-16 thomas If this directory is a
899 d6506a3d 2022-08-16 thomas .Nm
900 d6506a3d 2022-08-16 thomas work tree, use the repository path associated with this work tree.
901 2f7ada20 2022-06-13 thomas .It Fl S Ar search-pattern
902 4fe9456b 2022-06-13 thomas If specified, show only commits with a log message, author name,
903 4fe9456b 2022-06-13 thomas committer name, or ID SHA1 hash matched by the extended regular
904 4fe9456b 2022-06-13 thomas expression
905 6841bf13 2019-11-29 kn .Ar search-pattern .
906 314444e4 2022-06-13 thomas Lines in committed patches will be matched if
907 314444e4 2022-06-13 thomas .Fl p
908 314444e4 2022-06-13 thomas is specified.
909 314444e4 2022-06-13 thomas File paths changed by a commit will be matched if
910 314444e4 2022-06-13 thomas .Fl P
911 314444e4 2022-06-13 thomas is specified.
912 6841bf13 2019-11-29 kn Regular expression syntax is documented in
913 6841bf13 2019-11-29 kn .Xr re_format 7 .
914 d6506a3d 2022-08-16 thomas .It Fl s
915 d6506a3d 2022-08-16 thomas Display a short one-line summary of each commit, instead of the default
916 d6506a3d 2022-08-16 thomas history format.
917 d6506a3d 2022-08-16 thomas Cannot be used together with the
918 d6506a3d 2022-08-16 thomas .Fl p
919 d6506a3d 2022-08-16 thomas or
920 d6506a3d 2022-08-16 thomas .Fl P
921 d6506a3d 2022-08-16 thomas option.
922 d1fe46f9 2020-04-18 stsp .It Fl x Ar commit
923 4e20a648 2021-03-21 jrick Stop traversing commit history immediately after the specified
924 d1fe46f9 2020-04-18 stsp .Ar commit
925 52ab7958 2020-04-18 stsp has been traversed.
926 d1fe46f9 2020-04-18 stsp This option has no effect if the specified
927 d1fe46f9 2020-04-18 stsp .Ar commit
928 d1fe46f9 2020-04-18 stsp is never traversed.
929 38e11793 2018-06-13 stsp .El
930 e8aa341a 2021-10-08 thomas .Tg di
931 56c96eff 2022-08-30 thomas .It Xo
932 56c96eff 2022-08-30 thomas .Cm diff
933 53d03f97 2023-01-10 thomas .Op Fl adPsw
934 56c96eff 2022-08-30 thomas .Op Fl C Ar number
935 56c96eff 2022-08-30 thomas .Op Fl c Ar commit
936 56c96eff 2022-08-30 thomas .Op Fl r Ar repository-path
937 56c96eff 2022-08-30 thomas .Op Ar object1 Ar object2 | Ar path ...
938 56c96eff 2022-08-30 thomas .Xc
939 d912d125 2021-11-04 thomas .Dl Pq alias: Cm di
940 30f6c0c6 2021-10-08 thomas When invoked within a work tree without any arguments, display all
941 bd81cfb7 2020-04-19 stsp local changes in the work tree.
942 30f6c0c6 2021-10-08 thomas If one or more
943 927df6b7 2019-02-10 stsp .Ar path
944 30f6c0c6 2021-10-08 thomas arguments are specified, only show changes within the specified paths.
945 927df6b7 2019-02-10 stsp .Pp
946 d24820bf 2019-08-11 stsp If two arguments are provided, treat each argument as a reference, a tag
947 d24820bf 2019-08-11 stsp name, or an object ID SHA1 hash, and display differences between the
948 d24820bf 2019-08-11 stsp corresponding objects.
949 3f8b7d6a 2018-04-01 stsp Both objects must be of the same type (blobs, trees, or commits).
950 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
951 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
952 30f6c0c6 2021-10-08 thomas If none of these interpretations produce a valid result or if the
953 30f6c0c6 2021-10-08 thomas .Fl P
954 30f6c0c6 2021-10-08 thomas option is used,
955 30f6c0c6 2021-10-08 thomas and if
956 30f6c0c6 2021-10-08 thomas .Cm got diff
957 30f6c0c6 2021-10-08 thomas is running in a work tree, attempt to interpret the two arguments as paths.
958 c0cc5c62 2018-10-18 stsp .Pp
959 c0cc5c62 2018-10-18 stsp The options for
960 c0cc5c62 2018-10-18 stsp .Cm got diff
961 c0cc5c62 2018-10-18 stsp are as follows:
962 c0cc5c62 2018-10-18 stsp .Bl -tag -width Ds
963 64453f7e 2020-11-21 stsp .It Fl a
964 64453f7e 2020-11-21 stsp Treat file contents as ASCII text even if binary data is detected.
965 d6506a3d 2022-08-16 thomas .It Fl C Ar number
966 d6506a3d 2022-08-16 thomas Set the number of context lines shown in the diff.
967 d6506a3d 2022-08-16 thomas By default, 3 lines of context are shown.
968 cc8021af 2021-10-12 thomas .It Fl c Ar commit
969 cc8021af 2021-10-12 thomas Show differences between commits in the repository.
970 d6506a3d 2022-08-16 thomas This option may be used up to two times.
971 cc8021af 2021-10-12 thomas When used only once, show differences between the specified
972 cc8021af 2021-10-12 thomas .Ar commit
973 cc8021af 2021-10-12 thomas and its first parent commit.
974 cc8021af 2021-10-12 thomas When used twice, show differences between the two specified commits.
975 cc8021af 2021-10-12 thomas .Pp
976 cc8021af 2021-10-12 thomas The expected argument is a commit ID SHA1 hash or an existing reference
977 cc8021af 2021-10-12 thomas or tag name which will be resolved to a commit ID.
978 cc8021af 2021-10-12 thomas An abbreviated hash argument will be expanded to a full SHA1 hash
979 cc8021af 2021-10-12 thomas automatically, provided the abbreviation is unique.
980 cc8021af 2021-10-12 thomas .Pp
981 cc8021af 2021-10-12 thomas If the
982 cc8021af 2021-10-12 thomas .Fl c
983 cc8021af 2021-10-12 thomas option is used, all non-option arguments will be interpreted as paths.
984 cc8021af 2021-10-12 thomas If one or more such
985 cc8021af 2021-10-12 thomas .Ar path
986 cc8021af 2021-10-12 thomas arguments are provided, only show differences for the specified paths.
987 cc8021af 2021-10-12 thomas .Pp
988 cc8021af 2021-10-12 thomas Cannot be used together with the
989 cc8021af 2021-10-12 thomas .Fl P
990 cc8021af 2021-10-12 thomas option.
991 53d03f97 2023-01-10 thomas .It Fl d
992 53d03f97 2023-01-10 thomas Display diffstat of changes before the actual diff by annotating each file path
993 53d03f97 2023-01-10 thomas or blob hash being diffed with the total number of lines added and removed.
994 53d03f97 2023-01-10 thomas A summary line will display the total number of changes across all files.
995 d6506a3d 2022-08-16 thomas .It Fl P
996 d6506a3d 2022-08-16 thomas Interpret all arguments as paths only.
997 d6506a3d 2022-08-16 thomas This option can be used to resolve ambiguity in cases where paths
998 d6506a3d 2022-08-16 thomas look like tag names, reference names, or object IDs.
999 d6506a3d 2022-08-16 thomas This option is only valid when
1000 d6506a3d 2022-08-16 thomas .Cm got diff
1001 d6506a3d 2022-08-16 thomas is invoked in a work tree.
1002 b72f483a 2019-02-05 stsp .It Fl r Ar repository-path
1003 b72f483a 2019-02-05 stsp Use the repository at the specified path.
1004 b72f483a 2019-02-05 stsp If not specified, assume the repository is located at or above the current
1005 b72f483a 2019-02-05 stsp working directory.
1006 b72f483a 2019-02-05 stsp If this directory is a
1007 b72f483a 2019-02-05 stsp .Nm
1008 b72f483a 2019-02-05 stsp work tree, use the repository path associated with this work tree.
1009 4ed9f614 2019-08-04 stsp .It Fl s
1010 4ed9f614 2019-08-04 stsp Show changes staged with
1011 4ed9f614 2019-08-04 stsp .Cm got stage
1012 bd81cfb7 2020-04-19 stsp instead of showing local changes in the work tree.
1013 30f6c0c6 2021-10-08 thomas This option is only valid when
1014 30f6c0c6 2021-10-08 thomas .Cm got diff
1015 30f6c0c6 2021-10-08 thomas is invoked in a work tree.
1016 63035f9f 2019-10-06 stsp .It Fl w
1017 63035f9f 2019-10-06 stsp Ignore whitespace-only changes.
1018 c0cc5c62 2018-10-18 stsp .El
1019 e8aa341a 2021-10-08 thomas .Tg bl
1020 56c96eff 2022-08-30 thomas .It Xo
1021 56c96eff 2022-08-30 thomas .Cm blame
1022 56c96eff 2022-08-30 thomas .Op Fl c Ar commit
1023 56c96eff 2022-08-30 thomas .Op Fl r Ar repository-path
1024 56c96eff 2022-08-30 thomas .Ar path
1025 56c96eff 2022-08-30 thomas .Xc
1026 d912d125 2021-11-04 thomas .Dl Pq alias: Cm bl
1027 1ff8e573 2018-08-02 stsp Display line-by-line history of a file at the specified path.
1028 1ff8e573 2018-08-02 stsp .Pp
1029 1ff8e573 2018-08-02 stsp The options for
1030 1ff8e573 2018-08-02 stsp .Cm got blame
1031 1ff8e573 2018-08-02 stsp are as follows:
1032 1ff8e573 2018-08-02 stsp .Bl -tag -width Ds
1033 1ff8e573 2018-08-02 stsp .It Fl c Ar commit
1034 1ff8e573 2018-08-02 stsp Start traversing history at the specified
1035 1ff8e573 2018-08-02 stsp .Ar commit .
1036 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
1037 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
1038 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1039 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
1040 1ff8e573 2018-08-02 stsp .It Fl r Ar repository-path
1041 1ff8e573 2018-08-02 stsp Use the repository at the specified path.
1042 1ff8e573 2018-08-02 stsp If not specified, assume the repository is located at or above the current
1043 1ff8e573 2018-08-02 stsp working directory.
1044 0c06baac 2019-02-05 stsp If this directory is a
1045 0c06baac 2019-02-05 stsp .Nm
1046 0c06baac 2019-02-05 stsp work tree, use the repository path associated with this work tree.
1047 5c860e29 2018-03-12 stsp .El
1048 e8aa341a 2021-10-08 thomas .Tg tr
1049 56c96eff 2022-08-30 thomas .It Xo
1050 56c96eff 2022-08-30 thomas .Cm tree
1051 56c96eff 2022-08-30 thomas .Op Fl iR
1052 56c96eff 2022-08-30 thomas .Op Fl c Ar commit
1053 56c96eff 2022-08-30 thomas .Op Fl r Ar repository-path
1054 56c96eff 2022-08-30 thomas .Op Ar path
1055 56c96eff 2022-08-30 thomas .Xc
1056 d912d125 2021-11-04 thomas .Dl Pq alias: Cm tr
1057 5de5890b 2018-10-18 stsp Display a listing of files and directories at the specified
1058 5de5890b 2018-10-18 stsp directory path in the repository.
1059 db0c2996 2019-02-10 stsp Entries shown in this listing may carry one of the following trailing
1060 db0c2996 2019-02-10 stsp annotations:
1061 db0c2996 2019-02-10 stsp .Bl -column YXZ description
1062 848d6979 2019-08-12 stsp .It @ Ta entry is a symbolic link
1063 db0c2996 2019-02-10 stsp .It / Ta entry is a directory
1064 db0c2996 2019-02-10 stsp .It * Ta entry is an executable file
1065 63c5ca5d 2019-08-24 stsp .It $ Ta entry is a Git submodule
1066 db0c2996 2019-02-10 stsp .El
1067 0d6c6ee3 2020-05-20 stsp .Pp
1068 0d6c6ee3 2020-05-20 stsp Symbolic link entries are also annotated with the target path of the link.
1069 db0c2996 2019-02-10 stsp .Pp
1070 0c849583 2019-02-05 stsp If no
1071 0c849583 2019-02-05 stsp .Ar path
1072 0c849583 2019-02-05 stsp is specified, list the repository path corresponding to the current
1073 0c849583 2019-02-05 stsp directory of the work tree, or the root directory of the repository
1074 0c849583 2019-02-05 stsp if there is no work tree.
1075 5de5890b 2018-10-18 stsp .Pp
1076 5de5890b 2018-10-18 stsp The options for
1077 5de5890b 2018-10-18 stsp .Cm got tree
1078 5de5890b 2018-10-18 stsp are as follows:
1079 5de5890b 2018-10-18 stsp .Bl -tag -width Ds
1080 5de5890b 2018-10-18 stsp .It Fl c Ar commit
1081 5de5890b 2018-10-18 stsp List files and directories as they appear in the specified
1082 5de5890b 2018-10-18 stsp .Ar commit .
1083 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
1084 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
1085 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1086 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
1087 d6506a3d 2022-08-16 thomas .It Fl i
1088 d6506a3d 2022-08-16 thomas Show object IDs of files (blob objects) and directories (tree objects).
1089 d6506a3d 2022-08-16 thomas .It Fl R
1090 d6506a3d 2022-08-16 thomas Recurse into sub-directories in the repository.
1091 5de5890b 2018-10-18 stsp .It Fl r Ar repository-path
1092 5de5890b 2018-10-18 stsp Use the repository at the specified path.
1093 5de5890b 2018-10-18 stsp If not specified, assume the repository is located at or above the current
1094 5de5890b 2018-10-18 stsp working directory.
1095 0c849583 2019-02-05 stsp If this directory is a
1096 0c849583 2019-02-05 stsp .Nm
1097 0c849583 2019-02-05 stsp work tree, use the repository path associated with this work tree.
1098 d0eebce4 2019-03-11 stsp .El
1099 56c96eff 2022-08-30 thomas .It Xo
1100 56c96eff 2022-08-30 thomas .Cm ref
1101 56c96eff 2022-08-30 thomas .Op Fl dlt
1102 b6b86fd1 2022-08-30 thomas .Op Fl c Ar object
1103 56c96eff 2022-08-30 thomas .Op Fl r Ar repository-path
1104 56c96eff 2022-08-30 thomas .Op Fl s Ar reference
1105 56c96eff 2022-08-30 thomas .Op Ar name
1106 56c96eff 2022-08-30 thomas .Xc
1107 d0eebce4 2019-03-11 stsp Manage references in a repository.
1108 d0eebce4 2019-03-11 stsp .Pp
1109 e31abbf2 2020-03-22 stsp References may be listed, created, deleted, and changed.
1110 e31abbf2 2020-03-22 stsp When creating, deleting, or changing a reference the specified
1111 e31abbf2 2020-03-22 stsp .Ar name
1112 e31abbf2 2020-03-22 stsp must be an absolute reference name, i.e. it must begin with
1113 f16e4044 2019-10-09 stsp .Dq refs/ .
1114 e31abbf2 2020-03-22 stsp .Pp
1115 d0eebce4 2019-03-11 stsp The options for
1116 d0eebce4 2019-03-11 stsp .Cm got ref
1117 d0eebce4 2019-03-11 stsp are as follows:
1118 d0eebce4 2019-03-11 stsp .Bl -tag -width Ds
1119 d6506a3d 2022-08-16 thomas .It Fl c Ar object
1120 d6506a3d 2022-08-16 thomas Create a reference or change an existing reference.
1121 d6506a3d 2022-08-16 thomas The reference with the specified
1122 d6506a3d 2022-08-16 thomas .Ar name
1123 d6506a3d 2022-08-16 thomas will point at the specified
1124 d6506a3d 2022-08-16 thomas .Ar object .
1125 d6506a3d 2022-08-16 thomas The expected
1126 d6506a3d 2022-08-16 thomas .Ar object
1127 d6506a3d 2022-08-16 thomas argument is a ID SHA1 hash or an existing reference or tag name which will
1128 d6506a3d 2022-08-16 thomas be resolved to the ID of a corresponding commit, tree, tag, or blob object.
1129 d6506a3d 2022-08-16 thomas Cannot be used together with any other options except
1130 d6506a3d 2022-08-16 thomas .Fl r .
1131 d6506a3d 2022-08-16 thomas .It Fl d
1132 d6506a3d 2022-08-16 thomas Delete the reference with the specified
1133 d6506a3d 2022-08-16 thomas .Ar name
1134 d6506a3d 2022-08-16 thomas from the repository.
1135 d6506a3d 2022-08-16 thomas Any commit, tree, tag, and blob objects belonging to deleted references
1136 d6506a3d 2022-08-16 thomas remain in the repository and may be removed separately with
1137 d6506a3d 2022-08-16 thomas Git's garbage collector or
1138 d6506a3d 2022-08-16 thomas .Cm gotadmin cleanup .
1139 d6506a3d 2022-08-16 thomas Cannot be used together with any other options except
1140 d6506a3d 2022-08-16 thomas .Fl r .
1141 d0eebce4 2019-03-11 stsp .It Fl l
1142 b2070a3f 2020-03-22 stsp List references in the repository.
1143 b2070a3f 2020-03-22 stsp If no
1144 b2070a3f 2020-03-22 stsp .Ar name
1145 b2070a3f 2020-03-22 stsp is specified, list all existing references in the repository.
1146 b2070a3f 2020-03-22 stsp If
1147 b2070a3f 2020-03-22 stsp .Ar name
1148 b2070a3f 2020-03-22 stsp is a reference namespace, list all references in this namespace.
1149 b2070a3f 2020-03-22 stsp Otherwise, show only the reference with the given
1150 b2070a3f 2020-03-22 stsp .Ar name .
1151 e31abbf2 2020-03-22 stsp Cannot be used together with any other options except
1152 2bf0fa54 2021-11-20 thomas .Fl r
1153 2bf0fa54 2021-11-20 thomas and
1154 2bf0fa54 2021-11-20 thomas .Fl t .
1155 d6506a3d 2022-08-16 thomas .It Fl r Ar repository-path
1156 d6506a3d 2022-08-16 thomas Use the repository at the specified path.
1157 d6506a3d 2022-08-16 thomas If not specified, assume the repository is located at or above the current
1158 d6506a3d 2022-08-16 thomas working directory.
1159 d6506a3d 2022-08-16 thomas If this directory is a
1160 d6506a3d 2022-08-16 thomas .Nm
1161 d6506a3d 2022-08-16 thomas work tree, use the repository path associated with this work tree.
1162 e31abbf2 2020-03-22 stsp .It Fl s Ar reference
1163 e31abbf2 2020-03-22 stsp Create a symbolic reference, or change an existing symbolic reference.
1164 e31abbf2 2020-03-22 stsp The symbolic reference with the specified
1165 e31abbf2 2020-03-22 stsp .Ar name
1166 e31abbf2 2020-03-22 stsp will point at the specified
1167 e31abbf2 2020-03-22 stsp .Ar reference
1168 e31abbf2 2020-03-22 stsp which must already exist in the repository.
1169 d1c1ae5f 2019-08-12 stsp Care should be taken not to create loops between references when
1170 d1c1ae5f 2019-08-12 stsp this option is used.
1171 e31abbf2 2020-03-22 stsp Cannot be used together with any other options except
1172 e31abbf2 2020-03-22 stsp .Fl r .
1173 d6506a3d 2022-08-16 thomas .It Fl t
1174 d6506a3d 2022-08-16 thomas Sort listed references by modification time (most recently modified first)
1175 d6506a3d 2022-08-16 thomas instead of sorting by lexicographical order.
1176 d6506a3d 2022-08-16 thomas Use of this option requires the
1177 d6506a3d 2022-08-16 thomas .Fl l
1178 d6506a3d 2022-08-16 thomas option to be used as well.
1179 4e759de4 2019-06-26 stsp .El
1180 e8aa341a 2021-10-08 thomas .Tg br
1181 56c96eff 2022-08-30 thomas .It Xo
1182 56c96eff 2022-08-30 thomas .Cm branch
1183 56c96eff 2022-08-30 thomas .Op Fl lnt
1184 56c96eff 2022-08-30 thomas .Op Fl c Ar commit
1185 56c96eff 2022-08-30 thomas .Op Fl d Ar name
1186 56c96eff 2022-08-30 thomas .Op Fl r Ar repository-path
1187 56c96eff 2022-08-30 thomas .Op Ar name
1188 56c96eff 2022-08-30 thomas .Xc
1189 d912d125 2021-11-04 thomas .Dl Pq alias: Cm br
1190 da76fce2 2020-02-24 stsp Create, list, or delete branches.
1191 4e759de4 2019-06-26 stsp .Pp
1192 34d4e04c 2021-02-08 stsp Local branches are managed via references which live in the
1193 4e759de4 2019-06-26 stsp .Dq refs/heads/
1194 4e759de4 2019-06-26 stsp reference namespace.
1195 4e759de4 2019-06-26 stsp The
1196 4e759de4 2019-06-26 stsp .Cm got branch
1197 2f1457c6 2021-08-27 stsp command creates references in this namespace only.
1198 2f1457c6 2021-08-27 stsp .Pp
1199 4b06140e 2022-03-22 thomas When deleting branches, the specified
1200 2f1457c6 2021-08-27 stsp .Ar name
1201 2f1457c6 2021-08-27 stsp is searched in the
1202 2f1457c6 2021-08-27 stsp .Dq refs/heads
1203 2f1457c6 2021-08-27 stsp reference namespace first.
1204 4b06140e 2022-03-22 thomas If no corresponding branch is found, the
1205 2f1457c6 2021-08-27 stsp .Dq refs/remotes
1206 2f1457c6 2021-08-27 stsp namespace will be searched next.
1207 4e759de4 2019-06-26 stsp .Pp
1208 ad89fa31 2019-10-04 stsp If invoked in a work tree without any arguments, print the name of the
1209 ad89fa31 2019-10-04 stsp work tree's current branch.
1210 da76fce2 2020-02-24 stsp .Pp
1211 a74f7e83 2019-11-10 stsp If a
1212 a74f7e83 2019-11-10 stsp .Ar name
1213 a74f7e83 2019-11-10 stsp argument is passed, attempt to create a branch reference with the given name.
1214 a74f7e83 2019-11-10 stsp By default the new branch reference will point at the latest commit on the
1215 a74f7e83 2019-11-10 stsp work tree's current branch if invoked in a work tree, and otherwise to a commit
1216 a74f7e83 2019-11-10 stsp resolved via the repository's HEAD reference.
1217 4e759de4 2019-06-26 stsp .Pp
1218 da76fce2 2020-02-24 stsp If invoked in a work tree, once the branch was created successfully
1219 da76fce2 2020-02-24 stsp switch the work tree's head reference to the newly created branch and
1220 da76fce2 2020-02-24 stsp update files across the entire work tree, just like
1221 da76fce2 2020-02-24 stsp .Cm got update -b Ar name
1222 da76fce2 2020-02-24 stsp would do.
1223 da76fce2 2020-02-24 stsp Show the status of each affected file, using the following status codes:
1224 da76fce2 2020-02-24 stsp .Bl -column YXZ description
1225 da76fce2 2020-02-24 stsp .It U Ta file was updated and contained no local changes
1226 da76fce2 2020-02-24 stsp .It G Ta file was updated and local changes were merged cleanly
1227 da76fce2 2020-02-24 stsp .It C Ta file was updated and conflicts occurred during merge
1228 da76fce2 2020-02-24 stsp .It D Ta file was deleted
1229 da76fce2 2020-02-24 stsp .It A Ta new file was added
1230 da76fce2 2020-02-24 stsp .It \(a~ Ta versioned file is obstructed by a non-regular file
1231 da76fce2 2020-02-24 stsp .It ! Ta a missing versioned file was restored
1232 da76fce2 2020-02-24 stsp .El
1233 da76fce2 2020-02-24 stsp .Pp
1234 4e759de4 2019-06-26 stsp The options for
1235 4e759de4 2019-06-26 stsp .Cm got branch
1236 4e759de4 2019-06-26 stsp are as follows:
1237 4e759de4 2019-06-26 stsp .Bl -tag -width Ds
1238 a74f7e83 2019-11-10 stsp .It Fl c Ar commit
1239 a74f7e83 2019-11-10 stsp Make a newly created branch reference point at the specified
1240 a74f7e83 2019-11-10 stsp .Ar commit .
1241 a74f7e83 2019-11-10 stsp The expected
1242 a74f7e83 2019-11-10 stsp .Ar commit
1243 a74f7e83 2019-11-10 stsp argument is a commit ID SHA1 hash or an existing reference
1244 a74f7e83 2019-11-10 stsp or tag name which will be resolved to a commit ID.
1245 d6506a3d 2022-08-16 thomas .It Fl d Ar name
1246 d6506a3d 2022-08-16 thomas Delete the branch with the specified
1247 d6506a3d 2022-08-16 thomas .Ar name
1248 d6506a3d 2022-08-16 thomas from the
1249 d6506a3d 2022-08-16 thomas .Dq refs/heads
1250 d6506a3d 2022-08-16 thomas or
1251 d6506a3d 2022-08-16 thomas .Dq refs/remotes
1252 d6506a3d 2022-08-16 thomas reference namespace.
1253 d6506a3d 2022-08-16 thomas .Pp
1254 d6506a3d 2022-08-16 thomas Only the branch reference is deleted.
1255 d6506a3d 2022-08-16 thomas Any commit, tree, and blob objects belonging to the branch
1256 d6506a3d 2022-08-16 thomas remain in the repository and may be removed separately with
1257 d6506a3d 2022-08-16 thomas Git's garbage collector or
1258 d6506a3d 2022-08-16 thomas .Cm gotadmin cleanup .
1259 4e759de4 2019-06-26 stsp .It Fl l
1260 34d4e04c 2021-02-08 stsp List all existing branches in the repository, including copies of remote
1261 34d4e04c 2021-02-08 stsp repositories' branches in the
1262 34d4e04c 2021-02-08 stsp .Dq refs/remotes/
1263 34d4e04c 2021-02-08 stsp reference namespace.
1264 34d4e04c 2021-02-08 stsp .Pp
1265 ba882ee3 2019-07-11 stsp If invoked in a work tree, the work tree's current branch is shown
1266 ba882ee3 2019-07-11 stsp with one the following annotations:
1267 ba882ee3 2019-07-11 stsp .Bl -column YXZ description
1268 ba882ee3 2019-07-11 stsp .It * Ta work tree's base commit matches the branch tip
1269 1dd86744 2019-08-12 anthony .It \(a~ Ta work tree's base commit is out-of-date
1270 ba882ee3 2019-07-11 stsp .El
1271 d6506a3d 2022-08-16 thomas .It Fl n
1272 d6506a3d 2022-08-16 thomas Do not switch and update the work tree after creating a new branch.
1273 d6506a3d 2022-08-16 thomas .It Fl r Ar repository-path
1274 d6506a3d 2022-08-16 thomas Use the repository at the specified path.
1275 d6506a3d 2022-08-16 thomas If not specified, assume the repository is located at or above the current
1276 d6506a3d 2022-08-16 thomas working directory.
1277 d6506a3d 2022-08-16 thomas If this directory is a
1278 d6506a3d 2022-08-16 thomas .Nm
1279 d6506a3d 2022-08-16 thomas work tree, use the repository path associated with this work tree.
1280 a0b48eaf 2021-11-20 thomas .It Fl t
1281 a0b48eaf 2021-11-20 thomas Sort listed branches by modification time (most recently modified first)
1282 a0b48eaf 2021-11-20 thomas instead of sorting by lexicographical order.
1283 a0b48eaf 2021-11-20 thomas Branches in the
1284 a0b48eaf 2021-11-20 thomas .Dq refs/heads/
1285 a0b48eaf 2021-11-20 thomas reference namespace are listed before branches in
1286 a0b48eaf 2021-11-20 thomas .Dq refs/remotes/
1287 a0b48eaf 2021-11-20 thomas regardless.
1288 a0b48eaf 2021-11-20 thomas Use of this option requires the
1289 a0b48eaf 2021-11-20 thomas .Fl l
1290 a0b48eaf 2021-11-20 thomas option to be used as well.
1291 5de5890b 2018-10-18 stsp .El
1292 56c96eff 2022-08-30 thomas .It Xo
1293 56c96eff 2022-08-30 thomas .Cm tag
1294 56c96eff 2022-08-30 thomas .Op Fl lVv
1295 56c96eff 2022-08-30 thomas .Op Fl c Ar commit
1296 56c96eff 2022-08-30 thomas .Op Fl m Ar message
1297 56c96eff 2022-08-30 thomas .Op Fl r Ar repository-path
1298 56c96eff 2022-08-30 thomas .Op Fl s Ar signer-id
1299 56c96eff 2022-08-30 thomas .Ar name
1300 56c96eff 2022-08-30 thomas .Xc
1301 8e7bd50a 2019-08-22 stsp Manage tags in a repository.
1302 8e7bd50a 2019-08-22 stsp .Pp
1303 8e7bd50a 2019-08-22 stsp Tags are managed via references which live in the
1304 8e7bd50a 2019-08-22 stsp .Dq refs/tags/
1305 8e7bd50a 2019-08-22 stsp reference namespace.
1306 8e7bd50a 2019-08-22 stsp The
1307 8e7bd50a 2019-08-22 stsp .Cm got tag
1308 8e7bd50a 2019-08-22 stsp command operates on references in this namespace only.
1309 b3cd068e 2019-08-22 stsp References in this namespace point at tag objects which contain a pointer
1310 b3cd068e 2019-08-22 stsp to another object, a tag message, as well as author and timestamp information.
1311 8e7bd50a 2019-08-22 stsp .Pp
1312 80106605 2020-02-24 stsp Attempt to create a tag with the given
1313 8e7bd50a 2019-08-22 stsp .Ar name ,
1314 8e7bd50a 2019-08-22 stsp and make this tag point at the given
1315 8e7bd50a 2019-08-22 stsp .Ar commit .
1316 8e7bd50a 2019-08-22 stsp If no commit is specified, default to the latest commit on the work tree's
1317 8e7bd50a 2019-08-22 stsp current branch if invoked in a work tree, and to a commit resolved via
1318 8e7bd50a 2019-08-22 stsp the repository's HEAD reference otherwise.
1319 8e7bd50a 2019-08-22 stsp .Pp
1320 8e7bd50a 2019-08-22 stsp The options for
1321 8e7bd50a 2019-08-22 stsp .Cm got tag
1322 8e7bd50a 2019-08-22 stsp are as follows:
1323 8e7bd50a 2019-08-22 stsp .Bl -tag -width Ds
1324 80106605 2020-02-24 stsp .It Fl c Ar commit
1325 80106605 2020-02-24 stsp Make the newly created tag reference point at the specified
1326 80106605 2020-02-24 stsp .Ar commit .
1327 80106605 2020-02-24 stsp The expected
1328 80106605 2020-02-24 stsp .Ar commit
1329 80106605 2020-02-24 stsp argument is a commit ID SHA1 hash or an existing reference or tag name which
1330 80106605 2020-02-24 stsp will be resolved to a commit ID.
1331 80106605 2020-02-24 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1332 80106605 2020-02-24 stsp automatically, provided the abbreviation is unique.
1333 d6506a3d 2022-08-16 thomas .It Fl l
1334 d6506a3d 2022-08-16 thomas List all existing tags in the repository instead of creating a new tag.
1335 d6506a3d 2022-08-16 thomas If a
1336 d6506a3d 2022-08-16 thomas .Ar name
1337 d6506a3d 2022-08-16 thomas argument is passed, show only the tag with the given
1338 d6506a3d 2022-08-16 thomas .Ar name .
1339 8e7bd50a 2019-08-22 stsp .It Fl m Ar message
1340 80106605 2020-02-24 stsp Use the specified tag message when creating the new tag.
1341 8e7bd50a 2019-08-22 stsp Without the
1342 8e7bd50a 2019-08-22 stsp .Fl m
1343 8e7bd50a 2019-08-22 stsp option,
1344 3a62228f 2019-11-08 stsp .Cm got tag
1345 8e7bd50a 2019-08-22 stsp opens a temporary file in an editor where a tag message can be written.
1346 8e7bd50a 2019-08-22 stsp .It Fl r Ar repository-path
1347 8e7bd50a 2019-08-22 stsp Use the repository at the specified path.
1348 8e7bd50a 2019-08-22 stsp If not specified, assume the repository is located at or above the current
1349 8e7bd50a 2019-08-22 stsp working directory.
1350 8e7bd50a 2019-08-22 stsp If this directory is a
1351 8e7bd50a 2019-08-22 stsp .Nm
1352 8e7bd50a 2019-08-22 stsp work tree, use the repository path associated with this work tree.
1353 839dd04f 2022-07-04 thomas .It Fl s Ar signer-id
1354 839dd04f 2022-07-04 thomas While creating a new tag, sign this tag with the identity given in
1355 839dd04f 2022-07-04 thomas .Ar signer-id .
1356 839dd04f 2022-07-04 thomas .Pp
1357 839dd04f 2022-07-04 thomas For SSH-based signatures,
1358 839dd04f 2022-07-04 thomas .Ar signer-id
1359 839dd04f 2022-07-04 thomas is the path to a file which may refer to either a private SSH key,
1360 839dd04f 2022-07-04 thomas or a public SSH key with the private half available via
1361 839dd04f 2022-07-04 thomas .Xr ssh-agent 1 .
1362 839dd04f 2022-07-04 thomas .Cm got tag
1363 839dd04f 2022-07-04 thomas will sign the tag object by invoking
1364 839dd04f 2022-07-04 thomas .Xr ssh-keygen 1
1365 839dd04f 2022-07-04 thomas with the
1366 b6bfeb85 2022-08-16 thomas .Fl Y Cm sign
1367 839dd04f 2022-07-04 thomas command, using the signature namespace
1368 839dd04f 2022-07-04 thomas .Dq git
1369 839dd04f 2022-07-04 thomas for compatibility with
1370 839dd04f 2022-07-04 thomas .Xr git 1 .
1371 839dd04f 2022-07-04 thomas .It Fl V
1372 839dd04f 2022-07-04 thomas Verify tag object signatures.
1373 839dd04f 2022-07-04 thomas If a
1374 839dd04f 2022-07-04 thomas .Ar name
1375 839dd04f 2022-07-04 thomas is specified, show and verify the tag object with the provided name.
1376 839dd04f 2022-07-04 thomas Otherwise, list all tag objects and verify signatures where present.
1377 839dd04f 2022-07-04 thomas .Pp
1378 839dd04f 2022-07-04 thomas .Cm got tag
1379 839dd04f 2022-07-04 thomas verifies SSH-based signatures by invoking
1380 839dd04f 2022-07-04 thomas .Xr ssh-keygen 1
1381 839dd04f 2022-07-04 thomas with the options
1382 b6bfeb85 2022-08-16 thomas .Fl Y Cm verify Fl f Ar allowed_signers .
1383 839dd04f 2022-07-04 thomas A path to the
1384 839dd04f 2022-07-04 thomas .Ar allowed_signers
1385 839dd04f 2022-07-04 thomas file must be set in
1386 839dd04f 2022-07-04 thomas .Xr got.conf 5 ,
1387 839dd04f 2022-07-04 thomas otherwise verification is impossible.
1388 d6506a3d 2022-08-16 thomas .It Fl v
1389 d6506a3d 2022-08-16 thomas Verbose mode.
1390 d6506a3d 2022-08-16 thomas During SSH signature creation and verification this option will be passed to
1391 d6506a3d 2022-08-16 thomas .Xr ssh-keygen 1 .
1392 d6506a3d 2022-08-16 thomas Multiple -v options increase the verbosity.
1393 d6506a3d 2022-08-16 thomas The maximum is 3.
1394 8e7bd50a 2019-08-22 stsp .El
1395 8e7bd50a 2019-08-22 stsp .Pp
1396 8e7bd50a 2019-08-22 stsp By design, the
1397 8e7bd50a 2019-08-22 stsp .Cm got tag
1398 8e7bd50a 2019-08-22 stsp command will not delete tags or change existing tags.
1399 8e7bd50a 2019-08-22 stsp If a tag must be deleted, the
1400 8e7bd50a 2019-08-22 stsp .Cm got ref
1401 8e7bd50a 2019-08-22 stsp command may be used to delete a tag's reference.
1402 8e7bd50a 2019-08-22 stsp This should only be done if the tag has not already been copied to
1403 8e7bd50a 2019-08-22 stsp another repository.
1404 56c96eff 2022-08-30 thomas .It Xo
1405 56c96eff 2022-08-30 thomas .Cm add
1406 56c96eff 2022-08-30 thomas .Op Fl IR
1407 56c96eff 2022-08-30 thomas .Ar path ...
1408 56c96eff 2022-08-30 thomas .Xc
1409 8125ddca 2019-05-11 stsp Schedule unversioned files in a work tree for addition to the
1410 d00136be 2019-03-26 stsp repository in the next commit.
1411 ff56836b 2021-07-08 stsp By default, files which match a
1412 ff56836b 2021-07-08 stsp .Cm got status
1413 ff56836b 2021-07-08 stsp ignore pattern will not be added.
1414 4e68cba3 2019-11-23 stsp .Pp
1415 b21ebdb0 2023-06-22 thomas If a
1416 b21ebdb0 2023-06-22 thomas .Ar path
1417 b21ebdb0 2023-06-22 thomas mentioned in the command line is not an unversioned file then
1418 b21ebdb0 2023-06-22 thomas .Cm got add
1419 b21ebdb0 2023-06-22 thomas may raise an error.
1420 b21ebdb0 2023-06-22 thomas To avoid unnecessary errors from paths picked up by file globbing patterns
1421 b21ebdb0 2023-06-22 thomas in the shell, paths in the argument list will be silently ignored if they
1422 b21ebdb0 2023-06-22 thomas are not reported by
1423 b21ebdb0 2023-06-22 thomas .Cm got status
1424 b21ebdb0 2023-06-22 thomas at all, or if they are reported with one of the following status codes
1425 b21ebdb0 2023-06-22 thomas and do not have changes staged via
1426 b21ebdb0 2023-06-22 thomas .Cm got stage :
1427 b21ebdb0 2023-06-22 thomas .Bl -column YXZ description
1428 b21ebdb0 2023-06-22 thomas .It M Ta modified file
1429 b21ebdb0 2023-06-22 thomas .It A Ta file scheduled for addition in next commit
1430 b21ebdb0 2023-06-22 thomas .It C Ta modified or added file which contains merge conflicts
1431 b21ebdb0 2023-06-22 thomas .It m Ta modified file modes (executable bit only)
1432 b21ebdb0 2023-06-22 thomas .El
1433 b21ebdb0 2023-06-22 thomas .Pp
1434 4e68cba3 2019-11-23 stsp The options for
1435 4e68cba3 2019-11-23 stsp .Cm got add
1436 4e68cba3 2019-11-23 stsp are as follows:
1437 4e68cba3 2019-11-23 stsp .Bl -tag -width Ds
1438 d6506a3d 2022-08-16 thomas .It Fl I
1439 d6506a3d 2022-08-16 thomas Add files even if they match a
1440 d6506a3d 2022-08-16 thomas .Cm got status
1441 d6506a3d 2022-08-16 thomas ignore pattern.
1442 4e68cba3 2019-11-23 stsp .It Fl R
1443 4e68cba3 2019-11-23 stsp Permit recursion into directories.
1444 4e68cba3 2019-11-23 stsp If this option is not specified,
1445 4e68cba3 2019-11-23 stsp .Cm got add
1446 4e68cba3 2019-11-23 stsp will refuse to run if a specified
1447 4e68cba3 2019-11-23 stsp .Ar path
1448 4e68cba3 2019-11-23 stsp is a directory.
1449 4e68cba3 2019-11-23 stsp .El
1450 e8aa341a 2021-10-08 thomas .Tg rm
1451 56c96eff 2022-08-30 thomas .It Xo
1452 56c96eff 2022-08-30 thomas .Cm remove
1453 56c96eff 2022-08-30 thomas .Op Fl fkR
1454 56c96eff 2022-08-30 thomas .Op Fl s Ar status-codes
1455 56c96eff 2022-08-30 thomas .Ar path ...
1456 56c96eff 2022-08-30 thomas .Xc
1457 d912d125 2021-11-04 thomas .Dl Pq alias: Cm rm
1458 17ed4618 2019-06-02 stsp Remove versioned files from a work tree and schedule them for deletion
1459 2ec1f75b 2019-03-26 stsp from the repository in the next commit.
1460 2ec1f75b 2019-03-26 stsp .Pp
1461 2ec1f75b 2019-03-26 stsp The options for
1462 86d25a1b 2019-07-11 stsp .Cm got remove
1463 2ec1f75b 2019-03-26 stsp are as follows:
1464 2ec1f75b 2019-03-26 stsp .Bl -tag -width Ds
1465 2ec1f75b 2019-03-26 stsp .It Fl f
1466 d64cc78a 2022-01-25 thomas Perform the operation even if a file contains local modifications,
1467 d64cc78a 2022-01-25 thomas and do not raise an error if a specified
1468 d64cc78a 2022-01-25 thomas .Ar path
1469 d64cc78a 2022-01-25 thomas does not exist on disk.
1470 70e3e7f5 2019-12-13 tracey .It Fl k
1471 70e3e7f5 2019-12-13 tracey Keep affected files on disk.
1472 f2a9dc41 2019-12-13 tracey .It Fl R
1473 f2a9dc41 2019-12-13 tracey Permit recursion into directories.
1474 f2a9dc41 2019-12-13 tracey If this option is not specified,
1475 f2a9dc41 2019-12-13 tracey .Cm got remove
1476 f2a9dc41 2019-12-13 tracey will refuse to run if a specified
1477 f2a9dc41 2019-12-13 tracey .Ar path
1478 f2a9dc41 2019-12-13 tracey is a directory.
1479 766841c2 2020-08-13 stsp .It Fl s Ar status-codes
1480 766841c2 2020-08-13 stsp Only delete files with a modification status matching one of the
1481 766841c2 2020-08-13 stsp single-character status codes contained in the
1482 766841c2 2020-08-13 stsp .Ar status-codes
1483 766841c2 2020-08-13 stsp argument.
1484 766841c2 2020-08-13 stsp The following status codes may be specified:
1485 766841c2 2020-08-13 stsp .Bl -column YXZ description
1486 766841c2 2020-08-13 stsp .It M Ta modified file (this implies the
1487 766841c2 2020-08-13 stsp .Fl f
1488 766841c2 2020-08-13 stsp option)
1489 766841c2 2020-08-13 stsp .It ! Ta versioned file expected on disk but missing
1490 766841c2 2020-08-13 stsp .El
1491 d0eebce4 2019-03-11 stsp .El
1492 069bbb86 2022-03-07 thomas .Tg pa
1493 56c96eff 2022-08-30 thomas .It Xo
1494 56c96eff 2022-08-30 thomas .Cm patch
1495 56c96eff 2022-08-30 thomas .Op Fl nR
1496 56c96eff 2022-08-30 thomas .Op Fl c Ar commit
1497 56c96eff 2022-08-30 thomas .Op Fl p Ar strip-count
1498 56c96eff 2022-08-30 thomas .Op Ar patchfile
1499 56c96eff 2022-08-30 thomas .Xc
1500 069bbb86 2022-03-07 thomas .Dl Pq alias: Cm pa
1501 069bbb86 2022-03-07 thomas Apply changes from
1502 069bbb86 2022-03-07 thomas .Ar patchfile
1503 07f74738 2022-03-13 thomas to files in a work tree.
1504 443c08c9 2022-03-13 thomas Files added or removed by a patch will be scheduled for addition or removal in
1505 443c08c9 2022-03-13 thomas the work tree.
1506 07f74738 2022-03-13 thomas .Pp
1507 07f74738 2022-03-13 thomas The patch must be in the unified diff format as produced by
1508 07f74738 2022-03-13 thomas .Cm got diff ,
1509 99e34129 2022-03-22 thomas .Xr git-diff 1 ,
1510 4929098b 2022-03-13 thomas or by
1511 07f74738 2022-03-13 thomas .Xr diff 1
1512 3eb4f629 2022-03-22 thomas and
1513 3eb4f629 2022-03-22 thomas .Xr cvs 1
1514 6f7394ad 2022-03-22 thomas diff when invoked with their
1515 07f74738 2022-03-13 thomas .Fl u
1516 6f7394ad 2022-03-22 thomas options.
1517 07f74738 2022-03-13 thomas If no
1518 069bbb86 2022-03-07 thomas .Ar patchfile
1519 07f74738 2022-03-13 thomas argument is provided, read unified diff data from standard input instead.
1520 07f74738 2022-03-13 thomas .Pp
1521 07f74738 2022-03-13 thomas If the
1522 07f74738 2022-03-13 thomas .Ar patchfile
1523 4b06140e 2022-03-22 thomas contains multiple patches, then attempt to apply each of them in sequence.
1524 069bbb86 2022-03-07 thomas .Pp
1525 4929098b 2022-03-13 thomas Show the status of each affected file, using the following status codes:
1526 069bbb86 2022-03-07 thomas .Bl -column XYZ description
1527 07f74738 2022-03-13 thomas .It M Ta file was modified
1528 762b8e82 2022-06-23 thomas .It G Ta file was merged using a merge-base found in the repository
1529 762b8e82 2022-06-23 thomas .It C Ta file was merged and conflicts occurred during merge
1530 07f74738 2022-03-13 thomas .It D Ta file was deleted
1531 07f74738 2022-03-13 thomas .It A Ta file was added
1532 49114f01 2022-03-22 thomas .It # Ta failed to patch the file
1533 069bbb86 2022-03-07 thomas .El
1534 069bbb86 2022-03-07 thomas .Pp
1535 07f74738 2022-03-13 thomas If a change does not match at its exact line number, attempt to
1536 4929098b 2022-03-13 thomas apply it somewhere else in the file if a good spot can be found.
1537 4929098b 2022-03-13 thomas Otherwise, the patch will fail to apply.
1538 2cfc25ac 2022-03-13 thomas .Pp
1539 2cfc25ac 2022-03-13 thomas .Nm
1540 2cfc25ac 2022-03-13 thomas .Cm patch
1541 2cfc25ac 2022-03-13 thomas will refuse to apply a patch if certain preconditions are not met.
1542 4929098b 2022-03-13 thomas Files to be deleted must already be under version control, and must
1543 4929098b 2022-03-13 thomas not have been scheduled for deletion already.
1544 4929098b 2022-03-13 thomas Files to be added must not yet be under version control and must not
1545 4929098b 2022-03-13 thomas already be present on disk.
1546 4929098b 2022-03-13 thomas Files to be modified must already be under version control and may not
1547 4929098b 2022-03-13 thomas contain conflict markers.
1548 2cfc25ac 2022-03-13 thomas .Pp
1549 2cfc25ac 2022-03-13 thomas If an error occurs, the
1550 2cfc25ac 2022-03-13 thomas .Cm patch
1551 2cfc25ac 2022-03-13 thomas operation will be aborted.
1552 2cfc25ac 2022-03-13 thomas Any changes made to the work tree up to this point will be left behind.
1553 07f74738 2022-03-13 thomas Such changes can be viewed with
1554 2cfc25ac 2022-03-13 thomas .Cm got diff
1555 2cfc25ac 2022-03-13 thomas and can be reverted with
1556 2cfc25ac 2022-03-13 thomas .Cm got revert
1557 2cfc25ac 2022-03-13 thomas if needed.
1558 bfc91212 2022-03-13 thomas .Pp
1559 bfc91212 2022-03-13 thomas The options for
1560 bfc91212 2022-03-13 thomas .Cm got patch
1561 bfc91212 2022-03-13 thomas are as follows:
1562 bfc91212 2022-03-13 thomas .Bl -tag -width Ds
1563 7d8bcb99 2022-07-28 thomas .It Fl c Ar commit
1564 82a8b7ec 2022-08-06 thomas Attempt to locate files within the specified
1565 7d8bcb99 2022-07-28 thomas .Ar commit
1566 82a8b7ec 2022-08-06 thomas for use as a merge-base for 3-way merges.
1567 82a8b7ec 2022-08-06 thomas Ideally, the specified
1568 82a8b7ec 2022-08-06 thomas .Ar commit
1569 82a8b7ec 2022-08-06 thomas should contain versions of files which the changes contained in the
1570 82a8b7ec 2022-08-06 thomas .Ar patchfile
1571 82a8b7ec 2022-08-06 thomas were based on.
1572 82a8b7ec 2022-08-06 thomas Files will be located by path, relative to the repository root.
1573 82a8b7ec 2022-08-06 thomas If the
1574 ef0937d6 2022-07-28 thomas .Fl p
1575 82a8b7ec 2022-08-06 thomas option is used then leading path components will be stripped
1576 82a8b7ec 2022-08-06 thomas before paths are looked up in the repository.
1577 82a8b7ec 2022-08-06 thomas .Pp
1578 82a8b7ec 2022-08-06 thomas If the
1579 82a8b7ec 2022-08-06 thomas .Fl c
1580 82a8b7ec 2022-08-06 thomas option is not used then
1581 82a8b7ec 2022-08-06 thomas .Cm got patch
1582 82a8b7ec 2022-08-06 thomas will attempt to locate merge-bases via object IDs found in
1583 82a8b7ec 2022-08-06 thomas .Ar patchfile
1584 82a8b7ec 2022-08-06 thomas meta-data, such as produced by
1585 82a8b7ec 2022-08-06 thomas .Cm got diff
1586 82a8b7ec 2022-08-06 thomas or
1587 82a8b7ec 2022-08-06 thomas .Xr git-diff 1 .
1588 82a8b7ec 2022-08-06 thomas Use of the
1589 82a8b7ec 2022-08-06 thomas .Fl c
1590 82a8b7ec 2022-08-06 thomas option is only recommended in the absence of such meta-data.
1591 82a8b7ec 2022-08-06 thomas .Pp
1592 82a8b7ec 2022-08-06 thomas In case no merge-base is available for a file, changes will be applied
1593 82a8b7ec 2022-08-06 thomas without doing a 3-way merge.
1594 82a8b7ec 2022-08-06 thomas Changes which do not apply cleanly may then be rejected entirely, rather
1595 82a8b7ec 2022-08-06 thomas than producing merge conflicts in the patched target file.
1596 bfc91212 2022-03-13 thomas .It Fl n
1597 bfc91212 2022-03-13 thomas Do not make any modifications to the work tree.
1598 bfc91212 2022-03-13 thomas This can be used to check whether a patch would apply without issues.
1599 bfc91212 2022-03-13 thomas If the
1600 bfc91212 2022-03-13 thomas .Ar patchfile
1601 4b06140e 2022-03-22 thomas contains diffs that affect the same file multiple times, the results
1602 bfc91212 2022-03-13 thomas displayed may be incorrect.
1603 d9db2ff9 2022-04-16 thomas .It Fl p Ar strip-count
1604 d9db2ff9 2022-04-16 thomas Specify the number of leading path components to strip from paths
1605 d9db2ff9 2022-04-16 thomas parsed from
1606 d9db2ff9 2022-04-16 thomas .Ar patchfile .
1607 d9db2ff9 2022-04-16 thomas If the
1608 d9db2ff9 2022-04-16 thomas .Fl p
1609 d9db2ff9 2022-04-16 thomas option is not used,
1610 d9db2ff9 2022-04-16 thomas .Sq a/
1611 d9db2ff9 2022-04-16 thomas and
1612 d9db2ff9 2022-04-16 thomas .Sq b/
1613 d9db2ff9 2022-04-16 thomas path prefixes generated by
1614 d9db2ff9 2022-04-16 thomas .Xr git-diff 1
1615 d9db2ff9 2022-04-16 thomas will be recognized and stripped automatically.
1616 eaef698f 2022-04-23 thomas .It Fl R
1617 eaef698f 2022-04-23 thomas Reverse the patch before applying it.
1618 bfc91212 2022-03-13 thomas .El
1619 e8aa341a 2021-10-08 thomas .Tg rv
1620 56c96eff 2022-08-30 thomas .It Xo
1621 56c96eff 2022-08-30 thomas .Cm revert
1622 56c96eff 2022-08-30 thomas .Op Fl pR
1623 56c96eff 2022-08-30 thomas .Op Fl F Ar response-script
1624 56c96eff 2022-08-30 thomas .Ar path ...
1625 56c96eff 2022-08-30 thomas .Xc
1626 d912d125 2021-11-04 thomas .Dl Pq alias: Cm rv
1627 bd81cfb7 2020-04-19 stsp Revert any local changes in files at the specified paths in a work tree.
1628 a129376b 2019-03-28 stsp File contents will be overwritten with those contained in the
1629 1dd86744 2019-08-12 anthony work tree's base commit.
1630 1dd86744 2019-08-12 anthony There is no way to bring discarded changes back after
1631 a129376b 2019-03-28 stsp .Cm got revert !
1632 a129376b 2019-03-28 stsp .Pp
1633 e20a8b6f 2019-06-04 stsp If a file was added with
1634 4b06140e 2022-03-22 thomas .Cm got add ,
1635 a129376b 2019-03-28 stsp it will become an unversioned file again.
1636 e20a8b6f 2019-06-04 stsp If a file was deleted with
1637 4b06140e 2022-03-22 thomas .Cm got remove ,
1638 a129376b 2019-03-28 stsp it will be restored.
1639 0f6d7415 2019-08-08 stsp .Pp
1640 0f6d7415 2019-08-08 stsp The options for
1641 0f6d7415 2019-08-08 stsp .Cm got revert
1642 0f6d7415 2019-08-08 stsp are as follows:
1643 0f6d7415 2019-08-08 stsp .Bl -tag -width Ds
1644 d6506a3d 2022-08-16 thomas .It Fl F Ar response-script
1645 d6506a3d 2022-08-16 thomas With the
1646 d6506a3d 2022-08-16 thomas .Fl p
1647 d6506a3d 2022-08-16 thomas option, read
1648 d6506a3d 2022-08-16 thomas .Dq y ,
1649 d6506a3d 2022-08-16 thomas .Dq n ,
1650 d6506a3d 2022-08-16 thomas and
1651 d6506a3d 2022-08-16 thomas .Dq q
1652 d6506a3d 2022-08-16 thomas responses line-by-line from the specified
1653 d6506a3d 2022-08-16 thomas .Ar response-script
1654 d6506a3d 2022-08-16 thomas file instead of prompting interactively.
1655 33aa809d 2019-08-08 stsp .It Fl p
1656 33aa809d 2019-08-08 stsp Instead of reverting all changes in files, interactively select or reject
1657 33aa809d 2019-08-08 stsp changes to revert based on
1658 33aa809d 2019-08-08 stsp .Dq y
1659 33aa809d 2019-08-08 stsp (revert change),
1660 33aa809d 2019-08-08 stsp .Dq n
1661 33aa809d 2019-08-08 stsp (keep change), and
1662 33aa809d 2019-08-08 stsp .Dq q
1663 33aa809d 2019-08-08 stsp (quit reverting this file) responses.
1664 33aa809d 2019-08-08 stsp If a file is in modified status, individual patches derived from the
1665 33aa809d 2019-08-08 stsp modified file content can be reverted.
1666 33aa809d 2019-08-08 stsp Files in added or deleted status may only be reverted in their entirety.
1667 0f6d7415 2019-08-08 stsp .It Fl R
1668 0f6d7415 2019-08-08 stsp Permit recursion into directories.
1669 0f6d7415 2019-08-08 stsp If this option is not specified,
1670 0f6d7415 2019-08-08 stsp .Cm got revert
1671 0f6d7415 2019-08-08 stsp will refuse to run if a specified
1672 0f6d7415 2019-08-08 stsp .Ar path
1673 0f6d7415 2019-08-08 stsp is a directory.
1674 0f6d7415 2019-08-08 stsp .El
1675 e8aa341a 2021-10-08 thomas .Tg ci
1676 56c96eff 2022-08-30 thomas .It Xo
1677 56c96eff 2022-08-30 thomas .Cm commit
1678 be94c032 2023-02-20 thomas .Op Fl CNnS
1679 56c96eff 2022-08-30 thomas .Op Fl A Ar author
1680 56c96eff 2022-08-30 thomas .Op Fl F Ar path
1681 56c96eff 2022-08-30 thomas .Op Fl m Ar message
1682 56c96eff 2022-08-30 thomas .Op Ar path ...
1683 56c96eff 2022-08-30 thomas .Xc
1684 d912d125 2021-11-04 thomas .Dl Pq alias: Cm ci
1685 4ed9f614 2019-08-04 stsp Create a new commit in the repository from changes in a work tree
1686 15cd91f7 2019-05-12 stsp and use this commit as the new base commit for the work tree.
1687 5c1e53bc 2019-07-28 stsp If no
1688 90e8619e 2019-07-25 stsp .Ar path
1689 4ed9f614 2019-08-04 stsp is specified, commit all changes in the work tree.
1690 4ed9f614 2019-08-04 stsp Otherwise, commit changes at or within the specified paths.
1691 15cd91f7 2019-05-12 stsp .Pp
1692 4ed9f614 2019-08-04 stsp If changes have been explicitly staged for commit with
1693 1dd86744 2019-08-12 anthony .Cm got stage ,
1694 4ed9f614 2019-08-04 stsp only commit staged changes and reject any specified paths which
1695 4ed9f614 2019-08-04 stsp have not been staged.
1696 4ed9f614 2019-08-04 stsp .Pp
1697 28cf319f 2021-01-28 stsp .Cm got commit
1698 28cf319f 2021-01-28 stsp opens a temporary file in an editor where a log message can be written
1699 28cf319f 2021-01-28 stsp unless the
1700 28cf319f 2021-01-28 stsp .Fl m
1701 28cf319f 2021-01-28 stsp option is used
1702 28cf319f 2021-01-28 stsp or the
1703 28cf319f 2021-01-28 stsp .Fl F
1704 28cf319f 2021-01-28 stsp and
1705 28cf319f 2021-01-28 stsp .Fl N
1706 28cf319f 2021-01-28 stsp options are used together.
1707 28cf319f 2021-01-28 stsp .Pp
1708 15cd91f7 2019-05-12 stsp Show the status of each affected file, using the following status codes:
1709 15cd91f7 2019-05-12 stsp .Bl -column YXZ description
1710 15cd91f7 2019-05-12 stsp .It M Ta modified file
1711 15cd91f7 2019-05-12 stsp .It D Ta file was deleted
1712 15cd91f7 2019-05-12 stsp .It A Ta new file was added
1713 1ebedb77 2019-10-19 stsp .It m Ta modified file modes (executable bit only)
1714 15cd91f7 2019-05-12 stsp .El
1715 15cd91f7 2019-05-12 stsp .Pp
1716 996d5ccd 2019-08-05 stsp Files which are not part of the new commit will retain their previously
1717 996d5ccd 2019-08-05 stsp recorded base commit.
1718 15cd91f7 2019-05-12 stsp Some
1719 15cd91f7 2019-05-12 stsp .Nm
1720 15cd91f7 2019-05-12 stsp commands may refuse to run while the work tree contains files from
1721 15cd91f7 2019-05-12 stsp multiple base commits.
1722 15cd91f7 2019-05-12 stsp The base commit of such a work tree can be made consistent by running
1723 47ec7be7 2019-05-12 stsp .Cm got update
1724 47ec7be7 2019-05-12 stsp across the entire work tree.
1725 15cd91f7 2019-05-12 stsp .Pp
1726 15cd91f7 2019-05-12 stsp The
1727 15cd91f7 2019-05-12 stsp .Cm got commit
1728 15cd91f7 2019-05-12 stsp command requires the
1729 74416c47 2019-05-09 stsp .Ev GOT_AUTHOR
1730 aba9c984 2019-09-08 stsp environment variable to be set,
1731 257add31 2020-09-09 stsp unless an author has been configured in
1732 257add31 2020-09-09 stsp .Xr got.conf 5
1733 257add31 2020-09-09 stsp or Git's
1734 aba9c984 2019-09-08 stsp .Dv user.name
1735 aba9c984 2019-09-08 stsp and
1736 709ae9eb 2019-09-08 stsp .Dv user.email
1737 709ae9eb 2019-09-08 stsp configuration settings can be
1738 aba9c984 2019-09-08 stsp obtained from the repository's
1739 aba9c984 2019-09-08 stsp .Pa .git/config
1740 c9956ddf 2019-09-08 stsp file or from Git's global
1741 c9956ddf 2019-09-08 stsp .Pa ~/.gitconfig
1742 c9956ddf 2019-09-08 stsp configuration file.
1743 74416c47 2019-05-09 stsp .Pp
1744 74416c47 2019-05-09 stsp The options for
1745 74416c47 2019-05-09 stsp .Cm got commit
1746 74416c47 2019-05-09 stsp are as follows:
1747 74416c47 2019-05-09 stsp .Bl -tag -width Ds
1748 18d1acad 2022-07-20 thomas .It Fl A Ar author
1749 18d1acad 2022-07-20 thomas Set author information in the newly created commit to
1750 18d1acad 2022-07-20 thomas .Ar author .
1751 fbbd3dd5 2023-02-17 thomas This is useful when committing changes on behalf of someone else.
1752 18d1acad 2022-07-20 thomas The
1753 18d1acad 2022-07-20 thomas .Ar author
1754 18d1acad 2022-07-20 thomas argument must use the same format as the
1755 18d1acad 2022-07-20 thomas .Ev GOT_AUTHOR
1756 18d1acad 2022-07-20 thomas environment variable.
1757 18d1acad 2022-07-20 thomas .Pp
1758 18d1acad 2022-07-20 thomas In addition to storing author information, the newly created commit
1759 18d1acad 2022-07-20 thomas object will retain
1760 18d1acad 2022-07-20 thomas .Dq committer
1761 18d1acad 2022-07-20 thomas information which is obtained, as usual, from the
1762 18d1acad 2022-07-20 thomas .Ev GOT_AUTHOR
1763 18d1acad 2022-07-20 thomas environment variable, or
1764 18d1acad 2022-07-20 thomas .Xr got.conf 5 ,
1765 18d1acad 2022-07-20 thomas or Git configuration settings.
1766 be94c032 2023-02-20 thomas .It Fl C
1767 be94c032 2023-02-20 thomas Allow committing files in conflicted status.
1768 be94c032 2023-02-20 thomas .Pp
1769 be94c032 2023-02-20 thomas Committing files with conflict markers should generally be avoided.
1770 be94c032 2023-02-20 thomas Cases where conflict markers must be stored in the repository for
1771 be94c032 2023-02-20 thomas some legitimate reason should be very rare.
1772 be94c032 2023-02-20 thomas There are usually ways to avoid storing conflict markers verbatim by
1773 be94c032 2023-02-20 thomas applying appropriate programming tricks.
1774 28cf319f 2021-01-28 stsp .It Fl F Ar path
1775 28cf319f 2021-01-28 stsp Use the prepared log message stored in the file found at
1776 28cf319f 2021-01-28 stsp .Ar path
1777 28cf319f 2021-01-28 stsp when creating the new commit.
1778 28cf319f 2021-01-28 stsp .Cm got commit
1779 28cf319f 2021-01-28 stsp opens a temporary file in an editor where the prepared log message can be
1780 28cf319f 2021-01-28 stsp reviewed and edited further if needed.
1781 28cf319f 2021-01-28 stsp Cannot be used together with the
1782 23594da9 2019-05-13 stsp .Fl m
1783 28cf319f 2021-01-28 stsp option.
1784 28cf319f 2021-01-28 stsp .It Fl m Ar message
1785 28cf319f 2021-01-28 stsp Use the specified log message when creating the new commit.
1786 28cf319f 2021-01-28 stsp Cannot be used together with the
1787 28cf319f 2021-01-28 stsp .Fl F
1788 28cf319f 2021-01-28 stsp option.
1789 28cf319f 2021-01-28 stsp .It Fl N
1790 28cf319f 2021-01-28 stsp This option prevents
1791 23594da9 2019-05-13 stsp .Cm got commit
1792 28cf319f 2021-01-28 stsp from opening the commit message in an editor.
1793 28cf319f 2021-01-28 stsp It has no effect unless it is used together with the
1794 28cf319f 2021-01-28 stsp .Fl F
1795 28cf319f 2021-01-28 stsp option and is intended for non-interactive use such as scripting.
1796 ef899790 2022-11-01 thomas .It Fl n
1797 ef899790 2022-11-01 thomas This option prevents
1798 ef899790 2022-11-01 thomas .Cm got commit
1799 ef899790 2022-11-01 thomas from generating a diff of the to-be-committed changes in a temporary file
1800 ef899790 2022-11-01 thomas which can be viewed while editing a commit message.
1801 35213c7c 2020-07-23 stsp .It Fl S
1802 af358f55 2020-07-23 stsp Allow the addition of symbolic links which point outside of the path space
1803 af358f55 2020-07-23 stsp that is under version control.
1804 af358f55 2020-07-23 stsp By default,
1805 af358f55 2020-07-23 stsp .Cm got commit
1806 af358f55 2020-07-23 stsp will reject such symbolic links due to safety concerns.
1807 35213c7c 2020-07-23 stsp As a precaution,
1808 35213c7c 2020-07-23 stsp .Nm
1809 af358f55 2020-07-23 stsp may decide to represent such a symbolic link as a regular file which contains
1810 af358f55 2020-07-23 stsp the link's target path, rather than creating an actual symbolic link which
1811 af358f55 2020-07-23 stsp points outside of the work tree.
1812 af358f55 2020-07-23 stsp Use of this option is discouraged because external mechanisms such as
1813 af358f55 2020-07-23 stsp .Dq make obj
1814 af358f55 2020-07-23 stsp are better suited for managing symbolic links to paths not under
1815 af358f55 2020-07-23 stsp version control.
1816 2ec1f75b 2019-03-26 stsp .El
1817 cfce0458 2019-07-28 stsp .Pp
1818 cfce0458 2019-07-28 stsp .Cm got commit
1819 cfce0458 2019-07-28 stsp will refuse to run if certain preconditions are not met.
1820 916f288c 2019-07-30 stsp If the work tree's current branch is not in the
1821 916f288c 2019-07-30 stsp .Dq refs/heads/
1822 916f288c 2019-07-30 stsp reference namespace, new commits may not be created on this branch.
1823 cfce0458 2019-07-28 stsp Local changes may only be committed if they are based on file content
1824 cfce0458 2019-07-28 stsp found in the most recent commit on the work tree's branch.
1825 cfce0458 2019-07-28 stsp If a path is found to be out of date,
1826 cfce0458 2019-07-28 stsp .Cm got update
1827 cfce0458 2019-07-28 stsp must be used first in order to merge local changes with changes made
1828 cfce0458 2019-07-28 stsp in the repository.
1829 e8aa341a 2021-10-08 thomas .Tg se
1830 56c96eff 2022-08-30 thomas .It Xo
1831 56c96eff 2022-08-30 thomas .Cm send
1832 56c96eff 2022-08-30 thomas .Op Fl afqTv
1833 56c96eff 2022-08-30 thomas .Op Fl b Ar branch
1834 56c96eff 2022-08-30 thomas .Op Fl d Ar branch
1835 56c96eff 2022-08-30 thomas .Op Fl r Ar repository-path
1836 56c96eff 2022-08-30 thomas .Op Fl t Ar tag
1837 56c96eff 2022-08-30 thomas .Op Ar remote-repository
1838 56c96eff 2022-08-30 thomas .Xc
1839 d912d125 2021-11-04 thomas .Dl Pq alias: Cm se
1840 f8a36e22 2021-08-26 stsp Send new changes to a remote repository.
1841 f8a36e22 2021-08-26 stsp If no
1842 f8a36e22 2021-08-26 stsp .Ar remote-repository
1843 f8a36e22 2021-08-26 stsp is specified,
1844 f8a36e22 2021-08-26 stsp .Dq origin
1845 f8a36e22 2021-08-26 stsp will be used.
1846 f8a36e22 2021-08-26 stsp The remote repository's URL is obtained from the corresponding entry in
1847 f8a36e22 2021-08-26 stsp .Xr got.conf 5
1848 f8a36e22 2021-08-26 stsp or Git's
1849 f8a36e22 2021-08-26 stsp .Pa config
1850 f8a36e22 2021-08-26 stsp file of the local repository, as created by
1851 f8a36e22 2021-08-26 stsp .Cm got clone .
1852 f8a36e22 2021-08-26 stsp .Pp
1853 f8a36e22 2021-08-26 stsp All objects corresponding to new changes will be written to a temporary
1854 f8a36e22 2021-08-26 stsp pack file which is then uploaded to the server.
1855 f8a36e22 2021-08-26 stsp Upon success, references in the
1856 f8a36e22 2021-08-26 stsp .Dq refs/remotes/
1857 f8a36e22 2021-08-26 stsp reference namespace of the local repository will be updated to point at
1858 f8a36e22 2021-08-26 stsp the commits which have been sent.
1859 f8a36e22 2021-08-26 stsp .Pp
1860 f8a36e22 2021-08-26 stsp By default, changes will only be sent if they are based on up-to-date
1861 f8a36e22 2021-08-26 stsp copies of relevant branches in the remote repository.
1862 fd44090b 2021-08-26 stsp If any changes to be sent are based on out-of-date copies or would
1863 fd44090b 2021-08-26 stsp otherwise break linear history of existing branches, new changes must
1864 fd44090b 2021-08-26 stsp be fetched from the server with
1865 f8a36e22 2021-08-26 stsp .Cm got fetch
1866 f8a36e22 2021-08-26 stsp and local branches must be rebased with
1867 f8a36e22 2021-08-26 stsp .Cm got rebase
1868 f8a36e22 2021-08-26 stsp before
1869 f8a36e22 2021-08-26 stsp .Cm got send
1870 f8a36e22 2021-08-26 stsp can succeed.
1871 fd44090b 2021-08-26 stsp The
1872 fd44090b 2021-08-26 stsp .Fl f
1873 fd44090b 2021-08-26 stsp option can be used to make exceptions to these requirements.
1874 f8a36e22 2021-08-26 stsp .Pp
1875 f8a36e22 2021-08-26 stsp The options for
1876 f8a36e22 2021-08-26 stsp .Cm got send
1877 f8a36e22 2021-08-26 stsp are as follows:
1878 f8a36e22 2021-08-26 stsp .Bl -tag -width Ds
1879 f8a36e22 2021-08-26 stsp .It Fl a
1880 f8a36e22 2021-08-26 stsp Send all branches from the local repository's
1881 f8a36e22 2021-08-26 stsp .Dq refs/heads/
1882 f8a36e22 2021-08-26 stsp reference namespace.
1883 f8a36e22 2021-08-26 stsp The
1884 f8a36e22 2021-08-26 stsp .Fl a
1885 f8a36e22 2021-08-26 stsp option is equivalent to listing all branches with multiple
1886 f8a36e22 2021-08-26 stsp .Fl b
1887 f8a36e22 2021-08-26 stsp options.
1888 f8a36e22 2021-08-26 stsp Cannot be used together with the
1889 f8a36e22 2021-08-26 stsp .Fl b
1890 f8a36e22 2021-08-26 stsp option.
1891 f8a36e22 2021-08-26 stsp .It Fl b Ar branch
1892 f8a36e22 2021-08-26 stsp Send the specified
1893 f8a36e22 2021-08-26 stsp .Ar branch
1894 f8a36e22 2021-08-26 stsp from the local repository's
1895 f8a36e22 2021-08-26 stsp .Dq refs/heads/
1896 f8a36e22 2021-08-26 stsp reference namespace.
1897 f8a36e22 2021-08-26 stsp This option may be specified multiple times to build a list of branches
1898 f8a36e22 2021-08-26 stsp to send.
1899 f8a36e22 2021-08-26 stsp If this option is not specified, default to the work tree's current branch
1900 f8a36e22 2021-08-26 stsp if invoked in a work tree, or to the repository's HEAD reference.
1901 f8a36e22 2021-08-26 stsp Cannot be used together with the
1902 f8a36e22 2021-08-26 stsp .Fl a
1903 f8a36e22 2021-08-26 stsp option.
1904 f8a36e22 2021-08-26 stsp .It Fl d Ar branch
1905 f8a36e22 2021-08-26 stsp Delete the specified
1906 f8a36e22 2021-08-26 stsp .Ar branch
1907 f8a36e22 2021-08-26 stsp from the remote repository's
1908 f8a36e22 2021-08-26 stsp .Dq refs/heads/
1909 f8a36e22 2021-08-26 stsp reference namespace.
1910 f8a36e22 2021-08-26 stsp This option may be specified multiple times to build a list of branches
1911 f8a36e22 2021-08-26 stsp to delete.
1912 f8a36e22 2021-08-26 stsp .Pp
1913 f8a36e22 2021-08-26 stsp Only references are deleted.
1914 f8a36e22 2021-08-26 stsp Any commit, tree, tag, and blob objects belonging to deleted branches
1915 f8a36e22 2021-08-26 stsp may become subject to deletion by Git's garbage collector running on
1916 f8a36e22 2021-08-26 stsp the server.
1917 f8a36e22 2021-08-26 stsp .Pp
1918 f8a36e22 2021-08-26 stsp Requesting deletion of branches results in an error if the server
1919 fd44090b 2021-08-26 stsp does not support this feature or disallows the deletion of branches
1920 fd44090b 2021-08-26 stsp based on its configuration.
1921 f8a36e22 2021-08-26 stsp .It Fl f
1922 fd44090b 2021-08-26 stsp Attempt to force the server to overwrite existing branches or tags
1923 fd44090b 2021-08-26 stsp in the remote repository, even when
1924 fd44090b 2021-08-26 stsp .Cm got fetch
1925 fd44090b 2021-08-26 stsp and
1926 fd44090b 2021-08-26 stsp .Cm got rebase
1927 fd44090b 2021-08-26 stsp would usually be required before changes can be sent.
1928 f8a36e22 2021-08-26 stsp The server may reject forced requests regardless, depending on its
1929 f8a36e22 2021-08-26 stsp configuration.
1930 f8a36e22 2021-08-26 stsp .Pp
1931 f8a36e22 2021-08-26 stsp Any commit, tree, tag, and blob objects belonging to overwritten branches
1932 f8a36e22 2021-08-26 stsp or tags may become subject to deletion by Git's garbage collector running
1933 f8a36e22 2021-08-26 stsp on the server.
1934 f8a36e22 2021-08-26 stsp .Pp
1935 f8a36e22 2021-08-26 stsp The
1936 f8a36e22 2021-08-26 stsp .Dq refs/tags
1937 f8a36e22 2021-08-26 stsp reference namespace is globally shared between all repositories.
1938 f8a36e22 2021-08-26 stsp Use of the
1939 f8a36e22 2021-08-26 stsp .Fl f
1940 f8a36e22 2021-08-26 stsp option to overwrite tags is discouraged because it can lead to
1941 f8a36e22 2021-08-26 stsp inconsistencies between the tags present in different repositories.
1942 f8a36e22 2021-08-26 stsp In general, creating a new tag with a different name is recommended
1943 f8a36e22 2021-08-26 stsp instead of overwriting an existing tag.
1944 f8a36e22 2021-08-26 stsp .Pp
1945 f8a36e22 2021-08-26 stsp Use of the
1946 f8a36e22 2021-08-26 stsp .Fl f
1947 f8a36e22 2021-08-26 stsp option is particularly discouraged if changes being sent are based
1948 f8a36e22 2021-08-26 stsp on an out-of-date copy of a branch in the remote repository.
1949 f8a36e22 2021-08-26 stsp Instead of using the
1950 f8a36e22 2021-08-26 stsp .Fl f
1951 f8a36e22 2021-08-26 stsp option, new changes should
1952 f8a36e22 2021-08-26 stsp be fetched with
1953 f8a36e22 2021-08-26 stsp .Cm got fetch
1954 f8a36e22 2021-08-26 stsp and local branches should be rebased with
1955 f8a36e22 2021-08-26 stsp .Cm got rebase ,
1956 f8a36e22 2021-08-26 stsp followed by another attempt to send the changes.
1957 f8a36e22 2021-08-26 stsp .Pp
1958 f8a36e22 2021-08-26 stsp The
1959 f8a36e22 2021-08-26 stsp .Fl f
1960 f8a36e22 2021-08-26 stsp option should only be needed in situations where the remote repository's
1961 f8a36e22 2021-08-26 stsp copy of a branch or tag is known to be out-of-date and is considered
1962 f8a36e22 2021-08-26 stsp disposable.
1963 f8a36e22 2021-08-26 stsp The risks of creating inconsistencies between different repositories
1964 f8a36e22 2021-08-26 stsp should also be taken into account.
1965 d6506a3d 2022-08-16 thomas .It Fl q
1966 d6506a3d 2022-08-16 thomas Suppress progress reporting output.
1967 d6506a3d 2022-08-16 thomas The same option will be passed to
1968 d6506a3d 2022-08-16 thomas .Xr ssh 1
1969 d6506a3d 2022-08-16 thomas if applicable.
1970 f8a36e22 2021-08-26 stsp .It Fl r Ar repository-path
1971 f8a36e22 2021-08-26 stsp Use the repository at the specified path.
1972 f8a36e22 2021-08-26 stsp If not specified, assume the repository is located at or above the current
1973 f8a36e22 2021-08-26 stsp working directory.
1974 f8a36e22 2021-08-26 stsp If this directory is a
1975 f8a36e22 2021-08-26 stsp .Nm
1976 f8a36e22 2021-08-26 stsp work tree, use the repository path associated with this work tree.
1977 d6506a3d 2022-08-16 thomas .It Fl T
1978 d6506a3d 2022-08-16 thomas Attempt to send all tags from the local repository's
1979 d6506a3d 2022-08-16 thomas .Dq refs/tags/
1980 d6506a3d 2022-08-16 thomas reference namespace.
1981 d6506a3d 2022-08-16 thomas The
1982 d6506a3d 2022-08-16 thomas .Fl T
1983 d6506a3d 2022-08-16 thomas option is equivalent to listing all tags with multiple
1984 d6506a3d 2022-08-16 thomas .Fl t
1985 d6506a3d 2022-08-16 thomas options.
1986 d6506a3d 2022-08-16 thomas Cannot be used together with the
1987 d6506a3d 2022-08-16 thomas .Fl t
1988 d6506a3d 2022-08-16 thomas option.
1989 f8a36e22 2021-08-26 stsp .It Fl t Ar tag
1990 f8a36e22 2021-08-26 stsp Send the specified
1991 f8a36e22 2021-08-26 stsp .Ar tag
1992 f8a36e22 2021-08-26 stsp from the local repository's
1993 f8a36e22 2021-08-26 stsp .Dq refs/tags/
1994 f8a36e22 2021-08-26 stsp reference namespace, in addition to any branches that are being sent.
1995 f8a36e22 2021-08-26 stsp The
1996 f8a36e22 2021-08-26 stsp .Fl t
1997 f8a36e22 2021-08-26 stsp option may be specified multiple times to build a list of tags to send.
1998 f8a36e22 2021-08-26 stsp No tags will be sent if the
1999 f8a36e22 2021-08-26 stsp .Fl t
2000 f8a36e22 2021-08-26 stsp option is not used.
2001 f8a36e22 2021-08-26 stsp .Pp
2002 f8a36e22 2021-08-26 stsp Raise an error if the specified
2003 f8a36e22 2021-08-26 stsp .Ar tag
2004 f8a36e22 2021-08-26 stsp already exists in the remote repository, unless the
2005 f8a36e22 2021-08-26 stsp .Fl f
2006 93a300b2 2021-08-26 stsp option is used to overwrite the server's copy of the tag.
2007 f8a36e22 2021-08-26 stsp In general, creating a new tag with a different name is recommended
2008 f8a36e22 2021-08-26 stsp instead of overwriting an existing tag.
2009 f8a36e22 2021-08-26 stsp .Pp
2010 f8a36e22 2021-08-26 stsp Cannot be used together with the
2011 f8a36e22 2021-08-26 stsp .Fl T
2012 f8a36e22 2021-08-26 stsp option.
2013 f8a36e22 2021-08-26 stsp .It Fl v
2014 f8a36e22 2021-08-26 stsp Verbose mode.
2015 f8a36e22 2021-08-26 stsp Causes
2016 f8a36e22 2021-08-26 stsp .Cm got send
2017 f8a36e22 2021-08-26 stsp to print debugging messages to standard error output.
2018 f8a36e22 2021-08-26 stsp The same option will be passed to
2019 f8a36e22 2021-08-26 stsp .Xr ssh 1
2020 f8a36e22 2021-08-26 stsp if applicable.
2021 f8a36e22 2021-08-26 stsp Multiple -v options increase the verbosity.
2022 f8a36e22 2021-08-26 stsp The maximum is 3.
2023 f8a36e22 2021-08-26 stsp .El
2024 e8aa341a 2021-10-08 thomas .Tg cy
2025 f6cd0243 2023-01-28 thomas .It Xo
2026 f6cd0243 2023-01-28 thomas .Cm cherrypick
2027 f6cd0243 2023-01-28 thomas .Op Fl lX
2028 7e710171 2023-01-28 thomas .Op Ar commit
2029 f6cd0243 2023-01-28 thomas .Xc
2030 d912d125 2021-11-04 thomas .Dl Pq alias: Cm cy
2031 234035bc 2019-06-01 stsp Merge changes from a single
2032 234035bc 2019-06-01 stsp .Ar commit
2033 234035bc 2019-06-01 stsp into the work tree.
2034 234035bc 2019-06-01 stsp The specified
2035 234035bc 2019-06-01 stsp .Ar commit
2036 a16d97bd 2021-09-02 stsp should be on a different branch than the work tree's base commit.
2037 a54b6686 2019-06-28 stsp The expected argument is a reference or a commit ID SHA1 hash.
2038 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
2039 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
2040 234035bc 2019-06-01 stsp .Pp
2041 234035bc 2019-06-01 stsp Show the status of each affected file, using the following status codes:
2042 234035bc 2019-06-01 stsp .Bl -column YXZ description
2043 234035bc 2019-06-01 stsp .It G Ta file was merged
2044 234035bc 2019-06-01 stsp .It C Ta file was merged and conflicts occurred during merge
2045 234035bc 2019-06-01 stsp .It ! Ta changes destined for a missing file were not merged
2046 234035bc 2019-06-01 stsp .It D Ta file was deleted
2047 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
2048 234035bc 2019-06-01 stsp .It A Ta new file was added
2049 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
2050 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
2051 74416c47 2019-05-09 stsp .El
2052 234035bc 2019-06-01 stsp .Pp
2053 234035bc 2019-06-01 stsp The merged changes will appear as local changes in the work tree, which
2054 234035bc 2019-06-01 stsp may be viewed with
2055 234035bc 2019-06-01 stsp .Cm got diff ,
2056 234035bc 2019-06-01 stsp amended manually or with further
2057 234035bc 2019-06-01 stsp .Cm got cherrypick
2058 bc3056e3 2019-08-18 stsp commands,
2059 234035bc 2019-06-01 stsp committed with
2060 52d3950d 2023-01-28 thomas .Cm got commit .
2061 52d3950d 2023-01-28 thomas .Pp
2062 52d3950d 2023-01-28 thomas If invoked in a work tree where no
2063 52d3950d 2023-01-28 thomas .Cm rebase ,
2064 52d3950d 2023-01-28 thomas .Cm histedit ,
2065 52d3950d 2023-01-28 thomas or
2066 52d3950d 2023-01-28 thomas .Cm merge
2067 52d3950d 2023-01-28 thomas operation is taking place,
2068 52d3950d 2023-01-28 thomas .Cm got cherrypick
2069 52d3950d 2023-01-28 thomas creates a record of commits which have been merged into the work tree.
2070 52d3950d 2023-01-28 thomas When a file changed by
2071 52d3950d 2023-01-28 thomas .Cm got cherrypick
2072 52d3950d 2023-01-28 thomas is committed with
2073 52d3950d 2023-01-28 thomas .Cm got commit ,
2074 52d3950d 2023-01-28 thomas the log messages of relevant merged commits will then appear in the editor,
2075 75a8c854 2023-02-17 thomas where the messages should be further adjusted to convey the reasons for
2076 95e6f77e 2023-01-28 thomas cherrypicking the changes.
2077 83389425 2023-02-17 thomas Upon exiting the editor, if the time stamp of the log message file
2078 83389425 2023-02-17 thomas is unchanged or the log message is empty,
2079 75a8c854 2023-02-17 thomas .Cm got commit
2080 83389425 2023-02-17 thomas will fail with an unmodified or empty log message error.
2081 75a8c854 2023-02-17 thomas .Pp
2082 52d3950d 2023-01-28 thomas If all the changes in all files touched by a given commit are discarded,
2083 52d3950d 2023-01-28 thomas e.g. with
2084 52d3950d 2023-01-28 thomas .Cm got revert ,
2085 52d3950d 2023-01-28 thomas this commit's log message record will also disappear.
2086 234035bc 2019-06-01 stsp .Pp
2087 234035bc 2019-06-01 stsp .Cm got cherrypick
2088 234035bc 2019-06-01 stsp will refuse to run if certain preconditions are not met.
2089 4b06140e 2022-03-22 thomas If the work tree contains multiple base commits, it must first be updated
2090 234035bc 2019-06-01 stsp to a single base commit with
2091 234035bc 2019-06-01 stsp .Cm got update .
2092 69de9dd4 2021-09-03 stsp If any relevant files already contain merge conflicts, these
2093 234035bc 2019-06-01 stsp conflicts must be resolved first.
2094 f6cd0243 2023-01-28 thomas .Pp
2095 f6cd0243 2023-01-28 thomas The options for
2096 f6cd0243 2023-01-28 thomas .Nm
2097 f6cd0243 2023-01-28 thomas .Cm cherrypick
2098 f6cd0243 2023-01-28 thomas are as follows:
2099 f6cd0243 2023-01-28 thomas .Bl -tag -width Ds
2100 f6cd0243 2023-01-28 thomas .It Fl l
2101 f6cd0243 2023-01-28 thomas Display a list of commit log messages recorded by cherrypick operations,
2102 f6cd0243 2023-01-28 thomas represented by references in the
2103 f6cd0243 2023-01-28 thomas .Dq refs/got/worktree
2104 f6cd0243 2023-01-28 thomas reference namespace.
2105 f6cd0243 2023-01-28 thomas If a
2106 f6cd0243 2023-01-28 thomas .Ar commit
2107 f6cd0243 2023-01-28 thomas is specified, only show the log message of the specified commit.
2108 f6cd0243 2023-01-28 thomas .Pp
2109 f6cd0243 2023-01-28 thomas If invoked in a work tree, only log messages recorded by cherrypick operations
2110 f6cd0243 2023-01-28 thomas in the current work tree will be displayed.
2111 f6cd0243 2023-01-28 thomas Otherwise, all commit log messages will be displayed irrespective of the
2112 f6cd0243 2023-01-28 thomas work tree in which they were created.
2113 f6cd0243 2023-01-28 thomas This option cannot be used with
2114 52d3950d 2023-01-28 thomas .Fl X .
2115 f6cd0243 2023-01-28 thomas .It Fl X
2116 f6cd0243 2023-01-28 thomas Delete log messages created by previous cherrypick operations, represented by
2117 f6cd0243 2023-01-28 thomas references in the
2118 f6cd0243 2023-01-28 thomas .Dq refs/got/worktree
2119 f6cd0243 2023-01-28 thomas reference namespace.
2120 f6cd0243 2023-01-28 thomas If a
2121 f6cd0243 2023-01-28 thomas .Ar commit
2122 f6cd0243 2023-01-28 thomas is specified, only delete the log message of the specified commit.
2123 f6cd0243 2023-01-28 thomas .Pp
2124 f6cd0243 2023-01-28 thomas If invoked in a work tree, only log messages recorded by cherrypick operations
2125 f6cd0243 2023-01-28 thomas in the current work tree will be deleted.
2126 f6cd0243 2023-01-28 thomas Otherwise, all commit log messages will be deleted irrespective of the
2127 f6cd0243 2023-01-28 thomas work tree in which they were created.
2128 f6cd0243 2023-01-28 thomas This option cannot be used with
2129 52d3950d 2023-01-28 thomas .Fl l .
2130 f6cd0243 2023-01-28 thomas .El
2131 f6cd0243 2023-01-28 thomas .Pp
2132 e8aa341a 2021-10-08 thomas .Tg bo
2133 f6cd0243 2023-01-28 thomas .It Xo
2134 f6cd0243 2023-01-28 thomas .Cm backout
2135 f6cd0243 2023-01-28 thomas .Op Fl lX
2136 7e710171 2023-01-28 thomas .Op Ar commit
2137 f6cd0243 2023-01-28 thomas .Xc
2138 d912d125 2021-11-04 thomas .Dl Pq alias: Cm bo
2139 5ef14e63 2019-06-02 stsp Reverse-merge changes from a single
2140 5ef14e63 2019-06-02 stsp .Ar commit
2141 5ef14e63 2019-06-02 stsp into the work tree.
2142 5ef14e63 2019-06-02 stsp The specified
2143 5ef14e63 2019-06-02 stsp .Ar commit
2144 a16d97bd 2021-09-02 stsp should be on the same branch as the work tree's base commit.
2145 a54b6686 2019-06-28 stsp The expected argument is a reference or a commit ID SHA1 hash.
2146 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
2147 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
2148 5ef14e63 2019-06-02 stsp .Pp
2149 5ef14e63 2019-06-02 stsp Show the status of each affected file, using the following status codes:
2150 5ef14e63 2019-06-02 stsp .Bl -column YXZ description
2151 5ef14e63 2019-06-02 stsp .It G Ta file was merged
2152 5ef14e63 2019-06-02 stsp .It C Ta file was merged and conflicts occurred during merge
2153 5ef14e63 2019-06-02 stsp .It ! Ta changes destined for a missing file were not merged
2154 5ef14e63 2019-06-02 stsp .It D Ta file was deleted
2155 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
2156 5ef14e63 2019-06-02 stsp .It A Ta new file was added
2157 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
2158 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
2159 234035bc 2019-06-01 stsp .El
2160 5ef14e63 2019-06-02 stsp .Pp
2161 5ef14e63 2019-06-02 stsp The reverse-merged changes will appear as local changes in the work tree,
2162 5ef14e63 2019-06-02 stsp which may be viewed with
2163 5ef14e63 2019-06-02 stsp .Cm got diff ,
2164 5ef14e63 2019-06-02 stsp amended manually or with further
2165 778a73c2 2019-07-12 stsp .Cm got backout
2166 bc3056e3 2019-08-18 stsp commands,
2167 5ef14e63 2019-06-02 stsp committed with
2168 52d3950d 2023-01-28 thomas .Cm got commit .
2169 52d3950d 2023-01-28 thomas .Pp
2170 52d3950d 2023-01-28 thomas If invoked in a work tree where no
2171 52d3950d 2023-01-28 thomas .Cm rebase ,
2172 52d3950d 2023-01-28 thomas .Cm histedit ,
2173 52d3950d 2023-01-28 thomas or
2174 52d3950d 2023-01-28 thomas .Cm merge
2175 52d3950d 2023-01-28 thomas operation is taking place,
2176 52d3950d 2023-01-28 thomas .Cm got backout
2177 52d3950d 2023-01-28 thomas creates a record of commits which have been reverse-merged into the work tree.
2178 52d3950d 2023-01-28 thomas When a file changed by
2179 52d3950d 2023-01-28 thomas .Cm got backout
2180 52d3950d 2023-01-28 thomas is committed with
2181 52d3950d 2023-01-28 thomas .Cm got commit ,
2182 52d3950d 2023-01-28 thomas the log messages of relevant reverse-merged commits will then appear in
2183 75a8c854 2023-02-17 thomas the editor, where the messages should be further adjusted to convey the
2184 95e6f77e 2023-01-28 thomas reasons for backing out the changes.
2185 83389425 2023-02-17 thomas Upon exiting the editor, if the time stamp of the log message file
2186 83389425 2023-02-17 thomas is unchanged or the log message is empty,
2187 75a8c854 2023-02-17 thomas .Cm got commit
2188 83389425 2023-02-17 thomas will fail with an unmodified or empty log message error.
2189 75a8c854 2023-02-17 thomas .Pp
2190 52d3950d 2023-01-28 thomas If all the changes in all files touched by a given commit are discarded,
2191 52d3950d 2023-01-28 thomas e.g. with
2192 52d3950d 2023-01-28 thomas .Cm got revert ,
2193 52d3950d 2023-01-28 thomas this commit's log message record will also disappear.
2194 5ef14e63 2019-06-02 stsp .Pp
2195 92228c38 2019-06-02 stsp .Cm got backout
2196 92228c38 2019-06-02 stsp will refuse to run if certain preconditions are not met.
2197 4b06140e 2022-03-22 thomas If the work tree contains multiple base commits, it must first be updated
2198 92228c38 2019-06-02 stsp to a single base commit with
2199 92228c38 2019-06-02 stsp .Cm got update .
2200 69de9dd4 2021-09-03 stsp If any relevant files already contain merge conflicts, these
2201 92228c38 2019-06-02 stsp conflicts must be resolved first.
2202 f6cd0243 2023-01-28 thomas .Pp
2203 f6cd0243 2023-01-28 thomas The options for
2204 f6cd0243 2023-01-28 thomas .Nm
2205 f6cd0243 2023-01-28 thomas .Cm backout
2206 f6cd0243 2023-01-28 thomas are as follows:
2207 f6cd0243 2023-01-28 thomas .Bl -tag -width Ds
2208 f6cd0243 2023-01-28 thomas .It Fl l
2209 f6cd0243 2023-01-28 thomas Display a list of commit log messages recorded by backout operations,
2210 f6cd0243 2023-01-28 thomas represented by references in the
2211 f6cd0243 2023-01-28 thomas .Dq refs/got/worktree
2212 f6cd0243 2023-01-28 thomas reference namespace.
2213 f6cd0243 2023-01-28 thomas If a
2214 f6cd0243 2023-01-28 thomas .Ar commit
2215 f6cd0243 2023-01-28 thomas is specified, only show the log message of the specified commit.
2216 f6cd0243 2023-01-28 thomas .Pp
2217 f6cd0243 2023-01-28 thomas If invoked in a work tree, only log messages recorded by backout operations
2218 f6cd0243 2023-01-28 thomas in the current work tree will be displayed.
2219 f6cd0243 2023-01-28 thomas Otherwise, all commit log messages will be displayed irrespective of the
2220 f6cd0243 2023-01-28 thomas work tree in which they were created.
2221 f6cd0243 2023-01-28 thomas This option cannot be used with
2222 52d3950d 2023-01-28 thomas .Fl X .
2223 f6cd0243 2023-01-28 thomas .It Fl X
2224 f6cd0243 2023-01-28 thomas Delete log messages created by previous backout operations, represented by
2225 f6cd0243 2023-01-28 thomas references in the
2226 f6cd0243 2023-01-28 thomas .Dq refs/got/worktree
2227 f6cd0243 2023-01-28 thomas reference namespace.
2228 f6cd0243 2023-01-28 thomas If a
2229 f6cd0243 2023-01-28 thomas .Ar commit
2230 f6cd0243 2023-01-28 thomas is specified, only delete the log message of the specified commit.
2231 f6cd0243 2023-01-28 thomas .Pp
2232 f6cd0243 2023-01-28 thomas If invoked in a work tree, only log messages recorded by backout operations
2233 f6cd0243 2023-01-28 thomas in the current work tree will be deleted.
2234 f6cd0243 2023-01-28 thomas Otherwise, all commit log messages will be deleted irrespective of the
2235 f6cd0243 2023-01-28 thomas work tree in which they were created.
2236 f6cd0243 2023-01-28 thomas This option cannot be used with
2237 52d3950d 2023-01-28 thomas .Fl l .
2238 f6cd0243 2023-01-28 thomas .El
2239 f6cd0243 2023-01-28 thomas .Pp
2240 e8aa341a 2021-10-08 thomas .Tg rb
2241 56c96eff 2022-08-30 thomas .It Xo
2242 56c96eff 2022-08-30 thomas .Cm rebase
2243 be94c032 2023-02-20 thomas .Op Fl aCclX
2244 56c96eff 2022-08-30 thomas .Op Ar branch
2245 56c96eff 2022-08-30 thomas .Xc
2246 d912d125 2021-11-04 thomas .Dl Pq alias: Cm rb
2247 818c7501 2019-07-11 stsp Rebase commits on the specified
2248 818c7501 2019-07-11 stsp .Ar branch
2249 818c7501 2019-07-11 stsp onto the tip of the current branch of the work tree.
2250 818c7501 2019-07-11 stsp The
2251 818c7501 2019-07-11 stsp .Ar branch
2252 818c7501 2019-07-11 stsp must share common ancestry with the work tree's current branch.
2253 bc3056e3 2019-08-18 stsp Rebasing begins with the first descendant commit of the youngest
2254 f09e2405 2019-07-11 stsp common ancestor commit shared by the specified
2255 818c7501 2019-07-11 stsp .Ar branch
2256 818c7501 2019-07-11 stsp and the work tree's current branch, and stops once the tip commit
2257 f09e2405 2019-07-11 stsp of the specified
2258 818c7501 2019-07-11 stsp .Ar branch
2259 f09e2405 2019-07-11 stsp has been rebased.
2260 818c7501 2019-07-11 stsp .Pp
2261 2b6826ba 2020-02-24 stsp When
2262 2b6826ba 2020-02-24 stsp .Cm got rebase
2263 2b6826ba 2020-02-24 stsp is used as intended, the specified
2264 2b6826ba 2020-02-24 stsp .Ar branch
2265 c10890ce 2020-02-25 stsp represents a local commit history and may already contain changes
2266 c10890ce 2020-02-25 stsp that are not yet visible in any other repositories.
2267 2b6826ba 2020-02-24 stsp The work tree's current branch, which must be set with
2268 2b6826ba 2020-02-24 stsp .Cm got update -b
2269 2b6826ba 2020-02-24 stsp before starting the
2270 2b6826ba 2020-02-24 stsp .Cm rebase
2271 2b6826ba 2020-02-24 stsp operation, represents a branch from a remote repository which shares
2272 2b6826ba 2020-02-24 stsp a common history with the specified
2273 2b6826ba 2020-02-24 stsp .Ar branch
2274 c10890ce 2020-02-25 stsp but has progressed, and perhaps diverged, due to commits added to the
2275 c10890ce 2020-02-25 stsp remote repository.
2276 2b6826ba 2020-02-24 stsp .Pp
2277 c6b4581b 2019-07-28 stsp Rebased commits are accumulated on a temporary branch which the work tree
2278 c6b4581b 2019-07-28 stsp will remain switched to throughout the entire rebase operation.
2279 c6b4581b 2019-07-28 stsp Commits on this branch represent the same changes with the same log
2280 c6b4581b 2019-07-28 stsp messages as their counterparts on the original
2281 818c7501 2019-07-11 stsp .Ar branch ,
2282 818c7501 2019-07-11 stsp but with different commit IDs.
2283 818c7501 2019-07-11 stsp Once rebasing has completed successfully, the temporary branch becomes
2284 f09e2405 2019-07-11 stsp the new version of the specified
2285 818c7501 2019-07-11 stsp .Ar branch
2286 818c7501 2019-07-11 stsp and the work tree is automatically switched to it.
2287 d4dddcbf 2022-07-22 thomas If author information is available via the
2288 d4dddcbf 2022-07-22 thomas .Ev GOT_AUTHOR
2289 d4dddcbf 2022-07-22 thomas environment variable,
2290 d4dddcbf 2022-07-22 thomas .Xr got.conf 5
2291 d4dddcbf 2022-07-22 thomas or Git's
2292 d4dddcbf 2022-07-22 thomas .Dv user.name
2293 d4dddcbf 2022-07-22 thomas and
2294 d4dddcbf 2022-07-22 thomas .Dv user.email
2295 d4dddcbf 2022-07-22 thomas configuration settings, this author information will be used to identify
2296 d4dddcbf 2022-07-22 thomas the
2297 d4dddcbf 2022-07-22 thomas .Dq committer
2298 d4dddcbf 2022-07-22 thomas of rebased commits.
2299 e600f124 2021-03-21 stsp .Pp
2300 1795b260 2021-04-02 kn Old commits in their pre-rebase state are automatically backed up in the
2301 e600f124 2021-03-21 stsp .Dq refs/got/backup/rebase
2302 e600f124 2021-03-21 stsp reference namespace.
2303 e600f124 2021-03-21 stsp As long as these references are not removed older versions of rebased
2304 e600f124 2021-03-21 stsp commits will remain in the repository and can be viewed with the
2305 e600f124 2021-03-21 stsp .Cm got rebase -l
2306 e600f124 2021-03-21 stsp command.
2307 e600f124 2021-03-21 stsp Removal of these references makes objects which become unreachable via
2308 e6786710 2021-07-03 stsp any reference subject to removal by Git's garbage collector or
2309 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
2310 818c7501 2019-07-11 stsp .Pp
2311 818c7501 2019-07-11 stsp While rebasing commits, show the status of each affected file,
2312 818c7501 2019-07-11 stsp using the following status codes:
2313 818c7501 2019-07-11 stsp .Bl -column YXZ description
2314 818c7501 2019-07-11 stsp .It G Ta file was merged
2315 818c7501 2019-07-11 stsp .It C Ta file was merged and conflicts occurred during merge
2316 818c7501 2019-07-11 stsp .It ! Ta changes destined for a missing file were not merged
2317 818c7501 2019-07-11 stsp .It D Ta file was deleted
2318 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
2319 818c7501 2019-07-11 stsp .It A Ta new file was added
2320 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
2321 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
2322 5ef14e63 2019-06-02 stsp .El
2323 818c7501 2019-07-11 stsp .Pp
2324 4b06140e 2022-03-22 thomas If merge conflicts occur, the rebase operation is interrupted and may
2325 f09e2405 2019-07-11 stsp be continued once conflicts have been resolved.
2326 bb494413 2021-09-28 thomas If any files with destined changes are found to be missing or unversioned,
2327 bb494413 2021-09-28 thomas or if files could not be deleted due to differences in deleted content,
2328 bb494413 2021-09-28 thomas the rebase operation will be interrupted to prevent potentially incomplete
2329 bb494413 2021-09-28 thomas changes from being committed to the repository without user intervention.
2330 bb494413 2021-09-28 thomas The work tree may be modified as desired and the rebase operation can be
2331 bb494413 2021-09-28 thomas continued once the changes present in the work tree are considered complete.
2332 818c7501 2019-07-11 stsp Alternatively, the rebase operation may be aborted which will leave
2333 818c7501 2019-07-11 stsp .Ar branch
2334 818c7501 2019-07-11 stsp unmodified and the work tree switched back to its original branch.
2335 818c7501 2019-07-11 stsp .Pp
2336 ff0d2220 2019-07-11 stsp If a merge conflict is resolved in a way which renders the merged
2337 f09e2405 2019-07-11 stsp change into a no-op change, the corresponding commit will be elided
2338 f09e2405 2019-07-11 stsp when the rebase operation continues.
2339 ff0d2220 2019-07-11 stsp .Pp
2340 818c7501 2019-07-11 stsp .Cm got rebase
2341 818c7501 2019-07-11 stsp will refuse to run if certain preconditions are not met.
2342 8dbcf388 2022-09-04 thomas If the
2343 8dbcf388 2022-09-04 thomas .Ar branch
2344 8dbcf388 2022-09-04 thomas is not in the
2345 8dbcf388 2022-09-04 thomas .Dq refs/heads/
2346 8dbcf388 2022-09-04 thomas reference namespace, the branch may not be rebased.
2347 a85446b2 2020-01-04 stsp If the work tree is not yet fully updated to the tip commit of its
2348 4b06140e 2022-03-22 thomas branch, then the work tree must first be updated with
2349 818c7501 2019-07-11 stsp .Cm got update .
2350 4ed9f614 2019-08-04 stsp If changes have been staged with
2351 4ed9f614 2019-08-04 stsp .Cm got stage ,
2352 bc3056e3 2019-08-18 stsp these changes must first be committed with
2353 4ed9f614 2019-08-04 stsp .Cm got commit
2354 4ed9f614 2019-08-04 stsp or unstaged with
2355 4ed9f614 2019-08-04 stsp .Cm got unstage .
2356 f09e2405 2019-07-11 stsp If the work tree contains local changes, these changes must first be
2357 f09e2405 2019-07-11 stsp committed with
2358 f09e2405 2019-07-11 stsp .Cm got commit
2359 f09e2405 2019-07-11 stsp or reverted with
2360 f09e2405 2019-07-11 stsp .Cm got revert .
2361 64c6d990 2019-07-11 stsp If the
2362 64c6d990 2019-07-11 stsp .Ar branch
2363 64c6d990 2019-07-11 stsp contains changes to files outside of the work tree's path prefix,
2364 64c6d990 2019-07-11 stsp the work tree cannot be used to rebase this branch.
2365 818c7501 2019-07-11 stsp .Pp
2366 7d5807f4 2019-07-11 stsp The
2367 8bcebf69 2023-01-08 thomas .Cm got update ,
2368 8bcebf69 2023-01-08 thomas .Cm got integrate ,
2369 8bcebf69 2023-01-08 thomas .Cm got merge ,
2370 8bcebf69 2023-01-08 thomas .Cm got commit ,
2371 7d5807f4 2019-07-11 stsp and
2372 8bcebf69 2023-01-08 thomas .Cm got histedit
2373 7d5807f4 2019-07-11 stsp commands will refuse to run while a rebase operation is in progress.
2374 7d5807f4 2019-07-11 stsp Other commands which manipulate the work tree may be used for
2375 7d5807f4 2019-07-11 stsp conflict resolution purposes.
2376 818c7501 2019-07-11 stsp .Pp
2377 d10218e7 2021-11-04 thomas If the specified
2378 d10218e7 2021-11-04 thomas .Ar branch
2379 4b06140e 2022-03-22 thomas is already based on the work tree's current branch, then no commits
2380 d10218e7 2021-11-04 thomas need to be rebased and
2381 d10218e7 2021-11-04 thomas .Cm got rebase
2382 d10218e7 2021-11-04 thomas will simply switch the work tree to the specified
2383 d10218e7 2021-11-04 thomas .Ar branch
2384 d10218e7 2021-11-04 thomas and update files in the work tree accordingly.
2385 d10218e7 2021-11-04 thomas .Pp
2386 818c7501 2019-07-11 stsp The options for
2387 818c7501 2019-07-11 stsp .Cm got rebase
2388 818c7501 2019-07-11 stsp are as follows:
2389 818c7501 2019-07-11 stsp .Bl -tag -width Ds
2390 818c7501 2019-07-11 stsp .It Fl a
2391 818c7501 2019-07-11 stsp Abort an interrupted rebase operation.
2392 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
2393 be94c032 2023-02-20 thomas .It Fl C
2394 be94c032 2023-02-20 thomas Allow a rebase operation to continue with files in conflicted status.
2395 be94c032 2023-02-20 thomas This option should generally be avoided, and can only be used with the
2396 be94c032 2023-02-20 thomas .Fl c
2397 be94c032 2023-02-20 thomas option.
2398 818c7501 2019-07-11 stsp .It Fl c
2399 06067b48 2019-07-11 stsp Continue an interrupted rebase operation.
2400 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
2401 e600f124 2021-03-21 stsp .It Fl l
2402 e600f124 2021-03-21 stsp Show a list of past rebase operations, represented by references in the
2403 e600f124 2021-03-21 stsp .Dq refs/got/backup/rebase
2404 e600f124 2021-03-21 stsp reference namespace.
2405 e600f124 2021-03-21 stsp .Pp
2406 e600f124 2021-03-21 stsp Display the author, date, and log message of each backed up commit,
2407 e600f124 2021-03-21 stsp the object ID of the corresponding post-rebase commit, and
2408 e600f124 2021-03-21 stsp the object ID of their common ancestor commit.
2409 e600f124 2021-03-21 stsp Given these object IDs,
2410 e600f124 2021-03-21 stsp the
2411 e600f124 2021-03-21 stsp .Cm got log
2412 e600f124 2021-03-21 stsp command with the
2413 e600f124 2021-03-21 stsp .Fl c
2414 e600f124 2021-03-21 stsp and
2415 e600f124 2021-03-21 stsp .Fl x
2416 e600f124 2021-03-21 stsp options can be used to examine the history of either version of the branch,
2417 e600f124 2021-03-21 stsp and the
2418 e600f124 2021-03-21 stsp .Cm got branch
2419 e600f124 2021-03-21 stsp command with the
2420 e600f124 2021-03-21 stsp .Fl c
2421 e600f124 2021-03-21 stsp option can be used to create a new branch from a pre-rebase state if desired.
2422 e600f124 2021-03-21 stsp .Pp
2423 e600f124 2021-03-21 stsp If a
2424 e600f124 2021-03-21 stsp .Ar branch
2425 e600f124 2021-03-21 stsp is specified, only show commits which at some point in time represented this
2426 e600f124 2021-03-21 stsp branch.
2427 e600f124 2021-03-21 stsp Otherwise, list all backed up commits for any branches.
2428 e600f124 2021-03-21 stsp .Pp
2429 e600f124 2021-03-21 stsp If this option is used,
2430 e600f124 2021-03-21 stsp .Cm got rebase
2431 e600f124 2021-03-21 stsp does not require a work tree.
2432 e600f124 2021-03-21 stsp None of the other options can be used together with
2433 e600f124 2021-03-21 stsp .Fl l .
2434 643b85bc 2021-07-16 stsp .It Fl X
2435 643b85bc 2021-07-16 stsp Delete backups created by past rebase operations, represented by references
2436 643b85bc 2021-07-16 stsp in the
2437 643b85bc 2021-07-16 stsp .Dq refs/got/backup/rebase
2438 643b85bc 2021-07-16 stsp reference namespace.
2439 643b85bc 2021-07-16 stsp .Pp
2440 643b85bc 2021-07-16 stsp If a
2441 643b85bc 2021-07-16 stsp .Ar branch
2442 643b85bc 2021-07-16 stsp is specified, only delete backups which at some point in time represented
2443 643b85bc 2021-07-16 stsp this branch.
2444 643b85bc 2021-07-16 stsp Otherwise, delete all references found within
2445 643b85bc 2021-07-16 stsp .Dq refs/got/backup/rebase .
2446 643b85bc 2021-07-16 stsp .Pp
2447 643b85bc 2021-07-16 stsp Any commit, tree, tag, and blob objects belonging to deleted backups
2448 643b85bc 2021-07-16 stsp remain in the repository and may be removed separately with
2449 643b85bc 2021-07-16 stsp Git's garbage collector or
2450 643b85bc 2021-07-16 stsp .Cm gotadmin cleanup .
2451 643b85bc 2021-07-16 stsp .Pp
2452 643b85bc 2021-07-16 stsp If this option is used,
2453 643b85bc 2021-07-16 stsp .Cm got rebase
2454 643b85bc 2021-07-16 stsp does not require a work tree.
2455 643b85bc 2021-07-16 stsp None of the other options can be used together with
2456 643b85bc 2021-07-16 stsp .Fl X .
2457 818c7501 2019-07-11 stsp .El
2458 e8aa341a 2021-10-08 thomas .Tg he
2459 56c96eff 2022-08-30 thomas .It Xo
2460 56c96eff 2022-08-30 thomas .Cm histedit
2461 be94c032 2023-02-20 thomas .Op Fl aCcdeflmX
2462 56c96eff 2022-08-30 thomas .Op Fl F Ar histedit-script
2463 56c96eff 2022-08-30 thomas .Op Ar branch
2464 56c96eff 2022-08-30 thomas .Xc
2465 d912d125 2021-11-04 thomas .Dl Pq alias: Cm he
2466 0ebf8283 2019-07-24 stsp Edit commit history between the work tree's current base commit and
2467 0ebf8283 2019-07-24 stsp the tip commit of the work tree's current branch.
2468 d4dddcbf 2022-07-22 thomas .Pp
2469 d4dddcbf 2022-07-22 thomas The
2470 d4dddcbf 2022-07-22 thomas .Cm got histedit
2471 d4dddcbf 2022-07-22 thomas command requires the
2472 d4dddcbf 2022-07-22 thomas .Ev GOT_AUTHOR
2473 d4dddcbf 2022-07-22 thomas environment variable to be set,
2474 d4dddcbf 2022-07-22 thomas unless an author has been configured in
2475 d4dddcbf 2022-07-22 thomas .Xr got.conf 5
2476 d4dddcbf 2022-07-22 thomas or Git's
2477 d4dddcbf 2022-07-22 thomas .Dv user.name
2478 d4dddcbf 2022-07-22 thomas and
2479 d4dddcbf 2022-07-22 thomas .Dv user.email
2480 d4dddcbf 2022-07-22 thomas configuration settings can be obtained from the repository's
2481 d4dddcbf 2022-07-22 thomas .Pa .git/config
2482 d4dddcbf 2022-07-22 thomas file or from Git's global
2483 d4dddcbf 2022-07-22 thomas .Pa ~/.gitconfig
2484 d4dddcbf 2022-07-22 thomas configuration file.
2485 6e54d307 2020-02-24 stsp .Pp
2486 6e54d307 2020-02-24 stsp Before starting a
2487 6e54d307 2020-02-24 stsp .Cm histedit
2488 4b06140e 2022-03-22 thomas operation, the work tree's current branch must be set with
2489 6e54d307 2020-02-24 stsp .Cm got update -b
2490 6e54d307 2020-02-24 stsp to the branch which should be edited, unless this branch is already the
2491 6e54d307 2020-02-24 stsp current branch of the work tree.
2492 6e54d307 2020-02-24 stsp The tip of this branch represents the upper bound (inclusive) of commits
2493 6e54d307 2020-02-24 stsp touched by the
2494 6e54d307 2020-02-24 stsp .Cm histedit
2495 6e54d307 2020-02-24 stsp operation.
2496 0ebf8283 2019-07-24 stsp .Pp
2497 6e54d307 2020-02-24 stsp Furthermore, the work tree's base commit
2498 6e54d307 2020-02-24 stsp must be set with
2499 6e54d307 2020-02-24 stsp .Cm got update -c
2500 6e54d307 2020-02-24 stsp to a point in this branch's commit history where editing should begin.
2501 6e54d307 2020-02-24 stsp This commit represents the lower bound (non-inclusive) of commits touched
2502 6e54d307 2020-02-24 stsp by the
2503 6e54d307 2020-02-24 stsp .Cm histedit
2504 6e54d307 2020-02-24 stsp operation.
2505 6e54d307 2020-02-24 stsp .Pp
2506 0ebf8283 2019-07-24 stsp Editing of commit history is controlled via a
2507 0ebf8283 2019-07-24 stsp .Ar histedit script
2508 46fa4c83 2020-02-24 stsp which can be written in an editor based on a template, passed on the
2509 46fa4c83 2020-02-24 stsp command line, or generated with the
2510 bbf6b418 2023-03-01 thomas .Fl d ,
2511 bbf6b418 2023-03-01 thomas .Fl e ,
2512 bbf6b418 2023-03-01 thomas .Fl f ,
2513 466785b9 2020-12-10 jrick or
2514 083957f4 2020-02-24 stsp .Fl m
2515 466785b9 2020-12-10 jrick options.
2516 083957f4 2020-02-24 stsp .Pp
2517 0ebf8283 2019-07-24 stsp The format of the histedit script is line-based.
2518 0ebf8283 2019-07-24 stsp Each line in the script begins with a command name, followed by
2519 0ebf8283 2019-07-24 stsp whitespace and an argument.
2520 0ebf8283 2019-07-24 stsp For most commands, the expected argument is a commit ID SHA1 hash.
2521 0ebf8283 2019-07-24 stsp Any remaining text on the line is ignored.
2522 0ebf8283 2019-07-24 stsp Lines which begin with the
2523 0ebf8283 2019-07-24 stsp .Sq #
2524 0ebf8283 2019-07-24 stsp character are ignored entirely.
2525 0ebf8283 2019-07-24 stsp .Pp
2526 f3a5718a 2022-07-12 thomas The available histedit script commands are as follows:
2527 0ebf8283 2019-07-24 stsp .Bl -column YXZ pick-commit
2528 f3a5718a 2022-07-12 thomas .It Cm pick Ar commit Ta Use the specified commit as it is.
2529 71654e8d 2023-03-01 thomas .It Cm edit Ar commit Ta Apply the changes from the specified commit, but
2530 71654e8d 2023-03-01 thomas then interrupt the histedit operation for amending, without creating a commit.
2531 49f76ad0 2023-03-01 thomas While the histedit operation is interrupted arbitrary files may be edited,
2532 49f76ad0 2023-03-01 thomas and commands which manipulate the work tree can be used freely.
2533 49f76ad0 2023-03-01 thomas The
2534 49f76ad0 2023-03-01 thomas .Cm got add
2535 49f76ad0 2023-03-01 thomas and
2536 49f76ad0 2023-03-01 thomas .Cm got remove
2537 49f76ad0 2023-03-01 thomas commands can be used to add new files or remove existing ones.
2538 49f76ad0 2023-03-01 thomas The
2539 49f76ad0 2023-03-01 thomas .Cm got revert -p
2540 49f76ad0 2023-03-01 thomas command can be used to eliminate arbitrary changes from files in the work tree.
2541 49f76ad0 2023-03-01 thomas The
2542 49f76ad0 2023-03-01 thomas .Cm got stage -p
2543 49f76ad0 2023-03-01 thomas command may be used to prepare a subset of changes for inclusion in the
2544 49f76ad0 2023-03-01 thomas next commit.
2545 49f76ad0 2023-03-01 thomas Finally, the
2546 49f76ad0 2023-03-01 thomas .Cm got commit
2547 49f76ad0 2023-03-01 thomas command can be used to insert arbitrary commits into the edited history.
2548 49f76ad0 2023-03-01 thomas Regular editing of history must eventually be resumed by running
2549 49f76ad0 2023-03-01 thomas .Cm got histedit -c .
2550 f3a5718a 2022-07-12 thomas .It Cm fold Ar commit Ta Combine the specified commit with the next commit
2551 0ebf8283 2019-07-24 stsp listed further below that will be used.
2552 f3a5718a 2022-07-12 thomas .It Cm drop Ar commit Ta Remove this commit from the edited history.
2553 f3a5718a 2022-07-12 thomas .It Cm mesg Oo Ar log-message Oc Ta Create a new log message for the commit of
2554 f3a5718a 2022-07-12 thomas a preceding
2555 f3a5718a 2022-07-12 thomas .Cm pick
2556 f3a5718a 2022-07-12 thomas or
2557 f3a5718a 2022-07-12 thomas .Cm edit
2558 f3a5718a 2022-07-12 thomas command on the previous line of the histedit script.
2559 eefbc049 2022-07-12 thomas The optional
2560 eefbc049 2022-07-12 thomas .Ar log-message
2561 eefbc049 2022-07-12 thomas argument provides a new single-line log message to use.
2562 eefbc049 2022-07-12 thomas If the
2563 eefbc049 2022-07-12 thomas .Ar log-message
2564 eefbc049 2022-07-12 thomas argument is omitted, open an editor where a new log message can be written.
2565 0ebf8283 2019-07-24 stsp .El
2566 0ebf8283 2019-07-24 stsp .Pp
2567 ba67992e 2019-07-25 stsp Every commit in the history being edited must be mentioned in the script.
2568 0ebf8283 2019-07-24 stsp Lines may be re-ordered to change the order of commits in the edited history.
2569 5b87815e 2020-03-05 stsp No commit may be listed more than once.
2570 0ebf8283 2019-07-24 stsp .Pp
2571 c6b4581b 2019-07-28 stsp Edited commits are accumulated on a temporary branch which the work tree
2572 c6b4581b 2019-07-28 stsp will remain switched to throughout the entire histedit operation.
2573 0ebf8283 2019-07-24 stsp Once history editing has completed successfully, the temporary branch becomes
2574 498a90b7 2019-07-25 stsp the new version of the work tree's branch and the work tree is automatically
2575 498a90b7 2019-07-25 stsp switched to it.
2576 0ebf8283 2019-07-24 stsp .Pp
2577 1795b260 2021-04-02 kn Old commits in their pre-histedit state are automatically backed up in the
2578 e600f124 2021-03-21 stsp .Dq refs/got/backup/histedit
2579 e600f124 2021-03-21 stsp reference namespace.
2580 e600f124 2021-03-21 stsp As long as these references are not removed older versions of edited
2581 e600f124 2021-03-21 stsp commits will remain in the repository and can be viewed with the
2582 e600f124 2021-03-21 stsp .Cm got histedit -l
2583 e600f124 2021-03-21 stsp command.
2584 e600f124 2021-03-21 stsp Removal of these references makes objects which become unreachable via
2585 e6786710 2021-07-03 stsp any reference subject to removal by Git's garbage collector or
2586 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
2587 e600f124 2021-03-21 stsp .Pp
2588 0ebf8283 2019-07-24 stsp While merging commits, show the status of each affected file,
2589 0ebf8283 2019-07-24 stsp using the following status codes:
2590 0ebf8283 2019-07-24 stsp .Bl -column YXZ description
2591 0ebf8283 2019-07-24 stsp .It G Ta file was merged
2592 0ebf8283 2019-07-24 stsp .It C Ta file was merged and conflicts occurred during merge
2593 0ebf8283 2019-07-24 stsp .It ! Ta changes destined for a missing file were not merged
2594 0ebf8283 2019-07-24 stsp .It D Ta file was deleted
2595 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
2596 0ebf8283 2019-07-24 stsp .It A Ta new file was added
2597 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
2598 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
2599 0ebf8283 2019-07-24 stsp .El
2600 0ebf8283 2019-07-24 stsp .Pp
2601 4b06140e 2022-03-22 thomas If merge conflicts occur, the histedit operation is interrupted and may
2602 0ebf8283 2019-07-24 stsp be continued once conflicts have been resolved.
2603 dddbe150 2021-09-28 thomas If any files with destined changes are found to be missing or unversioned,
2604 dddbe150 2021-09-28 thomas or if files could not be deleted due to differences in deleted content,
2605 dddbe150 2021-09-28 thomas the histedit operation will be interrupted to prevent potentially incomplete
2606 dddbe150 2021-09-28 thomas changes from being committed to the repository without user intervention.
2607 dddbe150 2021-09-28 thomas The work tree may be modified as desired and the histedit operation can be
2608 dddbe150 2021-09-28 thomas continued once the changes present in the work tree are considered complete.
2609 0ebf8283 2019-07-24 stsp Alternatively, the histedit operation may be aborted which will leave
2610 0ebf8283 2019-07-24 stsp the work tree switched back to its original branch.
2611 0ebf8283 2019-07-24 stsp .Pp
2612 0ebf8283 2019-07-24 stsp If a merge conflict is resolved in a way which renders the merged
2613 0ebf8283 2019-07-24 stsp change into a no-op change, the corresponding commit will be elided
2614 0ebf8283 2019-07-24 stsp when the histedit operation continues.
2615 0ebf8283 2019-07-24 stsp .Pp
2616 0ebf8283 2019-07-24 stsp .Cm got histedit
2617 0ebf8283 2019-07-24 stsp will refuse to run if certain preconditions are not met.
2618 c7d20a3f 2019-07-30 stsp If the work tree's current branch is not in the
2619 c7d20a3f 2019-07-30 stsp .Dq refs/heads/
2620 c7d20a3f 2019-07-30 stsp reference namespace, the history of the branch may not be edited.
2621 4b06140e 2022-03-22 thomas If the work tree contains multiple base commits, it must first be updated
2622 0ebf8283 2019-07-24 stsp to a single base commit with
2623 0ebf8283 2019-07-24 stsp .Cm got update .
2624 4ed9f614 2019-08-04 stsp If changes have been staged with
2625 4ed9f614 2019-08-04 stsp .Cm got stage ,
2626 bc3056e3 2019-08-18 stsp these changes must first be committed with
2627 4ed9f614 2019-08-04 stsp .Cm got commit
2628 4ed9f614 2019-08-04 stsp or unstaged with
2629 4ed9f614 2019-08-04 stsp .Cm got unstage .
2630 0ebf8283 2019-07-24 stsp If the work tree contains local changes, these changes must first be
2631 0ebf8283 2019-07-24 stsp committed with
2632 0ebf8283 2019-07-24 stsp .Cm got commit
2633 0ebf8283 2019-07-24 stsp or reverted with
2634 0ebf8283 2019-07-24 stsp .Cm got revert .
2635 0ebf8283 2019-07-24 stsp If the edited history contains changes to files outside of the work tree's
2636 0ebf8283 2019-07-24 stsp path prefix, the work tree cannot be used to edit the history of this branch.
2637 0ebf8283 2019-07-24 stsp .Pp
2638 0ebf8283 2019-07-24 stsp The
2639 7ef62c4e 2020-02-24 stsp .Cm got update ,
2640 7ef62c4e 2020-02-24 stsp .Cm got rebase ,
2641 8bcebf69 2023-01-08 thomas .Cm got merge ,
2642 65db4ffb 2020-02-24 stsp and
2643 65db4ffb 2020-02-24 stsp .Cm got integrate
2644 65db4ffb 2020-02-24 stsp commands will refuse to run while a histedit operation is in progress.
2645 a698f62e 2019-07-25 stsp Other commands which manipulate the work tree may be used, and the
2646 0ebf8283 2019-07-24 stsp .Cm got commit
2647 a698f62e 2019-07-25 stsp command may be used to commit arbitrary changes to the temporary branch
2648 a698f62e 2019-07-25 stsp while the histedit operation is interrupted.
2649 0ebf8283 2019-07-24 stsp .Pp
2650 0ebf8283 2019-07-24 stsp The options for
2651 0ebf8283 2019-07-24 stsp .Cm got histedit
2652 0ebf8283 2019-07-24 stsp are as follows:
2653 0ebf8283 2019-07-24 stsp .Bl -tag -width Ds
2654 0ebf8283 2019-07-24 stsp .It Fl a
2655 0ebf8283 2019-07-24 stsp Abort an interrupted histedit operation.
2656 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
2657 be94c032 2023-02-20 thomas .It Fl C
2658 be94c032 2023-02-20 thomas Allow a histedit operation to continue with files in conflicted status.
2659 be94c032 2023-02-20 thomas This option should generally be avoided, and can only be used with the
2660 be94c032 2023-02-20 thomas .Fl c
2661 be94c032 2023-02-20 thomas option.
2662 0ebf8283 2019-07-24 stsp .It Fl c
2663 0ebf8283 2019-07-24 stsp Continue an interrupted histedit operation.
2664 070c80a5 2023-01-31 thomas If this option is used, no other command-line arguments are allowed.
2665 070c80a5 2023-01-31 thomas .It Fl d
2666 070c80a5 2023-01-31 thomas Drop all commits.
2667 070c80a5 2023-01-31 thomas This option is a quick equivalent to a histedit script which drops all
2668 070c80a5 2023-01-31 thomas commits.
2669 070c80a5 2023-01-31 thomas The
2670 070c80a5 2023-01-31 thomas .Fl d
2671 070c80a5 2023-01-31 thomas option can only be used when starting a new histedit operation.
2672 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
2673 c50a7455 2021-10-04 thomas .It Fl e
2674 c50a7455 2021-10-04 thomas Interrupt the histedit operation for editing after merging each commit.
2675 c50a7455 2021-10-04 thomas This option is a quick equivalent to a histedit script which uses the
2676 c50a7455 2021-10-04 thomas .Cm edit
2677 c50a7455 2021-10-04 thomas command for all commits.
2678 c50a7455 2021-10-04 thomas The
2679 c50a7455 2021-10-04 thomas .Fl e
2680 c50a7455 2021-10-04 thomas option can only be used when starting a new histedit operation.
2681 c50a7455 2021-10-04 thomas If this option is used, no other command-line arguments are allowed.
2682 d6506a3d 2022-08-16 thomas .It Fl F Ar histedit-script
2683 d6506a3d 2022-08-16 thomas Use the specified
2684 d6506a3d 2022-08-16 thomas .Ar histedit-script
2685 d6506a3d 2022-08-16 thomas instead of opening a temporary file in an editor where a histedit script
2686 d6506a3d 2022-08-16 thomas can be written.
2687 466785b9 2020-12-10 jrick .It Fl f
2688 466785b9 2020-12-10 jrick Fold all commits into a single commit.
2689 466785b9 2020-12-10 jrick This option is a quick equivalent to a histedit script which folds all
2690 466785b9 2020-12-10 jrick commits, combining them all into one commit.
2691 2a78779e 2020-12-11 stsp The
2692 2a78779e 2020-12-11 stsp .Fl f
2693 2a78779e 2020-12-11 stsp option can only be used when starting a new histedit operation.
2694 466785b9 2020-12-10 jrick If this option is used, no other command-line arguments are allowed.
2695 e600f124 2021-03-21 stsp .It Fl l
2696 e600f124 2021-03-21 stsp Show a list of past histedit operations, represented by references in the
2697 e600f124 2021-03-21 stsp .Dq refs/got/backup/histedit
2698 e600f124 2021-03-21 stsp reference namespace.
2699 e600f124 2021-03-21 stsp .Pp
2700 e600f124 2021-03-21 stsp Display the author, date, and log message of each backed up commit,
2701 e600f124 2021-03-21 stsp the object ID of the corresponding post-histedit commit, and
2702 e600f124 2021-03-21 stsp the object ID of their common ancestor commit.
2703 e600f124 2021-03-21 stsp Given these object IDs,
2704 e600f124 2021-03-21 stsp the
2705 e600f124 2021-03-21 stsp .Cm got log
2706 e600f124 2021-03-21 stsp command with the
2707 e600f124 2021-03-21 stsp .Fl c
2708 e600f124 2021-03-21 stsp and
2709 e600f124 2021-03-21 stsp .Fl x
2710 e600f124 2021-03-21 stsp options can be used to examine the history of either version of the branch,
2711 e600f124 2021-03-21 stsp and the
2712 e600f124 2021-03-21 stsp .Cm got branch
2713 e600f124 2021-03-21 stsp command with the
2714 e600f124 2021-03-21 stsp .Fl c
2715 e600f124 2021-03-21 stsp option can be used to create a new branch from a pre-histedit state if desired.
2716 e600f124 2021-03-21 stsp .Pp
2717 e600f124 2021-03-21 stsp If a
2718 e600f124 2021-03-21 stsp .Ar branch
2719 e600f124 2021-03-21 stsp is specified, only show commits which at some point in time represented this
2720 e600f124 2021-03-21 stsp branch.
2721 e600f124 2021-03-21 stsp Otherwise, list all backed up commits for any branches.
2722 e600f124 2021-03-21 stsp .Pp
2723 e600f124 2021-03-21 stsp If this option is used,
2724 e600f124 2021-03-21 stsp .Cm got histedit
2725 e600f124 2021-03-21 stsp does not require a work tree.
2726 e600f124 2021-03-21 stsp None of the other options can be used together with
2727 e600f124 2021-03-21 stsp .Fl l .
2728 d6506a3d 2022-08-16 thomas .It Fl m
2729 d6506a3d 2022-08-16 thomas Edit log messages only.
2730 d6506a3d 2022-08-16 thomas This option is a quick equivalent to a histedit script which edits
2731 d6506a3d 2022-08-16 thomas only log messages but otherwise leaves every picked commit as-is.
2732 d6506a3d 2022-08-16 thomas The
2733 d6506a3d 2022-08-16 thomas .Fl m
2734 d6506a3d 2022-08-16 thomas option can only be used when starting a new histedit operation.
2735 d6506a3d 2022-08-16 thomas If this option is used, no other command-line arguments are allowed.
2736 643b85bc 2021-07-16 stsp .It Fl X
2737 643b85bc 2021-07-16 stsp Delete backups created by past histedit operations, represented by references
2738 643b85bc 2021-07-16 stsp in the
2739 643b85bc 2021-07-16 stsp .Dq refs/got/backup/histedit
2740 643b85bc 2021-07-16 stsp reference namespace.
2741 643b85bc 2021-07-16 stsp .Pp
2742 643b85bc 2021-07-16 stsp If a
2743 643b85bc 2021-07-16 stsp .Ar branch
2744 643b85bc 2021-07-16 stsp is specified, only delete backups which at some point in time represented
2745 643b85bc 2021-07-16 stsp this branch.
2746 643b85bc 2021-07-16 stsp Otherwise, delete all references found within
2747 643b85bc 2021-07-16 stsp .Dq refs/got/backup/histedit .
2748 643b85bc 2021-07-16 stsp .Pp
2749 643b85bc 2021-07-16 stsp Any commit, tree, tag, and blob objects belonging to deleted backups
2750 643b85bc 2021-07-16 stsp remain in the repository and may be removed separately with
2751 643b85bc 2021-07-16 stsp Git's garbage collector or
2752 643b85bc 2021-07-16 stsp .Cm gotadmin cleanup .
2753 643b85bc 2021-07-16 stsp .Pp
2754 643b85bc 2021-07-16 stsp If this option is used,
2755 643b85bc 2021-07-16 stsp .Cm got histedit
2756 643b85bc 2021-07-16 stsp does not require a work tree.
2757 643b85bc 2021-07-16 stsp None of the other options can be used together with
2758 643b85bc 2021-07-16 stsp .Fl X .
2759 818c7501 2019-07-11 stsp .El
2760 e8aa341a 2021-10-08 thomas .Tg ig
2761 2822a352 2019-10-15 stsp .It Cm integrate Ar branch
2762 d912d125 2021-11-04 thomas .Dl Pq alias: Cm ig
2763 2822a352 2019-10-15 stsp Integrate the specified
2764 2822a352 2019-10-15 stsp .Ar branch
2765 2822a352 2019-10-15 stsp into the work tree's current branch.
2766 2822a352 2019-10-15 stsp Files in the work tree are updated to match the contents on the integrated
2767 2822a352 2019-10-15 stsp .Ar branch ,
2768 2822a352 2019-10-15 stsp and the reference of the work tree's branch is changed to point at the
2769 2822a352 2019-10-15 stsp head commit of the integrated
2770 2822a352 2019-10-15 stsp .Ar branch .
2771 2822a352 2019-10-15 stsp .Pp
2772 2822a352 2019-10-15 stsp Both branches can be considered equivalent after integration since they
2773 2822a352 2019-10-15 stsp will be pointing at the same commit.
2774 2822a352 2019-10-15 stsp Both branches remain available for future work, if desired.
2775 2822a352 2019-10-15 stsp In case the integrated
2776 2822a352 2019-10-15 stsp .Ar branch
2777 2822a352 2019-10-15 stsp is no longer needed it may be deleted with
2778 2822a352 2019-10-15 stsp .Cm got branch -d .
2779 2822a352 2019-10-15 stsp .Pp
2780 2822a352 2019-10-15 stsp Show the status of each affected file, using the following status codes:
2781 2822a352 2019-10-15 stsp .Bl -column YXZ description
2782 2822a352 2019-10-15 stsp .It U Ta file was updated
2783 2822a352 2019-10-15 stsp .It D Ta file was deleted
2784 2822a352 2019-10-15 stsp .It A Ta new file was added
2785 2822a352 2019-10-15 stsp .It \(a~ Ta versioned file is obstructed by a non-regular file
2786 2822a352 2019-10-15 stsp .It ! Ta a missing versioned file was restored
2787 2822a352 2019-10-15 stsp .El
2788 2822a352 2019-10-15 stsp .Pp
2789 2822a352 2019-10-15 stsp .Cm got integrate
2790 2822a352 2019-10-15 stsp will refuse to run if certain preconditions are not met.
2791 2822a352 2019-10-15 stsp Most importantly, the
2792 2822a352 2019-10-15 stsp .Ar branch
2793 2822a352 2019-10-15 stsp must have been rebased onto the work tree's current branch with
2794 2822a352 2019-10-15 stsp .Cm got rebase
2795 2822a352 2019-10-15 stsp before it can be integrated, in order to linearize commit history and
2796 2822a352 2019-10-15 stsp resolve merge conflicts.
2797 4b06140e 2022-03-22 thomas If the work tree contains multiple base commits, it must first be updated
2798 2822a352 2019-10-15 stsp to a single base commit with
2799 2822a352 2019-10-15 stsp .Cm got update .
2800 2822a352 2019-10-15 stsp If changes have been staged with
2801 2822a352 2019-10-15 stsp .Cm got stage ,
2802 2822a352 2019-10-15 stsp these changes must first be committed with
2803 2822a352 2019-10-15 stsp .Cm got commit
2804 2822a352 2019-10-15 stsp or unstaged with
2805 2822a352 2019-10-15 stsp .Cm got unstage .
2806 2822a352 2019-10-15 stsp If the work tree contains local changes, these changes must first be
2807 2822a352 2019-10-15 stsp committed with
2808 2822a352 2019-10-15 stsp .Cm got commit
2809 2822a352 2019-10-15 stsp or reverted with
2810 2822a352 2019-10-15 stsp .Cm got revert .
2811 bea5ae74 2021-10-10 thomas .Tg mg
2812 56c96eff 2022-08-30 thomas .It Xo
2813 56c96eff 2022-08-30 thomas .Cm merge
2814 be94c032 2023-02-20 thomas .Op Fl aCcn
2815 56c96eff 2022-08-30 thomas .Op Ar branch
2816 56c96eff 2022-08-30 thomas .Xc
2817 d912d125 2021-11-04 thomas .Dl Pq alias: Cm mg
2818 2b72f32d 2023-06-22 thomas Merge the specified
2819 2b72f32d 2023-06-22 thomas .Ar branch
2820 2b72f32d 2023-06-22 thomas into the current branch of the work tree.
2821 2b72f32d 2023-06-22 thomas If the branches have diverged, creates a merge commit.
2822 2b72f32d 2023-06-22 thomas Otherwise, if
2823 2b72f32d 2023-06-22 thomas .Ar branch
2824 2b72f32d 2023-06-22 thomas already includes all commits from the work tree's branch, updates the work
2825 2b72f32d 2023-06-22 thomas tree's branch to be the same as
2826 2b72f32d 2023-06-22 thomas .Ar branch
2827 2b72f32d 2023-06-22 thomas without creating a commit, and updates the work tree to the most recent commit
2828 2b72f32d 2023-06-22 thomas on the branch.
2829 2b72f32d 2023-06-22 thomas .Pp
2830 10604dce 2021-09-24 thomas If a linear project history is desired, then use of
2831 10604dce 2021-09-24 thomas .Cm got rebase
2832 10604dce 2021-09-24 thomas should be preferred over
2833 10604dce 2021-09-24 thomas .Cm got merge .
2834 10604dce 2021-09-24 thomas However, even strictly linear projects may require merge commits in order
2835 768705e3 2021-09-27 thomas to merge in new versions of third-party code stored on vendor branches
2836 768705e3 2021-09-27 thomas created with
2837 768705e3 2021-09-27 thomas .Cm got import .
2838 10604dce 2021-09-24 thomas .Pp
2839 10604dce 2021-09-24 thomas Merge commits are commits based on multiple parent commits.
2840 86295155 2023-06-22 thomas The tip commit of the work tree's current branch, which must be in the
2841 4434a15a 2023-06-22 thomas .Dq refs/heads/
2842 4434a15a 2023-06-22 thomas reference namespace and must be set with
2843 10604dce 2021-09-24 thomas .Cm got update -b
2844 10604dce 2021-09-24 thomas before starting the
2845 10604dce 2021-09-24 thomas .Cm merge
2846 10604dce 2021-09-24 thomas operation, will be used as the first parent.
2847 10604dce 2021-09-24 thomas The tip commit of the specified
2848 10604dce 2021-09-24 thomas .Ar branch
2849 10604dce 2021-09-24 thomas will be used as the second parent.
2850 10604dce 2021-09-24 thomas .Pp
2851 768705e3 2021-09-27 thomas No ancestral relationship between the two branches is required.
2852 768705e3 2021-09-27 thomas If the two branches have already been merged previously, only new changes
2853 768705e3 2021-09-27 thomas will be merged.
2854 768705e3 2021-09-27 thomas .Pp
2855 10604dce 2021-09-24 thomas It is not possible to create merge commits with more than two parents.
2856 10604dce 2021-09-24 thomas If more than one branch needs to be merged, then multiple merge commits
2857 10604dce 2021-09-24 thomas with two parents each can be created in sequence.
2858 10604dce 2021-09-24 thomas .Pp
2859 10604dce 2021-09-24 thomas While merging changes found on the
2860 10604dce 2021-09-24 thomas .Ar branch
2861 10604dce 2021-09-24 thomas into the work tree, show the status of each affected file,
2862 10604dce 2021-09-24 thomas using the following status codes:
2863 10604dce 2021-09-24 thomas .Bl -column YXZ description
2864 10604dce 2021-09-24 thomas .It G Ta file was merged
2865 10604dce 2021-09-24 thomas .It C Ta file was merged and conflicts occurred during merge
2866 10604dce 2021-09-24 thomas .It ! Ta changes destined for a missing file were not merged
2867 10604dce 2021-09-24 thomas .It D Ta file was deleted
2868 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
2869 10604dce 2021-09-24 thomas .It A Ta new file was added
2870 10604dce 2021-09-24 thomas .It \(a~ Ta changes destined for a non-regular file were not merged
2871 10604dce 2021-09-24 thomas .It ? Ta changes destined for an unversioned file were not merged
2872 10604dce 2021-09-24 thomas .El
2873 10604dce 2021-09-24 thomas .Pp
2874 10604dce 2021-09-24 thomas If merge conflicts occur, the merge operation is interrupted and conflicts
2875 10604dce 2021-09-24 thomas must be resolved before the merge operation can continue.
2876 8cf2970b 2021-09-28 thomas If any files with destined changes are found to be missing or unversioned,
2877 8cf2970b 2021-09-28 thomas or if files could not be deleted due to differences in deleted content,
2878 10604dce 2021-09-24 thomas the merge operation will be interrupted to prevent potentially incomplete
2879 10604dce 2021-09-24 thomas changes from being committed to the repository without user intervention.
2880 10604dce 2021-09-24 thomas The work tree may be modified as desired and the merge can be continued
2881 10604dce 2021-09-24 thomas once the changes present in the work tree are considered complete.
2882 10604dce 2021-09-24 thomas Alternatively, the merge operation may be aborted which will leave
2883 10604dce 2021-09-24 thomas the work tree's current branch unmodified.
2884 10604dce 2021-09-24 thomas .Pp
2885 10604dce 2021-09-24 thomas .Cm got merge
2886 10604dce 2021-09-24 thomas will refuse to run if certain preconditions are not met.
2887 4434a15a 2023-06-22 thomas If the work tree's current branch is not in the
2888 4434a15a 2023-06-22 thomas .Dq refs/heads/
2889 4434a15a 2023-06-22 thomas reference namespace then the work tree must first be switched to a
2890 4434a15a 2023-06-22 thomas branch in the
2891 4434a15a 2023-06-22 thomas .Dq refs/heads/
2892 4434a15a 2023-06-22 thomas namespace with
2893 4434a15a 2023-06-22 thomas .Cm got update -b .
2894 10604dce 2021-09-24 thomas If the work tree is not yet fully updated to the tip commit of its
2895 10604dce 2021-09-24 thomas branch, then the work tree must first be updated with
2896 10604dce 2021-09-24 thomas .Cm got update .
2897 4b06140e 2022-03-22 thomas If the work tree contains multiple base commits, it must first be updated
2898 10604dce 2021-09-24 thomas to a single base commit with
2899 10604dce 2021-09-24 thomas .Cm got update .
2900 10604dce 2021-09-24 thomas If changes have been staged with
2901 10604dce 2021-09-24 thomas .Cm got stage ,
2902 10604dce 2021-09-24 thomas these changes must first be committed with
2903 10604dce 2021-09-24 thomas .Cm got commit
2904 10604dce 2021-09-24 thomas or unstaged with
2905 10604dce 2021-09-24 thomas .Cm got unstage .
2906 10604dce 2021-09-24 thomas If the work tree contains local changes, these changes must first be
2907 10604dce 2021-09-24 thomas committed with
2908 10604dce 2021-09-24 thomas .Cm got commit
2909 10604dce 2021-09-24 thomas or reverted with
2910 10604dce 2021-09-24 thomas .Cm got revert .
2911 10604dce 2021-09-24 thomas If the
2912 10604dce 2021-09-24 thomas .Ar branch
2913 10604dce 2021-09-24 thomas contains changes to files outside of the work tree's path prefix,
2914 10604dce 2021-09-24 thomas the work tree cannot be used to merge this branch.
2915 10604dce 2021-09-24 thomas .Pp
2916 10604dce 2021-09-24 thomas The
2917 10604dce 2021-09-24 thomas .Cm got update ,
2918 10604dce 2021-09-24 thomas .Cm got commit ,
2919 10604dce 2021-09-24 thomas .Cm got rebase ,
2920 ac93b2c5 2021-10-08 thomas .Cm got histedit ,
2921 10604dce 2021-09-24 thomas .Cm got integrate ,
2922 10604dce 2021-09-24 thomas and
2923 10604dce 2021-09-24 thomas .Cm got stage
2924 10604dce 2021-09-24 thomas commands will refuse to run while a merge operation is in progress.
2925 10604dce 2021-09-24 thomas Other commands which manipulate the work tree may be used for
2926 10604dce 2021-09-24 thomas conflict resolution purposes.
2927 10604dce 2021-09-24 thomas .Pp
2928 10604dce 2021-09-24 thomas The options for
2929 10604dce 2021-09-24 thomas .Cm got merge
2930 10604dce 2021-09-24 thomas are as follows:
2931 10604dce 2021-09-24 thomas .Bl -tag -width Ds
2932 10604dce 2021-09-24 thomas .It Fl a
2933 10604dce 2021-09-24 thomas Abort an interrupted merge operation.
2934 10604dce 2021-09-24 thomas If this option is used, no other command-line arguments are allowed.
2935 be94c032 2023-02-20 thomas .It Fl C
2936 be94c032 2023-02-20 thomas Allow a merge operation to continue with files in conflicted status.
2937 be94c032 2023-02-20 thomas This option should generally be avoided, and can only be used with the
2938 be94c032 2023-02-20 thomas .Fl c
2939 be94c032 2023-02-20 thomas option.
2940 10604dce 2021-09-24 thomas .It Fl c
2941 10604dce 2021-09-24 thomas Continue an interrupted merge operation.
2942 10604dce 2021-09-24 thomas If this option is used, no other command-line arguments are allowed.
2943 ba34626b 2021-09-27 thomas .It Fl n
2944 ba34626b 2021-09-27 thomas Merge changes into the work tree as usual but do not create a merge
2945 ba34626b 2021-09-27 thomas commit immediately.
2946 ba34626b 2021-09-27 thomas The merge result can be adjusted as desired before a merge commit is
2947 ba34626b 2021-09-27 thomas created with
2948 ba34626b 2021-09-27 thomas .Cm got merge -c .
2949 ba34626b 2021-09-27 thomas Alternatively, the merge may be aborted with
2950 ba34626b 2021-09-27 thomas .Cm got merge -a .
2951 10604dce 2021-09-24 thomas .El
2952 e8aa341a 2021-10-08 thomas .Tg sg
2953 56c96eff 2022-08-30 thomas .It Xo
2954 56c96eff 2022-08-30 thomas .Cm stage
2955 56c96eff 2022-08-30 thomas .Op Fl lpS
2956 56c96eff 2022-08-30 thomas .Op Fl F Ar response-script
2957 56c96eff 2022-08-30 thomas .Op Ar path ...
2958 56c96eff 2022-08-30 thomas .Xc
2959 d912d125 2021-11-04 thomas .Dl Pq alias: Cm sg
2960 2db2652d 2019-08-07 stsp Stage local changes for inclusion in the next commit.
2961 2db2652d 2019-08-07 stsp If no
2962 2db2652d 2019-08-07 stsp .Ar path
2963 2db2652d 2019-08-07 stsp is specified, stage all changes in the work tree.
2964 2db2652d 2019-08-07 stsp Otherwise, stage changes at or within the specified paths.
2965 4ed9f614 2019-08-04 stsp Paths may be staged if they are added, modified, or deleted according to
2966 4ed9f614 2019-08-04 stsp .Cm got status .
2967 4ed9f614 2019-08-04 stsp .Pp
2968 9d8b19a4 2019-08-04 stsp Show the status of each affected file, using the following status codes:
2969 9d8b19a4 2019-08-04 stsp .Bl -column YXZ description
2970 9d8b19a4 2019-08-04 stsp .It A Ta file addition has been staged
2971 9d8b19a4 2019-08-04 stsp .It M Ta file modification has been staged
2972 9d8b19a4 2019-08-04 stsp .It D Ta file deletion has been staged
2973 9d8b19a4 2019-08-04 stsp .El
2974 9d8b19a4 2019-08-04 stsp .Pp
2975 9d8b19a4 2019-08-04 stsp Staged file contents are saved in newly created blob objects in the repository.
2976 52c8d4ac 2019-08-04 stsp These blobs will be referred to by tree objects once staged changes have been
2977 9d8b19a4 2019-08-04 stsp committed.
2978 9d8b19a4 2019-08-04 stsp .Pp
2979 890ea719 2019-08-04 stsp Staged changes affect the behaviour of
2980 4ed9f614 2019-08-04 stsp .Cm got commit ,
2981 4ed9f614 2019-08-04 stsp .Cm got status ,
2982 4ed9f614 2019-08-04 stsp and
2983 4ed9f614 2019-08-04 stsp .Cm got diff .
2984 4ed9f614 2019-08-04 stsp While paths with staged changes exist, the
2985 4ed9f614 2019-08-04 stsp .Cm got commit
2986 4ed9f614 2019-08-04 stsp command will refuse to commit any paths which do not have staged changes.
2987 4ed9f614 2019-08-04 stsp Local changes created on top of staged changes can only be committed if
2988 4ed9f614 2019-08-04 stsp the path is staged again, or if the staged changes are committed first.
2989 4ed9f614 2019-08-04 stsp The
2990 4ed9f614 2019-08-04 stsp .Cm got status
2991 4ed9f614 2019-08-04 stsp command will show both local changes and staged changes.
2992 4ed9f614 2019-08-04 stsp The
2993 4ed9f614 2019-08-04 stsp .Cm got diff
2994 ecf14362 2019-08-04 stsp command is able to display local changes relative to staged changes,
2995 ecf14362 2019-08-04 stsp and to display staged changes relative to the repository.
2996 4ed9f614 2019-08-04 stsp The
2997 4ed9f614 2019-08-04 stsp .Cm got revert
2998 4ed9f614 2019-08-04 stsp command cannot revert staged changes but may be used to revert
2999 4f2494e6 2019-08-08 stsp local changes created on top of staged changes.
3000 4ed9f614 2019-08-04 stsp .Pp
3001 4ed9f614 2019-08-04 stsp The options for
3002 4ed9f614 2019-08-04 stsp .Cm got stage
3003 4ed9f614 2019-08-04 stsp are as follows:
3004 4ed9f614 2019-08-04 stsp .Bl -tag -width Ds
3005 d6506a3d 2022-08-16 thomas .It Fl F Ar response-script
3006 d6506a3d 2022-08-16 thomas With the
3007 d6506a3d 2022-08-16 thomas .Fl p
3008 d6506a3d 2022-08-16 thomas option, read
3009 d6506a3d 2022-08-16 thomas .Dq y ,
3010 d6506a3d 2022-08-16 thomas .Dq n ,
3011 d6506a3d 2022-08-16 thomas and
3012 d6506a3d 2022-08-16 thomas .Dq q
3013 d6506a3d 2022-08-16 thomas responses line-by-line from the specified
3014 d6506a3d 2022-08-16 thomas .Ar response-script
3015 d6506a3d 2022-08-16 thomas file instead of prompting interactively.
3016 4ed9f614 2019-08-04 stsp .It Fl l
3017 4ed9f614 2019-08-04 stsp Instead of staging new changes, list paths which are already staged,
3018 9d8b19a4 2019-08-04 stsp along with the IDs of staged blob objects and stage status codes.
3019 4b06140e 2022-03-22 thomas If paths were provided on the command line, show the staged paths
3020 1dd86744 2019-08-12 anthony among the specified paths.
3021 1dd86744 2019-08-12 anthony Otherwise, show all staged paths.
3022 dc424a06 2019-08-07 stsp .It Fl p
3023 dc424a06 2019-08-07 stsp Instead of staging the entire content of a changed file, interactively
3024 dc424a06 2019-08-07 stsp select or reject changes for staging based on
3025 dc424a06 2019-08-07 stsp .Dq y
3026 6d23ec10 2019-08-08 stsp (stage change),
3027 dc424a06 2019-08-07 stsp .Dq n
3028 6d23ec10 2019-08-08 stsp (reject change), and
3029 b353a198 2019-08-07 stsp .Dq q
3030 6d23ec10 2019-08-08 stsp (quit staging this file) responses.
3031 dc424a06 2019-08-07 stsp If a file is in modified status, individual patches derived from the
3032 dc424a06 2019-08-07 stsp modified file content can be staged.
3033 6d23ec10 2019-08-08 stsp Files in added or deleted status may only be staged or rejected in
3034 6d23ec10 2019-08-08 stsp their entirety.
3035 35213c7c 2020-07-23 stsp .It Fl S
3036 af358f55 2020-07-23 stsp Allow staging of symbolic links which point outside of the path space
3037 af358f55 2020-07-23 stsp that is under version control.
3038 af358f55 2020-07-23 stsp By default,
3039 af358f55 2020-07-23 stsp .Cm got stage
3040 af358f55 2020-07-23 stsp will reject such symbolic links due to safety concerns.
3041 35213c7c 2020-07-23 stsp As a precaution,
3042 35213c7c 2020-07-23 stsp .Nm
3043 af358f55 2020-07-23 stsp may decide to represent such a symbolic link as a regular file which contains
3044 af358f55 2020-07-23 stsp the link's target path, rather than creating an actual symbolic link which
3045 af358f55 2020-07-23 stsp points outside of the work tree.
3046 af358f55 2020-07-23 stsp Use of this option is discouraged because external mechanisms such as
3047 af358f55 2020-07-23 stsp .Dq make obj
3048 af358f55 2020-07-23 stsp are better suited for managing symbolic links to paths not under
3049 af358f55 2020-07-23 stsp version control.
3050 4ed9f614 2019-08-04 stsp .El
3051 4ed9f614 2019-08-04 stsp .Pp
3052 4ed9f614 2019-08-04 stsp .Cm got stage
3053 4ed9f614 2019-08-04 stsp will refuse to run if certain preconditions are not met.
3054 4ed9f614 2019-08-04 stsp If a file contains merge conflicts, these conflicts must be resolved first.
3055 4ed9f614 2019-08-04 stsp If a file is found to be out of date relative to the head commit on the
3056 4ed9f614 2019-08-04 stsp work tree's current branch, the file must be updated with
3057 4ed9f614 2019-08-04 stsp .Cm got update
3058 4ed9f614 2019-08-04 stsp before it can be staged (however, this does not prevent the file from
3059 4ed9f614 2019-08-04 stsp becoming out-of-date at some point after having been staged).
3060 4ed9f614 2019-08-04 stsp .Pp
3061 4ed9f614 2019-08-04 stsp The
3062 4ed9f614 2019-08-04 stsp .Cm got update ,
3063 4ed9f614 2019-08-04 stsp .Cm got rebase ,
3064 4ed9f614 2019-08-04 stsp and
3065 4ed9f614 2019-08-04 stsp .Cm got histedit
3066 4ed9f614 2019-08-04 stsp commands will refuse to run while staged changes exist.
3067 4ed9f614 2019-08-04 stsp If staged changes cannot be committed because a staged path
3068 4ed9f614 2019-08-04 stsp is out of date, the path must be unstaged with
3069 4ed9f614 2019-08-04 stsp .Cm got unstage
3070 4ed9f614 2019-08-04 stsp before it can be updated with
3071 4ed9f614 2019-08-04 stsp .Cm got update ,
3072 4ed9f614 2019-08-04 stsp and may then be staged again if necessary.
3073 e8aa341a 2021-10-08 thomas .Tg ug
3074 56c96eff 2022-08-30 thomas .It Xo
3075 56c96eff 2022-08-30 thomas .Cm unstage
3076 56c96eff 2022-08-30 thomas .Op Fl p
3077 56c96eff 2022-08-30 thomas .Op Fl F Ar response-script
3078 56c96eff 2022-08-30 thomas .Op Ar path ...
3079 56c96eff 2022-08-30 thomas .Xc
3080 d912d125 2021-11-04 thomas .Dl Pq alias: Cm ug
3081 4ed9f614 2019-08-04 stsp Merge staged changes back into the work tree and put affected paths
3082 4ed9f614 2019-08-04 stsp back into non-staged status.
3083 4ed9f614 2019-08-04 stsp If no
3084 4ed9f614 2019-08-04 stsp .Ar path
3085 4ed9f614 2019-08-04 stsp is specified, unstage all staged changes across the entire work tree.
3086 2db2652d 2019-08-07 stsp Otherwise, unstage changes at or within the specified paths.
3087 4ed9f614 2019-08-04 stsp .Pp
3088 4ed9f614 2019-08-04 stsp Show the status of each affected file, using the following status codes:
3089 4ed9f614 2019-08-04 stsp .Bl -column YXZ description
3090 4ed9f614 2019-08-04 stsp .It G Ta file was unstaged
3091 4ed9f614 2019-08-04 stsp .It C Ta file was unstaged and conflicts occurred during merge
3092 4ed9f614 2019-08-04 stsp .It ! Ta changes destined for a missing file were not merged
3093 4ed9f614 2019-08-04 stsp .It D Ta file was staged as deleted and still is deleted
3094 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
3095 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
3096 4ed9f614 2019-08-04 stsp .El
3097 2e1f37b0 2019-08-08 stsp .Pp
3098 2e1f37b0 2019-08-08 stsp The options for
3099 2e1f37b0 2019-08-08 stsp .Cm got unstage
3100 2e1f37b0 2019-08-08 stsp are as follows:
3101 2e1f37b0 2019-08-08 stsp .Bl -tag -width Ds
3102 2e1f37b0 2019-08-08 stsp .It Fl F Ar response-script
3103 2e1f37b0 2019-08-08 stsp With the
3104 2e1f37b0 2019-08-08 stsp .Fl p
3105 2e1f37b0 2019-08-08 stsp option, read
3106 2e1f37b0 2019-08-08 stsp .Dq y ,
3107 2e1f37b0 2019-08-08 stsp .Dq n ,
3108 2e1f37b0 2019-08-08 stsp and
3109 2e1f37b0 2019-08-08 stsp .Dq q
3110 2e1f37b0 2019-08-08 stsp responses line-by-line from the specified
3111 2e1f37b0 2019-08-08 stsp .Ar response-script
3112 2e1f37b0 2019-08-08 stsp file instead of prompting interactively.
3113 d6506a3d 2022-08-16 thomas .It Fl p
3114 d6506a3d 2022-08-16 thomas Instead of unstaging the entire content of a changed file, interactively
3115 d6506a3d 2022-08-16 thomas select or reject changes for unstaging based on
3116 d6506a3d 2022-08-16 thomas .Dq y
3117 d6506a3d 2022-08-16 thomas (unstage change),
3118 d6506a3d 2022-08-16 thomas .Dq n
3119 d6506a3d 2022-08-16 thomas (keep change staged), and
3120 d6506a3d 2022-08-16 thomas .Dq q
3121 d6506a3d 2022-08-16 thomas (quit unstaging this file) responses.
3122 d6506a3d 2022-08-16 thomas If a file is staged in modified status, individual patches derived from the
3123 d6506a3d 2022-08-16 thomas staged file content can be unstaged.
3124 d6506a3d 2022-08-16 thomas Files staged in added or deleted status may only be unstaged in their entirety.
3125 2e1f37b0 2019-08-08 stsp .El
3126 56c96eff 2022-08-30 thomas .It Xo
3127 56c96eff 2022-08-30 thomas .Cm cat
3128 56c96eff 2022-08-30 thomas .Op Fl P
3129 56c96eff 2022-08-30 thomas .Op Fl c Ar commit
3130 56c96eff 2022-08-30 thomas .Op Fl r Ar repository-path
3131 56c96eff 2022-08-30 thomas .Ar arg ...
3132 56c96eff 2022-08-30 thomas .Xc
3133 896e9b6f 2019-08-26 stsp Parse and print contents of objects to standard output in a line-based
3134 896e9b6f 2019-08-26 stsp text format.
3135 896e9b6f 2019-08-26 stsp Content of commit, tree, and tag objects is printed in a way similar
3136 896e9b6f 2019-08-26 stsp to the actual content stored in such objects.
3137 896e9b6f 2019-08-26 stsp Blob object contents are printed as they would appear in files on disk.
3138 896e9b6f 2019-08-26 stsp .Pp
3139 896e9b6f 2019-08-26 stsp Attempt to interpret each argument as a reference, a tag name, or
3140 896e9b6f 2019-08-26 stsp an object ID SHA1 hash.
3141 01073a5d 2019-08-22 stsp References will be resolved to an object ID.
3142 01073a5d 2019-08-22 stsp Tag names will resolved to a tag object.
3143 01073a5d 2019-08-22 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
3144 01073a5d 2019-08-22 stsp automatically, provided the abbreviation is unique.
3145 01073a5d 2019-08-22 stsp .Pp
3146 896e9b6f 2019-08-26 stsp If none of the above interpretations produce a valid result, or if the
3147 896e9b6f 2019-08-26 stsp .Fl P
3148 896e9b6f 2019-08-26 stsp option is used, attempt to interpret the argument as a path which will
3149 896e9b6f 2019-08-26 stsp be resolved to the ID of an object found at this path in the repository.
3150 896e9b6f 2019-08-26 stsp .Pp
3151 01073a5d 2019-08-22 stsp The options for
3152 01073a5d 2019-08-22 stsp .Cm got cat
3153 01073a5d 2019-08-22 stsp are as follows:
3154 01073a5d 2019-08-22 stsp .Bl -tag -width Ds
3155 896e9b6f 2019-08-26 stsp .It Fl c Ar commit
3156 896e9b6f 2019-08-26 stsp Look up paths in the specified
3157 896e9b6f 2019-08-26 stsp .Ar commit .
3158 896e9b6f 2019-08-26 stsp If this option is not used, paths are looked up in the commit resolved
3159 896e9b6f 2019-08-26 stsp via the repository's HEAD reference.
3160 896e9b6f 2019-08-26 stsp The expected argument is a commit ID SHA1 hash or an existing reference
3161 896e9b6f 2019-08-26 stsp or tag name which will be resolved to a commit ID.
3162 896e9b6f 2019-08-26 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
3163 896e9b6f 2019-08-26 stsp automatically, provided the abbreviation is unique.
3164 d6506a3d 2022-08-16 thomas .It Fl P
3165 d6506a3d 2022-08-16 thomas Interpret all arguments as paths only.
3166 d6506a3d 2022-08-16 thomas This option can be used to resolve ambiguity in cases where paths
3167 d6506a3d 2022-08-16 thomas look like tag names, reference names, or object IDs.
3168 01073a5d 2019-08-22 stsp .It Fl r Ar repository-path
3169 01073a5d 2019-08-22 stsp Use the repository at the specified path.
3170 01073a5d 2019-08-22 stsp If not specified, assume the repository is located at or above the current
3171 01073a5d 2019-08-22 stsp working directory.
3172 01073a5d 2019-08-22 stsp If this directory is a
3173 01073a5d 2019-08-22 stsp .Nm
3174 01073a5d 2019-08-22 stsp work tree, use the repository path associated with this work tree.
3175 4ed9f614 2019-08-04 stsp .El
3176 b2118c49 2020-07-28 stsp .It Cm info Op Ar path ...
3177 b2118c49 2020-07-28 stsp Display meta-data stored in a work tree.
3178 b2118c49 2020-07-28 stsp See
3179 b2118c49 2020-07-28 stsp .Xr got-worktree 5
3180 b2118c49 2020-07-28 stsp for details.
3181 b2118c49 2020-07-28 stsp .Pp
3182 b2118c49 2020-07-28 stsp The work tree to use is resolved implicitly by walking upwards from the
3183 b2118c49 2020-07-28 stsp current working directory.
3184 b2118c49 2020-07-28 stsp .Pp
3185 b2118c49 2020-07-28 stsp If one or more
3186 b2118c49 2020-07-28 stsp .Ar path
3187 b2118c49 2020-07-28 stsp arguments are specified, show additional per-file information for tracked
3188 b2118c49 2020-07-28 stsp files located at or within these paths.
3189 b2118c49 2020-07-28 stsp If a
3190 b2118c49 2020-07-28 stsp .Ar path
3191 b2118c49 2020-07-28 stsp argument corresponds to the work tree's root directory, display information
3192 b2118c49 2020-07-28 stsp for all tracked files.
3193 01073a5d 2019-08-22 stsp .El
3194 74416c47 2019-05-09 stsp .Sh ENVIRONMENT
3195 5daf5c53 2022-07-23 thomas .Bl -tag -width GOT_IGNORE_GITCONFIG
3196 74416c47 2019-05-09 stsp .It Ev GOT_AUTHOR
3197 d4dddcbf 2022-07-22 thomas The author's name and email address, such as
3198 aba9c984 2019-09-08 stsp .Dq An Flan Hacker Aq Mt flan_hacker@openbsd.org .
3199 d4dddcbf 2022-07-22 thomas Used by the
3200 d4dddcbf 2022-07-22 thomas .Cm got commit ,
3201 d4dddcbf 2022-07-22 thomas .Cm got import ,
3202 d4dddcbf 2022-07-22 thomas .Cm got rebase ,
3203 d4dddcbf 2022-07-22 thomas and
3204 d4dddcbf 2022-07-22 thomas .Cm got histedit
3205 d4dddcbf 2022-07-22 thomas commands.
3206 84792843 2019-08-09 stsp Because
3207 0e444aba 2019-08-08 stsp .Xr git 1
3208 84792843 2019-08-09 stsp may fail to parse commits without an email address in author data,
3209 0e444aba 2019-08-08 stsp .Nm
3210 84792843 2019-08-09 stsp attempts to reject
3211 0e444aba 2019-08-08 stsp .Ev GOT_AUTHOR
3212 84792843 2019-08-09 stsp environment variables with a missing email address.
3213 c9956ddf 2019-09-08 stsp .Pp
3214 93a300b2 2021-08-26 stsp .Ev GOT_AUTHOR will be overridden by configuration settings in
3215 50b0790e 2020-09-11 stsp .Xr got.conf 5
3216 50b0790e 2020-09-11 stsp or by Git's
3217 aba9c984 2019-09-08 stsp .Dv user.name
3218 aba9c984 2019-09-08 stsp and
3219 709ae9eb 2019-09-08 stsp .Dv user.email
3220 709ae9eb 2019-09-08 stsp configuration settings in the repository's
3221 aba9c984 2019-09-08 stsp .Pa .git/config
3222 50b0790e 2020-09-11 stsp file.
3223 257add31 2020-09-09 stsp The
3224 c9956ddf 2019-09-08 stsp .Dv user.name
3225 c9956ddf 2019-09-08 stsp and
3226 c9956ddf 2019-09-08 stsp .Dv user.email
3227 c9956ddf 2019-09-08 stsp configuration settings contained in Git's global
3228 c9956ddf 2019-09-08 stsp .Pa ~/.gitconfig
3229 257add31 2020-09-09 stsp configuration file will only be used if neither
3230 257add31 2020-09-09 stsp .Xr got.conf 5
3231 257add31 2020-09-09 stsp nor the
3232 c9956ddf 2019-09-08 stsp .Ev GOT_AUTHOR
3233 257add31 2020-09-09 stsp environment variable provide author information.
3234 bd15e874 2023-01-20 thomas .It Ev GOT_IGNORE_GITCONFIG
3235 bd15e874 2023-01-20 thomas If this variable is set then any remote repository definitions or author
3236 bd15e874 2023-01-20 thomas information found in Git configuration files will be ignored.
3237 bd15e874 2023-01-20 thomas .It Ev GOT_LOG_DEFAULT_LIMIT
3238 bd15e874 2023-01-20 thomas The default limit on the number of commits traversed by
3239 bd15e874 2023-01-20 thomas .Cm got log .
3240 bd15e874 2023-01-20 thomas If set to zero, the limit is unbounded.
3241 bd15e874 2023-01-20 thomas This variable will be silently ignored if it is set to a non-numeric value.
3242 1dd86744 2019-08-12 anthony .It Ev VISUAL , EDITOR
3243 23594da9 2019-05-13 stsp The editor spawned by
3244 8e7bd50a 2019-08-22 stsp .Cm got commit ,
3245 46215d2a 2020-09-11 stsp .Cm got histedit ,
3246 8e7bd50a 2019-08-22 stsp .Cm got import ,
3247 8e7bd50a 2019-08-22 stsp or
3248 8e7bd50a 2019-08-22 stsp .Cm got tag .
3249 5b735925 2020-09-15 stsp If not set, the
3250 f8da67e8 2023-03-01 thomas .Xr vi 1
3251 f8da67e8 2023-03-01 thomas text editor will be spawned.
3252 74416c47 2019-05-09 stsp .El
3253 257add31 2020-09-09 stsp .Sh FILES
3254 257add31 2020-09-09 stsp .Bl -tag -width packed-refs -compact
3255 257add31 2020-09-09 stsp .It Pa got.conf
3256 257add31 2020-09-09 stsp Repository-wide configuration settings for
3257 257add31 2020-09-09 stsp .Nm .
3258 50b0790e 2020-09-11 stsp If present, a
3259 50b0790e 2020-09-11 stsp .Xr got.conf 5
3260 50b0790e 2020-09-11 stsp configuration file located in the root directory of a Git repository
3261 50b0790e 2020-09-11 stsp supersedes any relevant settings in Git's
3262 257add31 2020-09-09 stsp .Pa config
3263 257add31 2020-09-09 stsp file.
3264 50b0790e 2020-09-11 stsp .Pp
3265 50b0790e 2020-09-11 stsp .It Pa .got/got.conf
3266 50b0790e 2020-09-11 stsp Worktree-specific configuration settings for
3267 50b0790e 2020-09-11 stsp .Nm .
3268 50b0790e 2020-09-11 stsp If present, a
3269 1795b260 2021-04-02 kn .Xr got.conf 5
3270 50b0790e 2020-09-11 stsp configuration file in the
3271 50b0790e 2020-09-11 stsp .Pa .got
3272 50b0790e 2020-09-11 stsp meta-data directory of a work tree supersedes any relevant settings in
3273 50b0790e 2020-09-11 stsp the repository's
3274 50b0790e 2020-09-11 stsp .Xr got.conf 5
3275 50b0790e 2020-09-11 stsp configuration file and Git's
3276 50b0790e 2020-09-11 stsp .Pa config
3277 50b0790e 2020-09-11 stsp file.
3278 257add31 2020-09-09 stsp .El
3279 5c860e29 2018-03-12 stsp .Sh EXIT STATUS
3280 5c860e29 2018-03-12 stsp .Ex -std got
3281 97925469 2018-03-17 stsp .Sh EXAMPLES
3282 43e4eb1b 2021-08-29 stsp Enable tab-completion of
3283 43e4eb1b 2021-08-29 stsp .Nm
3284 43e4eb1b 2021-08-29 stsp command names in
3285 43e4eb1b 2021-08-29 stsp .Xr ksh 1 :
3286 43e4eb1b 2021-08-29 stsp .Pp
3287 e1d27370 2021-09-01 stsp .Dl $ set -A complete_got_1 -- $(got -h 2>&1 | sed -n s/commands://p)
3288 43e4eb1b 2021-08-29 stsp .Pp
3289 fa6e0e48 2019-05-23 stsp Clone an existing Git repository for use with
3290 f357763f 2023-06-22 thomas .Nm :
3291 fd039d72 2020-03-18 stsp .Pp
3292 fd039d72 2020-03-18 stsp .Dl $ cd /var/git/
3293 fd039d72 2020-03-18 stsp .Dl $ got clone ssh://git@github.com/openbsd/src.git
3294 fd039d72 2020-03-18 stsp .Pp
3295 f357763f 2023-06-22 thomas Unfortunately, many of the popular Git hosting sites do not offer anonymous
3296 f357763f 2023-06-22 thomas access via SSH.
3297 f357763f 2023-06-22 thomas Such sites will require an account to be created, and a public SSH key to be
3298 f357763f 2023-06-22 thomas uploaded to this account, before repository access via ssh:// URLs will work.
3299 f357763f 2023-06-22 thomas .Pp
3300 fd039d72 2020-03-18 stsp Use of HTTP URLs currently requires
3301 fa6e0e48 2019-05-23 stsp .Xr git 1 :
3302 d83d9d5c 2019-05-13 stsp .Pp
3303 fa6e0e48 2019-05-23 stsp .Dl $ cd /var/git/
3304 fa6e0e48 2019-05-23 stsp .Dl $ git clone --bare https://github.com/openbsd/src.git
3305 fa6e0e48 2019-05-23 stsp .Pp
3306 3ce1b845 2019-07-15 stsp Alternatively, for quick and dirty local testing of
3307 3ce1b845 2019-07-15 stsp .Nm
3308 3ce1b845 2019-07-15 stsp a new Git repository could be created and populated with files,
3309 3ce1b845 2019-07-15 stsp e.g. from a temporary CVS checkout located at
3310 3ce1b845 2019-07-15 stsp .Pa /tmp/src :
3311 fa6e0e48 2019-05-23 stsp .Pp
3312 27b10c3c 2022-07-04 thomas .Dl $ gotadmin init /var/git/src.git
3313 2930ef13 2019-07-15 stsp .Dl $ got import -r /var/git/src.git -I CVS -I obj /tmp/src
3314 3ce1b845 2019-07-15 stsp .Pp
3315 3ce1b845 2019-07-15 stsp Check out a work tree from the Git repository to /usr/src:
3316 3ce1b845 2019-07-15 stsp .Pp
3317 fa6e0e48 2019-05-23 stsp .Dl $ got checkout /var/git/src.git /usr/src
3318 fa6e0e48 2019-05-23 stsp .Pp
3319 e70c17ce 2019-05-22 stsp View local changes in a work tree directory:
3320 e70c17ce 2019-05-22 stsp .Pp
3321 e70c17ce 2019-05-22 stsp .Dl $ got diff | less
3322 33aa809d 2019-08-08 stsp .Pp
3323 081470ac 2020-08-13 stsp In a work tree, display files in a potentially problematic state:
3324 081470ac 2020-08-13 stsp .Pp
3325 081470ac 2020-08-13 stsp .Dl $ got status -s 'C!~?'
3326 081470ac 2020-08-13 stsp .Pp
3327 33aa809d 2019-08-08 stsp Interactively revert selected local changes in a work tree directory:
3328 e70c17ce 2019-05-22 stsp .Pp
3329 33aa809d 2019-08-08 stsp .Dl $ got revert -p -R\ .
3330 33aa809d 2019-08-08 stsp .Pp
3331 e70c17ce 2019-05-22 stsp In a work tree or a git repository directory, list all branch references:
3332 e70c17ce 2019-05-22 stsp .Pp
3333 4e759de4 2019-06-26 stsp .Dl $ got branch -l
3334 7fc94106 2023-01-14 thomas .Pp
3335 7fc94106 2023-01-14 thomas As above, but list the most recently modified branches only:
3336 7fc94106 2023-01-14 thomas .Pp
3337 7fc94106 2023-01-14 thomas .Dl $ got branch -lt | head
3338 e70c17ce 2019-05-22 stsp .Pp
3339 fa6e0e48 2019-05-23 stsp In a work tree or a git repository directory, create a new branch called
3340 e70c17ce 2019-05-22 stsp .Dq unified-buffer-cache
3341 d83d9d5c 2019-05-13 stsp which is forked off the
3342 d83d9d5c 2019-05-13 stsp .Dq master
3343 d83d9d5c 2019-05-13 stsp branch:
3344 d83d9d5c 2019-05-13 stsp .Pp
3345 7b4f1fcb 2021-01-27 stsp .Dl $ got branch -c master unified-buffer-cache
3346 e70c17ce 2019-05-22 stsp .Pp
3347 e70c17ce 2019-05-22 stsp Switch an existing work tree to the branch
3348 e70c17ce 2019-05-22 stsp .Dq unified-buffer-cache .
3349 e70c17ce 2019-05-22 stsp Local changes in the work tree will be preserved and merged if necessary:
3350 e70c17ce 2019-05-22 stsp .Pp
3351 e70c17ce 2019-05-22 stsp .Dl $ got update -b unified-buffer-cache
3352 e70c17ce 2019-05-22 stsp .Pp
3353 fa6e0e48 2019-05-23 stsp Create a new commit from local changes in a work tree directory.
3354 fa6e0e48 2019-05-23 stsp This new commit will become the head commit of the work tree's current branch:
3355 fa6e0e48 2019-05-23 stsp .Pp
3356 fa6e0e48 2019-05-23 stsp .Dl $ got commit
3357 fa6e0e48 2019-05-23 stsp .Pp
3358 fa6e0e48 2019-05-23 stsp In a work tree or a git repository directory, view changes committed in
3359 fa6e0e48 2019-05-23 stsp the 3 most recent commits to the work tree's branch, or the branch resolved
3360 fa6e0e48 2019-05-23 stsp via the repository's HEAD reference, respectively:
3361 fa6e0e48 2019-05-23 stsp .Pp
3362 48c8c60d 2020-01-27 stsp .Dl $ got log -p -l 3
3363 04e9dcf3 2020-04-18 stsp .Pp
3364 3d0ac559 2020-04-18 stsp As above, but display changes in the order in which
3365 04e9dcf3 2020-04-18 stsp .Xr patch 1
3366 04e9dcf3 2020-04-18 stsp could apply them in sequence:
3367 5b666081 2020-02-24 stsp .Pp
3368 04e9dcf3 2020-04-18 stsp .Dl $ got log -p -l 3 -R
3369 04e9dcf3 2020-04-18 stsp .Pp
3370 5b666081 2020-02-24 stsp In a work tree or a git repository directory, log the history of a subdirectory:
3371 5b666081 2020-02-24 stsp .Pp
3372 5b666081 2020-02-24 stsp .Dl $ got log sys/uvm
3373 5b666081 2020-02-24 stsp .Pp
3374 5b666081 2020-02-24 stsp While operating inside a work tree, paths are specified relative to the current
3375 5b666081 2020-02-24 stsp working directory, so this command will log the subdirectory
3376 5b666081 2020-02-24 stsp .Pa sys/uvm :
3377 fa6e0e48 2019-05-23 stsp .Pp
3378 cf07f22b 2020-07-25 stsp .Dl $ cd sys/uvm && got log\ .
3379 5b666081 2020-02-24 stsp .Pp
3380 5b666081 2020-02-24 stsp And this command has the same effect:
3381 5b666081 2020-02-24 stsp .Pp
3382 5b666081 2020-02-24 stsp .Dl $ cd sys/dev/usb && got log ../../uvm
3383 5b666081 2020-02-24 stsp .Pp
3384 b2118c49 2020-07-28 stsp And this command displays work tree meta-data about all tracked files:
3385 b2118c49 2020-07-28 stsp .Pp
3386 b2118c49 2020-07-28 stsp .Dl $ cd /usr/src
3387 b2118c49 2020-07-28 stsp .Dl $ got info\ . | less
3388 b2118c49 2020-07-28 stsp .Pp
3389 e70c17ce 2019-05-22 stsp Add new files and remove obsolete files in a work tree directory:
3390 e70c17ce 2019-05-22 stsp .Pp
3391 fa6e0e48 2019-05-23 stsp .Dl $ got add sys/uvm/uvm_ubc.c
3392 86d25a1b 2019-07-11 stsp .Dl $ got remove sys/uvm/uvm_vnode.c
3393 e70c17ce 2019-05-22 stsp .Pp
3394 e70c17ce 2019-05-22 stsp Create a new commit from local changes in a work tree directory
3395 e70c17ce 2019-05-22 stsp with a pre-defined log message.
3396 e70c17ce 2019-05-22 stsp .Pp
3397 e70c17ce 2019-05-22 stsp .Dl $ got commit -m 'unify the buffer cache'
3398 95fc3404 2019-07-15 stsp .Pp
3399 bcbc2272 2020-05-20 stsp Alternatively, create a new commit from local changes in a work tree
3400 bcbc2272 2020-05-20 stsp directory with a log message that has been prepared in the file
3401 1795b260 2021-04-02 kn .Pa /tmp/msg :
3402 bcbc2272 2020-05-20 stsp .Pp
3403 28cf319f 2021-01-28 stsp .Dl $ got commit -F /tmp/msg
3404 bcbc2272 2020-05-20 stsp .Pp
3405 95fc3404 2019-07-15 stsp Update any work tree checked out from the
3406 95fc3404 2019-07-15 stsp .Dq unified-buffer-cache
3407 95fc3404 2019-07-15 stsp branch to the latest commit on this branch:
3408 95fc3404 2019-07-15 stsp .Pp
3409 95fc3404 2019-07-15 stsp .Dl $ got update
3410 ac90e726 2019-07-15 stsp .Pp
3411 c991308a 2019-07-15 stsp Roll file content on the unified-buffer-cache branch back by one commit,
3412 c991308a 2019-07-15 stsp and then fetch the rolled-back change into the work tree as a local change
3413 ac90e726 2019-07-15 stsp to be amended and perhaps committed again:
3414 e70c17ce 2019-05-22 stsp .Pp
3415 ac90e726 2019-07-15 stsp .Dl $ got backout unified-buffer-cache
3416 ac90e726 2019-07-15 stsp .Dl $ got commit -m 'roll back previous'
3417 59d52b88 2019-07-15 stsp .Dl $ # now back out the previous backout :-)
3418 ac90e726 2019-07-15 stsp .Dl $ got backout unified-buffer-cache
3419 ac90e726 2019-07-15 stsp .Pp
3420 a099809f 2021-08-27 stsp Fetch new changes on the remote repository's
3421 a099809f 2021-08-27 stsp .Dq master
3422 a099809f 2021-08-27 stsp branch, making them visible on the local repository's
3423 469dd726 2020-03-20 stsp .Dq origin/master
3424 469dd726 2020-03-20 stsp branch:
3425 fa6e0e48 2019-05-23 stsp .Pp
3426 469dd726 2020-03-20 stsp .Dl $ cd /usr/src
3427 469dd726 2020-03-20 stsp .Dl $ got fetch
3428 469dd726 2020-03-20 stsp .Pp
3429 469dd726 2020-03-20 stsp In a repository created with a HTTP URL and
3430 469dd726 2020-03-20 stsp .Cm git clone --bare
3431 469dd726 2020-03-20 stsp the
3432 469dd726 2020-03-20 stsp .Xr git-fetch 1
3433 469dd726 2020-03-20 stsp command must be used instead:
3434 469dd726 2020-03-20 stsp .Pp
3435 fa6e0e48 2019-05-23 stsp .Dl $ cd /var/git/src.git
3436 469dd726 2020-03-20 stsp .Dl $ git fetch origin master:refs/remotes/origin/master
3437 fa6e0e48 2019-05-23 stsp .Pp
3438 469dd726 2020-03-20 stsp Rebase the local
3439 469dd726 2020-03-20 stsp .Dq master
3440 469dd726 2020-03-20 stsp branch to merge the new changes that are now visible on the
3441 469dd726 2020-03-20 stsp .Dq origin/master
3442 469dd726 2020-03-20 stsp branch:
3443 469dd726 2020-03-20 stsp .Pp
3444 469dd726 2020-03-20 stsp .Dl $ cd /usr/src
3445 469dd726 2020-03-20 stsp .Dl $ got update -b origin/master
3446 469dd726 2020-03-20 stsp .Dl $ got rebase master
3447 469dd726 2020-03-20 stsp .Pp
3448 fa6e0e48 2019-05-23 stsp Rebase the
3449 fa6e0e48 2019-05-23 stsp .Dq unified-buffer-cache
3450 fa6e0e48 2019-05-23 stsp branch on top of the new head commit of the
3451 fa6e0e48 2019-05-23 stsp .Dq master
3452 fa6e0e48 2019-05-23 stsp branch.
3453 fa6e0e48 2019-05-23 stsp .Pp
3454 818c7501 2019-07-11 stsp .Dl $ got update -b master
3455 818c7501 2019-07-11 stsp .Dl $ got rebase unified-buffer-cache
3456 7d7ffedb 2019-07-14 stsp .Pp
3457 7d7ffedb 2019-07-14 stsp Create a patch from all changes on the unified-buffer-cache branch.
3458 1dd86744 2019-08-12 anthony The patch can be mailed out for review and applied to
3459 1dd86744 2019-08-12 anthony .Ox Ns 's
3460 1dd86744 2019-08-12 anthony CVS tree:
3461 7d7ffedb 2019-07-14 stsp .Pp
3462 7d7ffedb 2019-07-14 stsp .Dl $ got diff master unified-buffer-cache > /tmp/ubc.diff
3463 7d7ffedb 2019-07-14 stsp .Pp
3464 0ebf8283 2019-07-24 stsp Edit the entire commit history of the
3465 0ebf8283 2019-07-24 stsp .Dq unified-buffer-cache
3466 0ebf8283 2019-07-24 stsp branch:
3467 0ebf8283 2019-07-24 stsp .Pp
3468 0ebf8283 2019-07-24 stsp .Dl $ got update -b unified-buffer-cache
3469 0ebf8283 2019-07-24 stsp .Dl $ got update -c master
3470 0ebf8283 2019-07-24 stsp .Dl $ got histedit
3471 469dd726 2020-03-20 stsp .Pp
3472 ff2cf171 2019-07-28 stsp Before working against existing branches in a repository cloned with
3473 469dd726 2020-03-20 stsp .Cm git clone --bare
3474 7848a0e1 2020-03-19 stsp instead of
3475 7848a0e1 2020-03-19 stsp .Cm got clone ,
3476 ff2cf171 2019-07-28 stsp a Git
3477 ff2cf171 2019-07-28 stsp .Dq refspec
3478 ff2cf171 2019-07-28 stsp must be configured to map all references in the remote repository
3479 ff2cf171 2019-07-28 stsp into the
3480 ff2cf171 2019-07-28 stsp .Dq refs/remotes
3481 ff2cf171 2019-07-28 stsp namespace of the local repository.
3482 1795b260 2021-04-02 kn This can be achieved by setting Git's
3483 ff2cf171 2019-07-28 stsp .Pa remote.origin.fetch
3484 ff2cf171 2019-07-28 stsp configuration variable to the value
3485 ff2cf171 2019-07-28 stsp .Dq +refs/heads/*:refs/remotes/origin/*
3486 ff2cf171 2019-07-28 stsp with the
3487 ff2cf171 2019-07-28 stsp .Cm git config
3488 ff2cf171 2019-07-28 stsp command:
3489 ff2cf171 2019-07-28 stsp .Pp
3490 ff2cf171 2019-07-28 stsp .Dl $ cd /var/git/repo
3491 ff2cf171 2019-07-28 stsp .Dl $ git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
3492 eac81709 2020-03-21 stsp .Pp
3493 469dd726 2020-03-20 stsp Additionally, the
3494 469dd726 2020-03-20 stsp .Dq mirror
3495 469dd726 2020-03-20 stsp option must be disabled:
3496 ff2cf171 2019-07-28 stsp .Pp
3497 469dd726 2020-03-20 stsp .Dl $ cd /var/git/repo
3498 469dd726 2020-03-20 stsp .Dl $ git config remote.origin.mirror false
3499 469dd726 2020-03-20 stsp .Pp
3500 ff2cf171 2019-07-28 stsp Alternatively, the following
3501 469dd726 2020-03-20 stsp .Xr git-fetch 1
3502 ff2cf171 2019-07-28 stsp configuration item can be added manually to the Git repository's
3503 ff2cf171 2019-07-28 stsp .Pa config
3504 ff2cf171 2019-07-28 stsp file:
3505 0ebf8283 2019-07-24 stsp .Pp
3506 91c82228 2021-04-18 stsp .Dl [remote \&"origin\&"]
3507 ff2cf171 2019-07-28 stsp .Dl url = ...
3508 ff2cf171 2019-07-28 stsp .Dl fetch = +refs/heads/*:refs/remotes/origin/*
3509 469dd726 2020-03-20 stsp .Dl mirror = false
3510 ff2cf171 2019-07-28 stsp .Pp
3511 fe307c9b 2019-07-28 stsp This configuration leaves the local repository's
3512 ff2cf171 2019-07-28 stsp .Dq refs/heads
3513 ff2cf171 2019-07-28 stsp namespace free for use by local branches checked out with
3514 ff2cf171 2019-07-28 stsp .Cm got checkout
3515 ff2cf171 2019-07-28 stsp and, if needed, created with
3516 ff2cf171 2019-07-28 stsp .Cm got branch .
3517 ff2cf171 2019-07-28 stsp Branches in the
3518 a099809f 2021-08-27 stsp .Dq refs/remotes/origin
3519 469dd726 2020-03-20 stsp namespace can now be updated with incoming changes from the remote
3520 ff2cf171 2019-07-28 stsp repository with
3521 469dd726 2020-03-20 stsp .Cm got fetch
3522 469dd726 2020-03-20 stsp or
3523 469dd726 2020-03-20 stsp .Xr git-fetch 1
3524 a099809f 2021-08-27 stsp without extra command line arguments.
3525 a099809f 2021-08-27 stsp Newly fetched changes can be examined with
3526 a099809f 2021-08-27 stsp .Cm got log .
3527 ff2cf171 2019-07-28 stsp .Pp
3528 a099809f 2021-08-27 stsp Display changes on the remote repository's version of the
3529 ff2cf171 2019-07-28 stsp .Dq master
3530 a099809f 2021-08-27 stsp branch, as of the last time
3531 a099809f 2021-08-27 stsp .Cm got fetch
3532 a099809f 2021-08-27 stsp was run:
3533 a099809f 2021-08-27 stsp .Pp
3534 a099809f 2021-08-27 stsp .Dl $ got log -c origin/master | less
3535 a099809f 2021-08-27 stsp .Pp
3536 a099809f 2021-08-27 stsp As shown here, most commands accept abbreviated reference names such as
3537 ff2cf171 2019-07-28 stsp .Dq origin/master
3538 a099809f 2021-08-27 stsp instead of
3539 a099809f 2021-08-27 stsp .Dq refs/remotes/origin/master .
3540 a099809f 2021-08-27 stsp The latter is only needed in case of ambiguity.
3541 a099809f 2021-08-27 stsp .Pp
3542 a099809f 2021-08-27 stsp .Cm got rebase
3543 1fa75a87 2023-06-22 thomas can be used to merge changes which are visible on the
3544 a099809f 2021-08-27 stsp .Dq origin/master
3545 a099809f 2021-08-27 stsp branch into the
3546 a099809f 2021-08-27 stsp .Dq master
3547 7b0db533 2020-02-04 stsp branch.
3548 7b0db533 2020-02-04 stsp This will also merge local changes, if any, with the incoming changes:
3549 ff2cf171 2019-07-28 stsp .Pp
3550 ff2cf171 2019-07-28 stsp .Dl $ got update -b origin/master
3551 ff2cf171 2019-07-28 stsp .Dl $ got rebase master
3552 083957f4 2020-02-24 stsp .Pp
3553 a099809f 2021-08-27 stsp In order to make changes committed to the
3554 a099809f 2021-08-27 stsp .Dq unified-buffer-cache
3555 a099809f 2021-08-27 stsp visible on the
3556 a099809f 2021-08-27 stsp .Dq master
3557 a099809f 2021-08-27 stsp branch, the
3558 a099809f 2021-08-27 stsp .Dq unified-buffer-cache
3559 1fa75a87 2023-06-22 thomas branch can be rebased onto the
3560 a099809f 2021-08-27 stsp .Dq master
3561 a099809f 2021-08-27 stsp branch:
3562 a099809f 2021-08-27 stsp .Pp
3563 a099809f 2021-08-27 stsp .Dl $ got update -b master
3564 a099809f 2021-08-27 stsp .Dl $ got rebase unified-buffer-cache
3565 a099809f 2021-08-27 stsp .Pp
3566 a099809f 2021-08-27 stsp Changes on the
3567 a099809f 2021-08-27 stsp .Dq unified-buffer-cache
3568 a099809f 2021-08-27 stsp branch can now be made visible on the
3569 a099809f 2021-08-27 stsp .Dq master
3570 a099809f 2021-08-27 stsp branch with
3571 a099809f 2021-08-27 stsp .Cm got integrate .
3572 a099809f 2021-08-27 stsp Because the rebase operation switched the work tree to the
3573 a099809f 2021-08-27 stsp .Dq unified-buffer-cache
3574 4b06140e 2022-03-22 thomas branch, the work tree must be switched back to the
3575 a099809f 2021-08-27 stsp .Dq master
3576 a099809f 2021-08-27 stsp branch first:
3577 a099809f 2021-08-27 stsp .Pp
3578 a099809f 2021-08-27 stsp .Dl $ got update -b master
3579 a099809f 2021-08-27 stsp .Dl $ got integrate unified-buffer-cache
3580 a099809f 2021-08-27 stsp .Pp
3581 083957f4 2020-02-24 stsp On the
3582 083957f4 2020-02-24 stsp .Dq master
3583 083957f4 2020-02-24 stsp branch, log messages for local changes can now be amended with
3584 083957f4 2020-02-24 stsp .Dq OK
3585 083957f4 2020-02-24 stsp by other developers and any other important new information:
3586 ff2cf171 2019-07-28 stsp .Pp
3587 083957f4 2020-02-24 stsp .Dl $ got update -c origin/master
3588 083957f4 2020-02-24 stsp .Dl $ got histedit -m
3589 083957f4 2020-02-24 stsp .Pp
3590 4b06140e 2022-03-22 thomas If the remote repository offers write access, local changes on the
3591 ff2cf171 2019-07-28 stsp .Dq master
3592 a099809f 2021-08-27 stsp branch can be sent to the remote repository with
3593 ac93b2c5 2021-10-08 thomas .Cm got send .
3594 ac93b2c5 2021-10-08 thomas Usually,
3595 a099809f 2021-08-27 stsp .Cm got send
3596 a099809f 2021-08-27 stsp can be run without further arguments.
3597 a099809f 2021-08-27 stsp The arguments shown here match defaults, provided the work tree's
3598 a099809f 2021-08-27 stsp current branch is the
3599 a099809f 2021-08-27 stsp .Dq master
3600 a099809f 2021-08-27 stsp branch:
3601 ff2cf171 2019-07-28 stsp .Pp
3602 a099809f 2021-08-27 stsp .Dl $ got send -b master origin
3603 a099809f 2021-08-27 stsp .Pp
3604 4b06140e 2022-03-22 thomas If the remote repository requires the HTTPS protocol, the
3605 a099809f 2021-08-27 stsp .Xr git-push 1
3606 a099809f 2021-08-27 stsp command must be used instead:
3607 a099809f 2021-08-27 stsp .Pp
3608 a099809f 2021-08-27 stsp .Dl $ cd /var/git/src.git
3609 ff2cf171 2019-07-28 stsp .Dl $ git push origin master
3610 4ff74dcf 2022-07-20 thomas .Pp
3611 4ff74dcf 2022-07-20 thomas When making contributions to projects which use the
3612 4ff74dcf 2022-07-20 thomas .Dq pull request
3613 4ff74dcf 2022-07-20 thomas workflow, SSH protocol repository access needs to be set up first.
3614 4ff74dcf 2022-07-20 thomas Once an account has been created on a Git hosting site it should
3615 4ff74dcf 2022-07-20 thomas be possible to upload a public SSH key for repository access
3616 4ff74dcf 2022-07-20 thomas authentication.
3617 4ff74dcf 2022-07-20 thomas .Pp
3618 4ff74dcf 2022-07-20 thomas The
3619 4ff74dcf 2022-07-20 thomas .Dq pull request
3620 4ff74dcf 2022-07-20 thomas workflow will usually involve two remote repositories.
3621 4ff74dcf 2022-07-20 thomas In the real-life example below, the
3622 4ff74dcf 2022-07-20 thomas .Dq origin
3623 4ff74dcf 2022-07-20 thomas repository was forked from the
3624 4ff74dcf 2022-07-20 thomas .Dq upstream
3625 4ff74dcf 2022-07-20 thomas repository by using the Git hosting site's web interface.
3626 4ff74dcf 2022-07-20 thomas The
3627 4ff74dcf 2022-07-20 thomas .Xr got.conf 5
3628 4ff74dcf 2022-07-20 thomas file in the local repository describes both remote repositories:
3629 4ff74dcf 2022-07-20 thomas .Bd -literal -offset indent
3630 4ff74dcf 2022-07-20 thomas # Jelmers's repository, which accepts pull requests
3631 4ff74dcf 2022-07-20 thomas remote "upstream" {
3632 4ff74dcf 2022-07-20 thomas server git@github.com
3633 4ff74dcf 2022-07-20 thomas protocol ssh
3634 4ff74dcf 2022-07-20 thomas repository "/jelmer/dulwich"
3635 4ff74dcf 2022-07-20 thomas branch { "master" }
3636 4ff74dcf 2022-07-20 thomas }
3637 4ff74dcf 2022-07-20 thomas
3638 4ff74dcf 2022-07-20 thomas # Stefan's fork, used as the default remote repository
3639 4ff74dcf 2022-07-20 thomas remote "origin" {
3640 4ff74dcf 2022-07-20 thomas server git@github.com
3641 4ff74dcf 2022-07-20 thomas protocol ssh
3642 4ff74dcf 2022-07-20 thomas repository "/stspdotname/dulwich"
3643 4ff74dcf 2022-07-20 thomas branch { "master" }
3644 4ff74dcf 2022-07-20 thomas }
3645 4ff74dcf 2022-07-20 thomas .Ed
3646 4ff74dcf 2022-07-20 thomas .Pp
3647 4ff74dcf 2022-07-20 thomas With this configuration, Stefan can create commits on
3648 4ff74dcf 2022-07-20 thomas .Dq refs/heads/master
3649 4ff74dcf 2022-07-20 thomas and send them to the
3650 4ff74dcf 2022-07-20 thomas .Dq origin
3651 4ff74dcf 2022-07-20 thomas repository by running:
3652 4ff74dcf 2022-07-20 thomas .Pp
3653 4ff74dcf 2022-07-20 thomas .Dl $ got send -b master origin
3654 4ff74dcf 2022-07-20 thomas .Pp
3655 4ff74dcf 2022-07-20 thomas The changes can now be proposed to Jelmer by opening a pull request
3656 4ff74dcf 2022-07-20 thomas via the Git hosting site's web interface.
3657 4ff74dcf 2022-07-20 thomas If Jelmer requests further changes to be made, additional commits
3658 4ff74dcf 2022-07-20 thomas can be created on the
3659 4ff74dcf 2022-07-20 thomas .Dq master
3660 4ff74dcf 2022-07-20 thomas branch and be added to the pull request by running
3661 4ff74dcf 2022-07-20 thomas .Cd got send
3662 4ff74dcf 2022-07-20 thomas again.
3663 4ff74dcf 2022-07-20 thomas .Pp
3664 4ff74dcf 2022-07-20 thomas If Jelmer prefers additional commits to be
3665 4ff74dcf 2022-07-20 thomas .Dq squashed
3666 4ff74dcf 2022-07-20 thomas then the following commands can be used to achieve this:
3667 4ff74dcf 2022-07-20 thomas .Pp
3668 4ff74dcf 2022-07-20 thomas .Dl $ got update -b master
3669 4ff74dcf 2022-07-20 thomas .Dl $ got update -c origin/master
3670 4ff74dcf 2022-07-20 thomas .Dl $ got histedit -f
3671 4ff74dcf 2022-07-20 thomas .Dl $ got send -f -b master origin
3672 4ff74dcf 2022-07-20 thomas .Pp
3673 f2afb89d 2023-04-22 thomas In addition to reviewing the pull request in the web user interface,
3674 f2afb89d 2023-04-22 thomas Jelmer can fetch the pull request's branch into his local repository
3675 f2afb89d 2023-04-22 thomas and create a local branch which contains the proposed changes:
3676 f2afb89d 2023-04-22 thomas .Pp
3677 f2afb89d 2023-04-22 thomas .Dl $ got fetch -R refs/pull/1046/head origin
3678 f2afb89d 2023-04-22 thomas .Dl $ got branch -c refs/remotes/origin/pull/1046/head pr1046
3679 f2afb89d 2023-04-22 thomas .Pp
3680 4ff74dcf 2022-07-20 thomas Once Jelmer has accepted the pull request, Stefan can fetch the
3681 4ff74dcf 2022-07-20 thomas merged changes, and possibly several other new changes, by running:
3682 4ff74dcf 2022-07-20 thomas .Pp
3683 4ff74dcf 2022-07-20 thomas .Dl $ got fetch upstream
3684 4ff74dcf 2022-07-20 thomas .Pp
3685 4ff74dcf 2022-07-20 thomas The merged changes will now be visible under the reference
3686 4ff74dcf 2022-07-20 thomas .Dq refs/remotes/upstream/master .
3687 4ff74dcf 2022-07-20 thomas The local
3688 4ff74dcf 2022-07-20 thomas .Dq master
3689 4ff74dcf 2022-07-20 thomas branch can now be rebased on top of the latest changes
3690 4ff74dcf 2022-07-20 thomas from upstream:
3691 4ff74dcf 2022-07-20 thomas .Pp
3692 4ff74dcf 2022-07-20 thomas .Dl $ got update -b upstream/master
3693 4ff74dcf 2022-07-20 thomas .Dl $ got rebase master
3694 0b83b8f6 2023-06-22 thomas .Pp
3695 0b83b8f6 2023-06-22 thomas As an alternative to
3696 0b83b8f6 2023-06-22 thomas .Cm got rebase ,
3697 0b83b8f6 2023-06-22 thomas branches can be merged with
3698 0b83b8f6 2023-06-22 thomas .Cm got merge :
3699 0b83b8f6 2023-06-22 thomas .Pp
3700 0b83b8f6 2023-06-22 thomas .Dl $ got update -b master
3701 0b83b8f6 2023-06-22 thomas .Dl $ got merge upstream/master
3702 4ff74dcf 2022-07-20 thomas .Pp
3703 0b83b8f6 2023-06-22 thomas The question of whether to rebase or merge branches is philosophical.
3704 0b83b8f6 2023-06-22 thomas When in doubt, refer to the software project's policies set by project
3705 0b83b8f6 2023-06-22 thomas maintainers.
3706 0b83b8f6 2023-06-22 thomas .Pp
3707 4ff74dcf 2022-07-20 thomas As a final step, the forked repository's copy of the master branch needs
3708 4ff74dcf 2022-07-20 thomas to be kept in sync by sending the new changes there:
3709 4ff74dcf 2022-07-20 thomas .Pp
3710 4ff74dcf 2022-07-20 thomas .Dl $ got send -f -b master origin
3711 4ff74dcf 2022-07-20 thomas .Pp
3712 4ff74dcf 2022-07-20 thomas If multiple pull requests need to be managed in parallel, a separate branch
3713 4ff74dcf 2022-07-20 thomas must be created for each pull request with
3714 4ff74dcf 2022-07-20 thomas .Cm got branch .
3715 4ff74dcf 2022-07-20 thomas Each such branch can then be used as above, in place of
3716 4ff74dcf 2022-07-20 thomas .Dq refs/heads/master .
3717 4ff74dcf 2022-07-20 thomas Changes for any accepted pull requests will still appear under
3718 4ff74dcf 2022-07-20 thomas .Dq refs/remotes/upstream/master,
3719 4ff74dcf 2022-07-20 thomas regardless of which branch was used in the forked repository to
3720 4ff74dcf 2022-07-20 thomas create a pull request.
3721 5c860e29 2018-03-12 stsp .Sh SEE ALSO
3722 0a79feb1 2021-04-10 stsp .Xr gotadmin 1 ,
3723 2312fc47 2019-07-15 stsp .Xr tog 1 ,
3724 2312fc47 2019-07-15 stsp .Xr git-repository 5 ,
3725 257add31 2020-09-09 stsp .Xr got-worktree 5 ,
3726 b345cf8f 2022-07-05 thomas .Xr got.conf 5 ,
3727 85c360aa 2023-01-02 thomas .Xr gotwebd 8
3728 1a208aaf 2018-04-01 stsp .Sh AUTHORS
3729 60c73080 2022-07-05 thomas .An Anthony J. Bentley Aq Mt bentley@openbsd.org
3730 60c73080 2022-07-05 thomas .An Christian Weisgerber Aq Mt naddy@openbsd.org
3731 60c73080 2022-07-05 thomas .An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org
3732 60c73080 2022-07-05 thomas .An Josh Rickmar Aq Mt jrick@zettaport.com
3733 bc3056e3 2019-08-18 stsp .An Joshua Stein Aq Mt jcs@openbsd.org
3734 60c73080 2022-07-05 thomas .An Klemens Nanni Aq Mt kn@openbsd.org
3735 60c73080 2022-07-05 thomas .An Martin Pieuchot Aq Mt mpi@openbsd.org
3736 f6fad9f6 2022-07-05 thomas .An Neels Hofmeyr Aq Mt neels@hofmeyr.de
3737 60c73080 2022-07-05 thomas .An Omar Polo Aq Mt op@openbsd.org
3738 83b416ed 2020-03-18 stsp .An Ori Bernstein Aq Mt ori@openbsd.org
3739 60c73080 2022-07-05 thomas .An Sebastien Marie Aq Mt semarie@openbsd.org
3740 60c73080 2022-07-05 thomas .An Stefan Sperling Aq Mt stsp@openbsd.org
3741 bee5044f 2022-07-05 thomas .An Steven McDonald Aq Mt steven@steven-mcdonald.id.au
3742 60c73080 2022-07-05 thomas .An Theo Buehler Aq Mt tb@openbsd.org
3743 60c73080 2022-07-05 thomas .An Thomas Adam Aq Mt thomas@xteddy.org
3744 60c73080 2022-07-05 thomas .An Tracey Emery Aq Mt tracey@traceyemery.net
3745 60c73080 2022-07-05 thomas .An Yang Zhong Aq Mt yzhong@freebsdfoundation.org
3746 de71b616 2022-07-05 thomas .Pp
3747 de71b616 2022-07-05 thomas Parts of
3748 de71b616 2022-07-05 thomas .Nm ,
3749 de71b616 2022-07-05 thomas .Xr tog 1 ,
3750 de71b616 2022-07-05 thomas and
3751 85c360aa 2023-01-02 thomas .Xr gotwebd 8
3752 de71b616 2022-07-05 thomas were derived from code under copyright by:
3753 de71b616 2022-07-05 thomas .Pp
3754 408db73d 2022-07-22 thomas .An Caldera International
3755 de71b616 2022-07-05 thomas .An Daniel Hartmeier
3756 de71b616 2022-07-05 thomas .An Esben Norby
3757 de71b616 2022-07-05 thomas .An Henning Brauer
3758 de71b616 2022-07-05 thomas .An HÃ¥kan Olsson
3759 de71b616 2022-07-05 thomas .An Ingo Schwarze
3760 de71b616 2022-07-05 thomas .An Jean-Francois Brousseau
3761 de71b616 2022-07-05 thomas .An Joris Vink
3762 de71b616 2022-07-05 thomas .An Jyri J. Virkki
3763 de71b616 2022-07-05 thomas .An Larry Wall
3764 408db73d 2022-07-22 thomas .An Markus Friedl
3765 de71b616 2022-07-05 thomas .An Niall O'Higgins
3766 de71b616 2022-07-05 thomas .An Niklas Hallqvist
3767 de71b616 2022-07-05 thomas .An Ray Lai
3768 de71b616 2022-07-05 thomas .An Ryan McBride
3769 de71b616 2022-07-05 thomas .An Theo de Raadt
3770 de71b616 2022-07-05 thomas .An Todd C. Miller
3771 de71b616 2022-07-05 thomas .An Xavier Santolaria
3772 e4badaa9 2022-07-05 thomas .Pp
3773 e4badaa9 2022-07-05 thomas .Nm
3774 e4badaa9 2022-07-05 thomas contains code contributed to the public domain by
3775 86f8a176 2022-12-30 thomas .An Austin Appleby .
3776 fa6e0e48 2019-05-23 stsp .Sh CAVEATS
3777 fa6e0e48 2019-05-23 stsp .Nm
3778 cc63216e 2020-12-26 stsp is a work-in-progress and some features remain to be implemented.
3779 1795b260 2021-04-02 kn .Pp
3780 fa6e0e48 2019-05-23 stsp At present, the user has to fall back on
3781 fa6e0e48 2019-05-23 stsp .Xr git 1
3782 cc63216e 2020-12-26 stsp to perform some tasks.
3783 cc63216e 2020-12-26 stsp In particular:
3784 cc63216e 2020-12-26 stsp .Bl -bullet
3785 cc63216e 2020-12-26 stsp .It
3786 cc63216e 2020-12-26 stsp Reading from remote repositories over HTTP or HTTPS protocols requires
3787 cc63216e 2020-12-26 stsp .Xr git-clone 1
3788 cc63216e 2020-12-26 stsp and
3789 cc63216e 2020-12-26 stsp .Xr git-fetch 1 .
3790 cc63216e 2020-12-26 stsp .It
3791 a099809f 2021-08-27 stsp Writing to remote repositories over HTTP or HTTPS protocols requires
3792 cc63216e 2020-12-26 stsp .Xr git-push 1 .
3793 cc63216e 2020-12-26 stsp .It
3794 22a38a43 2021-09-28 thomas The creation of merge commits with more than two parent commits requires
3795 cc63216e 2020-12-26 stsp .Xr git-merge 1 .
3796 cc63216e 2020-12-26 stsp .It
3797 cc63216e 2020-12-26 stsp In situations where files or directories were moved around
3798 cc63216e 2020-12-26 stsp .Cm got
3799 cc63216e 2020-12-26 stsp will not automatically merge changes to new locations and
3800 cc63216e 2020-12-26 stsp .Xr git 1
3801 cc63216e 2020-12-26 stsp will usually produce better results.
3802 cc63216e 2020-12-26 stsp .El