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 6a0a1bd4 2022-10-04 op .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 95f394e8 2021-10-04 kn .Tg im
66 5fc4f020 2022-08-30 op .It Xo
67 5fc4f020 2022-08-30 op .Cm import
68 5fc4f020 2022-08-30 op .Op Fl b Ar branch
69 5fc4f020 2022-08-30 op .Op Fl I Ar pattern
70 5fc4f020 2022-08-30 op .Op Fl m Ar message
71 5fc4f020 2022-08-30 op .Op Fl r Ar repository-path
72 5fc4f020 2022-08-30 op .Ar directory
73 5fc4f020 2022-08-30 op .Xc
74 4683a10b 2021-11-04 kn .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 6f04a73d 2022-09-20 mark .Ar branch .
108 6f04a73d 2022-09-20 mark If this option is not specified, a branch corresponding to the repository's
109 6f04a73d 2022-09-20 mark HEAD reference will be used.
110 6f04a73d 2022-09-20 mark Use of this option is required if the branch resolved via the repository's
111 6f04a73d 2022-09-20 mark HEAD reference already exists.
112 827a167b 2022-08-16 stsp .It Fl I Ar pattern
113 827a167b 2022-08-16 stsp Ignore files or directories with a name which matches the specified
114 827a167b 2022-08-16 stsp .Ar pattern .
115 827a167b 2022-08-16 stsp This option may be specified multiple times to build a list of ignore patterns.
116 827a167b 2022-08-16 stsp The
117 827a167b 2022-08-16 stsp .Ar pattern
118 827a167b 2022-08-16 stsp follows the globbing rules documented in
119 827a167b 2022-08-16 stsp .Xr glob 7 .
120 49351f3b 2023-02-06 stsp Ignore patterns which end with a slash,
121 49351f3b 2023-02-06 stsp .Dq / ,
122 49351f3b 2023-02-06 stsp 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 ee27b57e 2023-07-15 naddy Quitting the editor without saving the file will abort the import operation.
131 3ce1b845 2019-07-15 stsp .It Fl r Ar repository-path
132 3ce1b845 2019-07-15 stsp Use the repository at the specified path.
133 3ce1b845 2019-07-15 stsp If not specified, assume the repository is located at or above the current
134 3ce1b845 2019-07-15 stsp working directory.
135 3ce1b845 2019-07-15 stsp .El
136 95f394e8 2021-10-04 kn .Tg cl
137 5fc4f020 2022-08-30 op .It Xo
138 5fc4f020 2022-08-30 op .Cm clone
139 5fc4f020 2022-08-30 op .Op Fl almqv
140 5fc4f020 2022-08-30 op .Op Fl b Ar branch
141 5fc4f020 2022-08-30 op .Op Fl R Ar reference
142 5fc4f020 2022-08-30 op .Ar repository-URL
143 5fc4f020 2022-08-30 op .Op Ar directory
144 5fc4f020 2022-08-30 op .Xc
145 4683a10b 2021-11-04 kn .Dl Pq alias: Cm cl
146 2ab43947 2020-03-18 stsp Clone a Git repository at the specified
147 2ab43947 2020-03-18 stsp .Ar repository-URL
148 2ab43947 2020-03-18 stsp into the specified
149 3493b628 2020-03-20 stsp .Ar directory .
150 2ab43947 2020-03-18 stsp If no
151 3493b628 2020-03-20 stsp .Ar directory
152 e38d4cde 2022-03-21 naddy is specified, the directory name will be derived from the name of the
153 2ab43947 2020-03-18 stsp cloned repository.
154 2ab43947 2020-03-18 stsp .Cm got clone
155 2ab43947 2020-03-18 stsp will refuse to run if the
156 3493b628 2020-03-20 stsp .Ar directory
157 2ab43947 2020-03-18 stsp already exists.
158 2ab43947 2020-03-18 stsp .Pp
159 2ab43947 2020-03-18 stsp The
160 2ab43947 2020-03-18 stsp .Ar repository-URL
161 619eb6dd 2020-03-20 stsp specifies a protocol scheme, a server hostname, an optional port number
162 619eb6dd 2020-03-20 stsp separated from the hostname by a colon, and a path to the repository on
163 619eb6dd 2020-03-20 stsp the server:
164 619eb6dd 2020-03-20 stsp .Lk scheme://hostname:port/path/to/repository
165 2ab43947 2020-03-18 stsp .Pp
166 2ab43947 2020-03-18 stsp The following protocol schemes are supported:
167 78775350 2024-04-26 falsifian .Bl -tag -width https
168 2ab43947 2020-03-18 stsp .It git
169 2ab43947 2020-03-18 stsp The Git protocol as implemented by the
170 2ab43947 2020-03-18 stsp .Xr git-daemon 1
171 2ab43947 2020-03-18 stsp server.
172 10c073e7 2020-03-20 stsp Use of this protocol is discouraged since it supports neither authentication
173 10c073e7 2020-03-20 stsp nor encryption.
174 449ea7f2 2024-04-17 stsp .It ssh
175 2ab43947 2020-03-18 stsp The Git protocol wrapped in an authenticated and encrypted
176 2ab43947 2020-03-18 stsp .Xr ssh 1
177 2ab43947 2020-03-18 stsp tunnel.
178 2ab43947 2020-03-18 stsp With this protocol the hostname may contain an embedded username for
179 2ab43947 2020-03-18 stsp .Xr ssh 1
180 2ab43947 2020-03-18 stsp to use:
181 2ab43947 2020-03-18 stsp .Mt user@hostname
182 da442b3f 2024-04-14 stsp .It http
183 da442b3f 2024-04-14 stsp The
184 da442b3f 2024-04-14 stsp .Dq smart
185 bf710491 2024-04-17 stsp Git HTTP protocol.
186 bf710491 2024-04-17 stsp Not compatible with servers using the
187 bf710491 2024-04-17 stsp .Dq dumb
188 bf710491 2024-04-17 stsp Git HTTP protocol.
189 bf710491 2024-04-17 stsp .Pp
190 bf710491 2024-04-17 stsp The
191 bf710491 2024-04-17 stsp .Dq smart
192 bf710491 2024-04-17 stsp Git HTTP protocol is supported by
193 da442b3f 2024-04-14 stsp .Cm got clone
194 da442b3f 2024-04-14 stsp and
195 da442b3f 2024-04-14 stsp .Cm got fetch ,
196 da442b3f 2024-04-14 stsp but not by
197 da442b3f 2024-04-14 stsp .Cm got send .
198 78775350 2024-04-26 falsifian Sending from a repository cloned over HTTP will require use of a
199 bf710491 2024-04-17 stsp .Ic send
200 78775350 2024-04-26 falsifian block in
201 bf710491 2024-04-17 stsp .Xr got.conf 5
202 bf710491 2024-04-17 stsp to ensure that the
203 bf710491 2024-04-17 stsp .Dq ssh://
204 bf710491 2024-04-17 stsp protocol will be used by
205 bf710491 2024-04-17 stsp .Cm got send .
206 bf710491 2024-04-17 stsp .Pp
207 da442b3f 2024-04-14 stsp Use of this protocol is discouraged since it supports neither authentication
208 da442b3f 2024-04-14 stsp nor encryption.
209 da442b3f 2024-04-14 stsp .It https
210 da442b3f 2024-04-14 stsp The
211 da442b3f 2024-04-14 stsp .Dq smart
212 da442b3f 2024-04-14 stsp Git HTTP protocol wrapped in SSL/TLS.
213 2ab43947 2020-03-18 stsp .El
214 89c3c67b 2020-03-20 stsp .Pp
215 89c3c67b 2020-03-20 stsp Objects in the cloned repository are stored in a pack file which is downloaded
216 89c3c67b 2020-03-20 stsp from the server.
217 89c3c67b 2020-03-20 stsp This pack file will then be indexed to facilitate access to the objects stored
218 89c3c67b 2020-03-20 stsp within.
219 89c3c67b 2020-03-20 stsp If any objects in the pack file are stored in deltified form, all deltas will
220 89c3c67b 2020-03-20 stsp be fully resolved in order to compute the ID of such objects.
221 89c3c67b 2020-03-20 stsp This can take some time.
222 010f7279 2020-03-20 stsp More details about the pack file format are documented in
223 010f7279 2020-03-20 stsp .Xr git-repository 5 .
224 2ab43947 2020-03-18 stsp .Pp
225 7848a0e1 2020-03-19 stsp .Cm got clone
226 7848a0e1 2020-03-19 stsp creates a remote repository entry in the
227 257add31 2020-09-09 stsp .Xr got.conf 5
228 257add31 2020-09-09 stsp and
229 7848a0e1 2020-03-19 stsp .Pa config
230 257add31 2020-09-09 stsp files of the cloned repository to store the
231 7848a0e1 2020-03-19 stsp .Ar repository-url
232 99495ddb 2021-01-10 stsp and any
233 15d3c221 2021-01-05 stsp .Ar branch
234 99495ddb 2021-01-10 stsp or
235 99495ddb 2021-01-10 stsp .Ar reference
236 132af4a5 2021-01-05 stsp arguments for future use by
237 7848a0e1 2020-03-19 stsp .Cm got fetch
238 fc24bb3a 2020-03-21 stsp or
239 7848a0e1 2020-03-19 stsp .Xr git-fetch 1 .
240 7848a0e1 2020-03-19 stsp .Pp
241 2ab43947 2020-03-18 stsp The options for
242 2ab43947 2020-03-18 stsp .Cm got clone
243 2ab43947 2020-03-18 stsp are as follows:
244 2ab43947 2020-03-18 stsp .Bl -tag -width Ds
245 659e7fbd 2020-03-20 stsp .It Fl a
246 1d4b192f 2020-03-21 stsp Fetch all branches from the remote repository's
247 1d4b192f 2020-03-21 stsp .Dq refs/heads/
248 5aa20203 2021-01-05 stsp reference namespace and set
249 f1bf60d1 2022-07-03 stsp .Cm fetch_all_branches
250 5aa20203 2021-01-05 stsp in the cloned repository's
251 5aa20203 2021-01-05 stsp .Xr got.conf 5
252 5aa20203 2021-01-05 stsp file for future use by
253 5aa20203 2021-01-05 stsp .Cm got fetch .
254 4ba14133 2020-03-20 stsp If this option is not specified, a branch resolved via the remote
255 4ba14133 2020-03-20 stsp repository's HEAD reference will be fetched.
256 4ba14133 2020-03-20 stsp Cannot be used together with the
257 4ba14133 2020-03-20 stsp .Fl b
258 4ba14133 2020-03-20 stsp option.
259 4ba14133 2020-03-20 stsp .It Fl b Ar branch
260 4ba14133 2020-03-20 stsp Fetch the specified
261 4ba14133 2020-03-20 stsp .Ar branch
262 1d4b192f 2020-03-21 stsp from the remote repository's
263 1d4b192f 2020-03-21 stsp .Dq refs/heads/
264 1d4b192f 2020-03-21 stsp reference namespace.
265 4ba14133 2020-03-20 stsp This option may be specified multiple times to build a list of branches
266 4ba14133 2020-03-20 stsp to fetch.
267 4ba14133 2020-03-20 stsp If the branch corresponding to the remote repository's HEAD reference is not
268 4ba14133 2020-03-20 stsp in this list, the cloned repository's HEAD reference will be set to the first
269 4ba14133 2020-03-20 stsp branch which was fetched.
270 4ba14133 2020-03-20 stsp If this option is not specified, a branch resolved via the remote
271 4ba14133 2020-03-20 stsp repository's HEAD reference will be fetched.
272 4ba14133 2020-03-20 stsp Cannot be used together with the
273 4ba14133 2020-03-20 stsp .Fl a
274 4ba14133 2020-03-20 stsp option.
275 41b0de12 2020-03-21 stsp .It Fl l
276 a18cccf9 2020-03-21 stsp List branches and tags available for fetching from the remote repository
277 41b0de12 2020-03-21 stsp and exit immediately.
278 41b0de12 2020-03-21 stsp Cannot be used together with any of the other options except
279 a5a46be2 2021-01-27 stsp .Fl q
280 a5a46be2 2021-01-27 stsp and
281 41b0de12 2020-03-21 stsp .Fl v .
282 469dd726 2020-03-20 stsp .It Fl m
283 469dd726 2020-03-20 stsp Create the cloned repository as a mirror of the original repository.
284 469dd726 2020-03-20 stsp This is useful if the cloned repository will not be used to store
285 bd81cfb7 2020-04-19 stsp locally created commits.
286 469dd726 2020-03-20 stsp .Pp
287 469dd726 2020-03-20 stsp The repository's
288 257add31 2020-09-09 stsp .Xr got.conf 5
289 257add31 2020-09-09 stsp and
290 469dd726 2020-03-20 stsp .Pa config
291 257add31 2020-09-09 stsp files will be set up with the
292 469dd726 2020-03-20 stsp .Dq mirror
293 469dd726 2020-03-20 stsp option enabled, such that
294 469dd726 2020-03-20 stsp .Cm got fetch
295 469dd726 2020-03-20 stsp or
296 469dd726 2020-03-20 stsp .Xr git-fetch 1
297 bd81cfb7 2020-04-19 stsp will write incoming changes directly to branches in the
298 469dd726 2020-03-20 stsp .Dq refs/heads/
299 469dd726 2020-03-20 stsp reference namespace, rather than to branches in the
300 469dd726 2020-03-20 stsp .Dq refs/remotes/
301 469dd726 2020-03-20 stsp namespace.
302 469dd726 2020-03-20 stsp This avoids the usual requirement of having to run
303 469dd726 2020-03-20 stsp .Cm got rebase
304 7b53188e 2023-07-03 stsp or
305 7b53188e 2023-07-03 stsp .Cm got merge
306 469dd726 2020-03-20 stsp after
307 469dd726 2020-03-20 stsp .Cm got fetch
308 bd81cfb7 2020-04-19 stsp in order to make incoming changes appear on branches in the
309 bd81cfb7 2020-04-19 stsp .Dq refs/heads/
310 bd81cfb7 2020-04-19 stsp namespace.
311 bd81cfb7 2020-04-19 stsp But maintaining custom changes in the cloned repository becomes difficult
312 bd81cfb7 2020-04-19 stsp since such changes will be at risk of being discarded whenever incoming
313 498ef124 2020-03-21 stsp changes are fetched.
314 2ab43947 2020-03-18 stsp .It Fl q
315 2ab43947 2020-03-18 stsp Suppress progress reporting output.
316 2ab43947 2020-03-18 stsp The same option will be passed to
317 2ab43947 2020-03-18 stsp .Xr ssh 1
318 2ab43947 2020-03-18 stsp if applicable.
319 0e4002ca 2020-03-21 stsp .It Fl R Ar reference
320 0e4002ca 2020-03-21 stsp In addition to the branches and tags that will be fetched, fetch an arbitrary
321 0e4002ca 2020-03-21 stsp .Ar reference
322 0e4002ca 2020-03-21 stsp from the remote repository's
323 0e4002ca 2020-03-21 stsp .Dq refs/
324 0e4002ca 2020-03-21 stsp namespace.
325 0e4002ca 2020-03-21 stsp This option may be specified multiple times to build a list of additional
326 0e4002ca 2020-03-21 stsp references to fetch.
327 71f12362 2020-03-21 stsp The specified
328 71f12362 2020-03-21 stsp .Ar reference
329 a18cccf9 2020-03-21 stsp may either be a path to a specific reference, or a reference namespace
330 71f12362 2020-03-21 stsp which will cause all references in this namespace to be fetched.
331 0e4002ca 2020-03-21 stsp .Pp
332 71f12362 2020-03-21 stsp Each reference will be mapped into the cloned repository's
333 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
334 0e4002ca 2020-03-21 stsp namespace, unless the
335 0e4002ca 2020-03-21 stsp .Fl m
336 0e4002ca 2020-03-21 stsp option is used to mirror references directly into the cloned repository's
337 0e4002ca 2020-03-21 stsp .Dq refs/
338 0e4002ca 2020-03-21 stsp namespace.
339 0e4002ca 2020-03-21 stsp .Pp
340 0e4002ca 2020-03-21 stsp .Cm got clone
341 0e4002ca 2020-03-21 stsp will refuse to fetch references from the remote repository's
342 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
343 0e4002ca 2020-03-21 stsp or
344 0e4002ca 2020-03-21 stsp .Dq refs/got/
345 0e4002ca 2020-03-21 stsp namespace.
346 827a167b 2022-08-16 stsp .It Fl v
347 827a167b 2022-08-16 stsp Verbose mode.
348 827a167b 2022-08-16 stsp Causes
349 827a167b 2022-08-16 stsp .Cm got clone
350 827a167b 2022-08-16 stsp to print debugging messages to standard error output.
351 827a167b 2022-08-16 stsp This option will be passed to
352 827a167b 2022-08-16 stsp .Xr ssh 1
353 827a167b 2022-08-16 stsp if applicable.
354 827a167b 2022-08-16 stsp Multiple -v options increase the verbosity.
355 827a167b 2022-08-16 stsp The maximum is 3.
356 2ab43947 2020-03-18 stsp .El
357 95f394e8 2021-10-04 kn .Tg fe
358 5fc4f020 2022-08-30 op .It Xo
359 5fc4f020 2022-08-30 op .Cm fetch
360 5fc4f020 2022-08-30 op .Op Fl adlqtvX
361 5fc4f020 2022-08-30 op .Op Fl b Ar branch
362 5fc4f020 2022-08-30 op .Op Fl R Ar reference
363 5fc4f020 2022-08-30 op .Op Fl r Ar repository-path
364 5fc4f020 2022-08-30 op .Op Ar remote-repository
365 5fc4f020 2022-08-30 op .Xc
366 4683a10b 2021-11-04 kn .Dl Pq alias: Cm fe
367 7848a0e1 2020-03-19 stsp Fetch new changes from a remote repository.
368 7848a0e1 2020-03-19 stsp If no
369 4ba14133 2020-03-20 stsp .Ar remote-repository
370 4ba14133 2020-03-20 stsp is specified,
371 7848a0e1 2020-03-19 stsp .Dq origin
372 7848a0e1 2020-03-19 stsp will be used.
373 50b0790e 2020-09-11 stsp The remote repository's URL is obtained from the corresponding entry in
374 257add31 2020-09-09 stsp .Xr got.conf 5
375 50b0790e 2020-09-11 stsp or Git's
376 7848a0e1 2020-03-19 stsp .Pa config
377 f8ab0c60 2020-03-20 stsp file of the local repository, as created by
378 7848a0e1 2020-03-19 stsp .Cm got clone .
379 7848a0e1 2020-03-19 stsp .Pp
380 ccbbf026 2023-02-06 stsp By default, any branches configured in
381 ccbbf026 2023-02-06 stsp .Xr got.conf 5
382 ccbbf026 2023-02-06 stsp for the
383 4bff57b4 2023-02-14 stsp .Ar remote-repository
384 ccbbf026 2023-02-06 stsp will be fetched.
385 ccbbf026 2023-02-06 stsp If
386 ccbbf026 2023-02-06 stsp .Cm got fetch
387 ccbbf026 2023-02-06 stsp is invoked in a work tree then this work tree's current branch will be
388 ccbbf026 2023-02-06 stsp fetched, too, provided it is present on the server.
389 4bff57b4 2023-02-14 stsp If no branches to fetch can be found in
390 4bff57b4 2023-02-14 stsp .Xr got.conf 5
391 4bff57b4 2023-02-14 stsp or via a work tree, or said branches are not found on the server, a branch
392 4bff57b4 2023-02-14 stsp resolved via the remote repository's HEAD reference will be fetched.
393 118a625d 2023-02-18 mark Likewise, if a HEAD reference for the
394 118a625d 2023-02-18 mark .Ar remote-repository
395 118a625d 2023-02-18 mark exists but its target no longer matches the remote HEAD, then
396 118a625d 2023-02-18 mark the new target branch will be fetched.
397 ccbbf026 2023-02-06 stsp This default behaviour can be overridden with the
398 ccbbf026 2023-02-06 stsp .Fl a
399 ccbbf026 2023-02-06 stsp and
400 ccbbf026 2023-02-06 stsp .Fl b
401 ccbbf026 2023-02-06 stsp options.
402 ccbbf026 2023-02-06 stsp .Pp
403 89c3c67b 2020-03-20 stsp New changes will be stored in a separate pack file downloaded from the server.
404 89c3c67b 2020-03-20 stsp Optionally, separate pack files stored in the repository can be combined with
405 89c3c67b 2020-03-20 stsp .Xr git-repack 1 .
406 89c3c67b 2020-03-20 stsp .Pp
407 498ef124 2020-03-21 stsp By default, branch references in the
408 7848a0e1 2020-03-19 stsp .Dq refs/remotes/
409 498ef124 2020-03-21 stsp reference namespace will be updated to point at the newly fetched commits.
410 498ef124 2020-03-21 stsp The
411 498ef124 2020-03-21 stsp .Cm got rebase
412 7b53188e 2023-07-03 stsp or
413 7b53188e 2023-07-03 stsp .Cm got merge
414 bd81cfb7 2020-04-19 stsp command can then be used to make new changes visible on branches in the
415 7848a0e1 2020-03-19 stsp .Dq refs/heads/
416 bd81cfb7 2020-04-19 stsp namespace, merging incoming changes with the changes on those branches
417 bd81cfb7 2020-04-19 stsp as necessary.
418 7848a0e1 2020-03-19 stsp .Pp
419 498ef124 2020-03-21 stsp If the repository was created as a mirror with
420 e38d4cde 2022-03-21 naddy .Cm got clone -m ,
421 498ef124 2020-03-21 stsp then all branches in the
422 469dd726 2020-03-20 stsp .Dq refs/heads/
423 498ef124 2020-03-21 stsp namespace will be updated directly to match the corresponding branches in
424 498ef124 2020-03-21 stsp the remote repository.
425 175367bd 2020-03-20 stsp If those branches contained local commits, these commits will no longer be
426 175367bd 2020-03-20 stsp reachable via a reference and will therefore be at risk of being discarded
427 e6786710 2021-07-03 stsp by Git's garbage collector or
428 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
429 bd81cfb7 2020-04-19 stsp Maintaining custom changes in a mirror repository is therefore discouraged.
430 469dd726 2020-03-20 stsp .Pp
431 db6d8ad8 2020-03-21 stsp In any case, references in the
432 7848a0e1 2020-03-19 stsp .Dq refs/tags/
433 db6d8ad8 2020-03-21 stsp namespace will always be fetched and mapped directly to local references
434 db6d8ad8 2020-03-21 stsp in the same namespace.
435 7848a0e1 2020-03-19 stsp .Pp
436 7848a0e1 2020-03-19 stsp The options for
437 7848a0e1 2020-03-19 stsp .Cm got fetch
438 7848a0e1 2020-03-19 stsp are as follows:
439 7848a0e1 2020-03-19 stsp .Bl -tag -width Ds
440 659e7fbd 2020-03-20 stsp .It Fl a
441 1d4b192f 2020-03-21 stsp Fetch all branches from the remote repository's
442 1d4b192f 2020-03-21 stsp .Dq refs/heads/
443 1d4b192f 2020-03-21 stsp reference namespace.
444 0c8b29c5 2021-01-05 stsp This option can be enabled by default for specific repositories in
445 0c8b29c5 2021-01-05 stsp .Xr got.conf 5 .
446 4ba14133 2020-03-20 stsp Cannot be used together with the
447 4ba14133 2020-03-20 stsp .Fl b
448 4ba14133 2020-03-20 stsp option.
449 4ba14133 2020-03-20 stsp .It Fl b Ar branch
450 4ba14133 2020-03-20 stsp Fetch the specified
451 4ba14133 2020-03-20 stsp .Ar branch
452 1d4b192f 2020-03-21 stsp from the remote repository's
453 1d4b192f 2020-03-21 stsp .Dq refs/heads/
454 1d4b192f 2020-03-21 stsp reference namespace.
455 4ba14133 2020-03-20 stsp This option may be specified multiple times to build a list of branches
456 4ba14133 2020-03-20 stsp to fetch.
457 4ba14133 2020-03-20 stsp Cannot be used together with the
458 4ba14133 2020-03-20 stsp .Fl a
459 4ba14133 2020-03-20 stsp option.
460 f21ec2f0 2020-03-21 stsp .It Fl d
461 f21ec2f0 2020-03-21 stsp Delete branches and tags from the local repository which are no longer
462 f21ec2f0 2020-03-21 stsp present in the remote repository.
463 f21ec2f0 2020-03-21 stsp Only references are deleted.
464 239821eb 2020-03-21 stsp Any commit, tree, tag, and blob objects belonging to deleted branches or
465 f21ec2f0 2020-03-21 stsp tags remain in the repository and may be removed separately with
466 e6786710 2021-07-03 stsp Git's garbage collector or
467 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
468 41b0de12 2020-03-21 stsp .It Fl l
469 41b0de12 2020-03-21 stsp List branches and tags available for fetching from the remote repository
470 41b0de12 2020-03-21 stsp and exit immediately.
471 41b0de12 2020-03-21 stsp Cannot be used together with any of the other options except
472 612392ee 2021-01-05 stsp .Fl v ,
473 612392ee 2021-01-05 stsp .Fl q ,
474 41b0de12 2020-03-21 stsp and
475 41b0de12 2020-03-21 stsp .Fl r .
476 7848a0e1 2020-03-19 stsp .It Fl q
477 7848a0e1 2020-03-19 stsp Suppress progress reporting output.
478 7848a0e1 2020-03-19 stsp The same option will be passed to
479 7848a0e1 2020-03-19 stsp .Xr ssh 1
480 7848a0e1 2020-03-19 stsp if applicable.
481 0e4002ca 2020-03-21 stsp .It Fl R Ar reference
482 0e4002ca 2020-03-21 stsp In addition to the branches and tags that will be fetched, fetch an arbitrary
483 0e4002ca 2020-03-21 stsp .Ar reference
484 0e4002ca 2020-03-21 stsp from the remote repository's
485 0e4002ca 2020-03-21 stsp .Dq refs/
486 0e4002ca 2020-03-21 stsp namespace.
487 0e4002ca 2020-03-21 stsp This option may be specified multiple times to build a list of additional
488 0e4002ca 2020-03-21 stsp references to fetch.
489 71f12362 2020-03-21 stsp The specified
490 71f12362 2020-03-21 stsp .Ar reference
491 a18cccf9 2020-03-21 stsp may either be a path to a specific reference, or a reference namespace
492 71f12362 2020-03-21 stsp which will cause all references in this namespace to be fetched.
493 0e4002ca 2020-03-21 stsp .Pp
494 0e4002ca 2020-03-21 stsp Each reference will be mapped into the local repository's
495 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
496 0e4002ca 2020-03-21 stsp namespace, unless the local repository was created as a mirror with
497 a18cccf9 2020-03-21 stsp .Cm got clone -m
498 a18cccf9 2020-03-21 stsp in which case references will be mapped directly into the local repository's
499 a18cccf9 2020-03-21 stsp .Dq refs/
500 a18cccf9 2020-03-21 stsp namespace.
501 a18cccf9 2020-03-21 stsp .Pp
502 bd81cfb7 2020-04-19 stsp Once a reference has been fetched, a branch based on it can be created with
503 0e4002ca 2020-03-21 stsp .Cm got branch
504 0e4002ca 2020-03-21 stsp if needed.
505 0e4002ca 2020-03-21 stsp .Pp
506 0e4002ca 2020-03-21 stsp .Cm got fetch
507 0e4002ca 2020-03-21 stsp will refuse to fetch references from the remote repository's
508 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
509 0e4002ca 2020-03-21 stsp or
510 0e4002ca 2020-03-21 stsp .Dq refs/got/
511 0e4002ca 2020-03-21 stsp namespace.
512 827a167b 2022-08-16 stsp .It Fl r Ar repository-path
513 827a167b 2022-08-16 stsp Use the repository at the specified path.
514 827a167b 2022-08-16 stsp If not specified, assume the repository is located at or above the current
515 827a167b 2022-08-16 stsp working directory.
516 827a167b 2022-08-16 stsp If this directory is a
517 827a167b 2022-08-16 stsp .Nm
518 827a167b 2022-08-16 stsp work tree, use the repository path associated with this work tree.
519 827a167b 2022-08-16 stsp .It Fl t
520 827a167b 2022-08-16 stsp Allow existing references in the
521 827a167b 2022-08-16 stsp .Dq refs/tags
522 827a167b 2022-08-16 stsp namespace to be updated if they have changed on the server.
523 827a167b 2022-08-16 stsp If not specified, only new tag references will be created.
524 827a167b 2022-08-16 stsp .It Fl v
525 827a167b 2022-08-16 stsp Verbose mode.
526 827a167b 2022-08-16 stsp Causes
527 827a167b 2022-08-16 stsp .Cm got fetch
528 827a167b 2022-08-16 stsp to print debugging messages to standard error output.
529 827a167b 2022-08-16 stsp The same option will be passed to
530 827a167b 2022-08-16 stsp .Xr ssh 1
531 827a167b 2022-08-16 stsp if applicable.
532 827a167b 2022-08-16 stsp Multiple -v options increase the verbosity.
533 827a167b 2022-08-16 stsp The maximum is 3.
534 161728eb 2021-07-24 stsp .It Fl X
535 161728eb 2021-07-24 stsp Delete all references which correspond to a particular
536 161728eb 2021-07-24 stsp .Ar remote-repository
537 161728eb 2021-07-24 stsp instead of fetching new changes.
538 161728eb 2021-07-24 stsp This can be useful when a remote repository is being removed from
539 161728eb 2021-07-24 stsp .Xr got.conf 5 .
540 161728eb 2021-07-24 stsp .Pp
541 161728eb 2021-07-24 stsp With
542 161728eb 2021-07-24 stsp .Fl X ,
543 161728eb 2021-07-24 stsp the
544 161728eb 2021-07-24 stsp .Ar remote-repository
545 161728eb 2021-07-24 stsp argument is mandatory and no other options except
546 161728eb 2021-07-24 stsp .Fl r ,
547 161728eb 2021-07-24 stsp .Fl v ,
548 161728eb 2021-07-24 stsp and
549 161728eb 2021-07-24 stsp .Fl q
550 161728eb 2021-07-24 stsp are allowed.
551 161728eb 2021-07-24 stsp .Pp
552 161728eb 2021-07-24 stsp Only references are deleted.
553 161728eb 2021-07-24 stsp Any commit, tree, tag, and blob objects fetched from a remote repository
554 161728eb 2021-07-24 stsp will generally be stored in pack files and may be removed separately with
555 161728eb 2021-07-24 stsp .Xr git-repack 1
556 161728eb 2021-07-24 stsp and Git's garbage collector.
557 7848a0e1 2020-03-19 stsp .El
558 95f394e8 2021-10-04 kn .Tg co
559 5fc4f020 2022-08-30 op .It Xo
560 5fc4f020 2022-08-30 op .Cm checkout
561 124eeb84 2024-04-08 op .Op Fl \&Eq
562 5fc4f020 2022-08-30 op .Op Fl b Ar branch
563 5fc4f020 2022-08-30 op .Op Fl c Ar commit
564 5fc4f020 2022-08-30 op .Op Fl p Ar path-prefix
565 5fc4f020 2022-08-30 op .Ar repository-path
566 5fc4f020 2022-08-30 op .Op Ar work-tree-path
567 5fc4f020 2022-08-30 op .Xc
568 4683a10b 2021-11-04 kn .Dl Pq alias: Cm co
569 0bb8a95e 2018-03-12 stsp Copy files from a repository into a new work tree.
570 bb51a5b4 2020-01-13 stsp Show the status of each affected file, using the following status codes:
571 bb51a5b4 2020-01-13 stsp .Bl -column YXZ description
572 bb51a5b4 2020-01-13 stsp .It A Ta new file was added
573 bb51a5b4 2020-01-13 stsp .It E Ta file already exists in work tree's meta-data
574 bb51a5b4 2020-01-13 stsp .El
575 bb51a5b4 2020-01-13 stsp .Pp
576 5d7c1dab 2018-04-01 stsp If the
577 5d7c1dab 2018-04-01 stsp .Ar work tree path
578 c844a238 2019-02-06 stsp is not specified, either use the last component of
579 5d7c1dab 2018-04-01 stsp .Ar repository path ,
580 5d7c1dab 2018-04-01 stsp or if a
581 5d7c1dab 2018-04-01 stsp .Ar path prefix
582 c844a238 2019-02-06 stsp was specified use the last component of
583 5d7c1dab 2018-04-01 stsp .Ar path prefix .
584 38e11793 2018-06-13 stsp .Pp
585 38e11793 2018-06-13 stsp The options for
586 38e11793 2018-06-13 stsp .Cm got checkout
587 38e11793 2018-06-13 stsp are as follows:
588 38e11793 2018-06-13 stsp .Bl -tag -width Ds
589 08573d5b 2019-05-14 stsp .It Fl b Ar branch
590 3c575567 2019-07-28 stsp Check out files from a commit on the specified
591 08573d5b 2019-05-14 stsp .Ar branch .
592 08573d5b 2019-05-14 stsp If this option is not specified, a branch resolved via the repository's HEAD
593 08573d5b 2019-05-14 stsp reference will be used.
594 8069f636 2019-01-12 stsp .It Fl c Ar commit
595 8069f636 2019-01-12 stsp Check out files from the specified
596 3c575567 2019-07-28 stsp .Ar commit
597 3c575567 2019-07-28 stsp on the selected branch.
598 10d73284 2023-07-18 stsp If this option is not specified, the most recent commit on the selected
599 10d73284 2023-07-18 stsp branch will be used.
600 10d73284 2023-07-18 stsp .Pp
601 10d73284 2023-07-18 stsp The expected
602 10d73284 2023-07-18 stsp .Ar commit
603 6b483b31 2023-07-18 stsp argument is a commit ID SHA1 hash, or a reference name or a keyword
604 6b483b31 2023-07-18 stsp which will be resolved to a commit ID.
605 0e1b0230 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
606 0e1b0230 2019-07-07 stsp automatically, provided the abbreviation is unique.
607 6b483b31 2023-07-18 stsp The keywords
608 c8d1a97c 2023-07-17 mark .Qq :base
609 c8d1a97c 2023-07-17 mark and
610 c8d1a97c 2023-07-17 mark .Qq :head
611 6b483b31 2023-07-18 stsp resolve to the repository's HEAD reference, or, if the
612 c8d1a97c 2023-07-17 mark .Fl b
613 c8d1a97c 2023-07-17 mark option is used, the head of the checked-out
614 c8d1a97c 2023-07-17 mark .Ar branch .
615 c8d1a97c 2023-07-17 mark Keywords and reference names may be appended with
616 c8d1a97c 2023-07-17 mark .Qq :+
617 c8d1a97c 2023-07-17 mark or
618 c8d1a97c 2023-07-17 mark .Qq :-
619 c8d1a97c 2023-07-17 mark modifiers and an optional integer N to denote the
620 c8d1a97c 2023-07-17 mark Nth descendant or antecedent by first parent traversal, respectively;
621 c8d1a97c 2023-07-17 mark for example,
622 c8d1a97c 2023-07-17 mark .Sy :head:-2
623 c8d1a97c 2023-07-17 mark denotes the work tree branch head's 2nd generation ancestor, and
624 c8d1a97c 2023-07-17 mark .Sy foo:-3
625 c8d1a97c 2023-07-17 mark will denote the 3rd generation ancestor of the commit resolved by the
626 c8d1a97c 2023-07-17 mark .Qq foo
627 c8d1a97c 2023-07-17 mark reference.
628 c8d1a97c 2023-07-17 mark If an integer does not follow the
629 c8d1a97c 2023-07-17 mark .Qq :+
630 c8d1a97c 2023-07-17 mark or
631 c8d1a97c 2023-07-17 mark .Qq :-
632 c8d1a97c 2023-07-17 mark modifier, a
633 c8d1a97c 2023-07-17 mark .Qq 1
634 c8d1a97c 2023-07-17 mark is implicitly appended
635 c8d1a97c 2023-07-17 mark .Po e.g.,
636 c8d1a97c 2023-07-17 mark .Sy :head:-
637 c8d1a97c 2023-07-17 mark is equivalent to
638 c8d1a97c 2023-07-17 mark .Sy :head:-1
639 c8d1a97c 2023-07-17 mark .Pc .
640 4b6c9460 2020-03-05 stsp .Pp
641 4b6c9460 2020-03-05 stsp If the specified
642 4b6c9460 2020-03-05 stsp .Ar commit
643 4b6c9460 2020-03-05 stsp is not contained in the selected branch, a different branch which contains
644 4b6c9460 2020-03-05 stsp this commit must be specified with the
645 4b6c9460 2020-03-05 stsp .Fl b
646 4b6c9460 2020-03-05 stsp option.
647 e38d4cde 2022-03-21 naddy If no such branch is known, a new branch must be created for this
648 4b6c9460 2020-03-05 stsp commit with
649 4b6c9460 2020-03-05 stsp .Cm got branch
650 4b6c9460 2020-03-05 stsp before
651 4b6c9460 2020-03-05 stsp .Cm got checkout
652 4b6c9460 2020-03-05 stsp can be used.
653 4b6c9460 2020-03-05 stsp Checking out work trees with an unknown branch is intentionally not supported.
654 827a167b 2022-08-16 stsp .It Fl E
655 827a167b 2022-08-16 stsp Proceed with the checkout operation even if the directory at
656 827a167b 2022-08-16 stsp .Ar work-tree-path
657 827a167b 2022-08-16 stsp is not empty.
658 827a167b 2022-08-16 stsp Existing files will be left intact.
659 38e11793 2018-06-13 stsp .It Fl p Ar path-prefix
660 38e11793 2018-06-13 stsp Restrict the work tree to a subset of the repository's tree hierarchy.
661 38e11793 2018-06-13 stsp Only files beneath the specified
662 38e11793 2018-06-13 stsp .Ar path-prefix
663 38e11793 2018-06-13 stsp will be checked out.
664 4ad4a1ec 2021-09-13 tracey .It Fl q
665 4ad4a1ec 2021-09-13 tracey Silence progress output.
666 38e11793 2018-06-13 stsp .El
667 95f394e8 2021-10-04 kn .Tg up
668 5fc4f020 2022-08-30 op .It Xo
669 5fc4f020 2022-08-30 op .Cm update
670 5fc4f020 2022-08-30 op .Op Fl q
671 5fc4f020 2022-08-30 op .Op Fl b Ar branch
672 5fc4f020 2022-08-30 op .Op Fl c Ar commit
673 5fc4f020 2022-08-30 op .Op Ar path ...
674 5fc4f020 2022-08-30 op .Xc
675 4683a10b 2021-11-04 kn .Dl Pq alias: Cm up
676 4f331d3a 2020-04-01 stsp Update an existing work tree to a different
677 4f331d3a 2020-04-01 stsp .Ar commit .
678 4f331d3a 2020-04-01 stsp Change existing files in the work tree as necessary to match file contents
679 4f331d3a 2020-04-01 stsp of this commit.
680 4f331d3a 2020-04-01 stsp Preserve any local changes in the work tree and merge them with the
681 4f331d3a 2020-04-01 stsp incoming changes.
682 4f331d3a 2020-04-01 stsp .Pp
683 5036ab18 2020-04-18 stsp Files which already contain merge conflicts will not be updated to avoid
684 5036ab18 2020-04-18 stsp further complications.
685 5036ab18 2020-04-18 stsp Such files will be updated when
686 5036ab18 2020-04-18 stsp .Cm got update
687 5036ab18 2020-04-18 stsp is run again after merge conflicts have been resolved.
688 e38d4cde 2022-03-21 naddy If the conflicting changes are no longer needed, affected files can be
689 5036ab18 2020-04-18 stsp reverted with
690 5036ab18 2020-04-18 stsp .Cm got revert
691 5036ab18 2020-04-18 stsp before running
692 5036ab18 2020-04-18 stsp .Cm got update
693 5036ab18 2020-04-18 stsp again.
694 5036ab18 2020-04-18 stsp .Pp
695 7f838b36 2019-02-08 stsp Show the status of each affected file, using the following status codes:
696 7f838b36 2019-02-08 stsp .Bl -column YXZ description
697 7f838b36 2019-02-08 stsp .It U Ta file was updated and contained no local changes
698 7f838b36 2019-02-08 stsp .It G Ta file was updated and local changes were merged cleanly
699 7f838b36 2019-02-08 stsp .It C Ta file was updated and conflicts occurred during merge
700 7f838b36 2019-02-08 stsp .It D Ta file was deleted
701 07fa9365 2023-03-10 stsp .It d Ta file's deletion was prevented by local modifications
702 7f838b36 2019-02-08 stsp .It A Ta new file was added
703 1dd86744 2019-08-12 anthony .It \(a~ Ta versioned file is obstructed by a non-regular file
704 a378724f 2019-02-10 stsp .It ! Ta a missing versioned file was restored
705 5036ab18 2020-04-18 stsp .It # Ta file was not updated because it contains merge conflicts
706 3b9f0f87 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
707 7f838b36 2019-02-08 stsp .El
708 7f838b36 2019-02-08 stsp .Pp
709 f2ea84fa 2019-07-27 stsp If no
710 c4cdcb68 2019-04-03 stsp .Ar path
711 f2ea84fa 2019-07-27 stsp is specified, update the entire work tree.
712 f2ea84fa 2019-07-27 stsp Otherwise, restrict the update operation to files at or within the
713 f2ea84fa 2019-07-27 stsp specified paths.
714 f2ea84fa 2019-07-27 stsp Each path is required to exist in the update operation's target commit.
715 f2ea84fa 2019-07-27 stsp Files in the work tree outside specified paths will remain unchanged and
716 f2ea84fa 2019-07-27 stsp will retain their previously recorded base commit.
717 f2cf8fbb 2019-04-04 stsp Some
718 f2cf8fbb 2019-04-04 stsp .Nm
719 f2cf8fbb 2019-04-04 stsp commands may refuse to run while the work tree contains files from
720 c4cdcb68 2019-04-03 stsp multiple base commits.
721 f2cf8fbb 2019-04-04 stsp The base commit of such a work tree can be made consistent by running
722 47ec7be7 2019-05-12 stsp .Cm got update
723 47ec7be7 2019-05-12 stsp across the entire work tree.
724 024e9686 2019-05-14 stsp Specifying a
725 024e9686 2019-05-14 stsp .Ar path
726 024e9686 2019-05-14 stsp is incompatible with the
727 024e9686 2019-05-14 stsp .Fl b
728 024e9686 2019-05-14 stsp option.
729 7f838b36 2019-02-08 stsp .Pp
730 4ed9f614 2019-08-04 stsp .Cm got update
731 4ed9f614 2019-08-04 stsp cannot update paths with staged changes.
732 4ed9f614 2019-08-04 stsp If changes have been staged with
733 4ed9f614 2019-08-04 stsp .Cm got stage ,
734 bc3056e3 2019-08-18 stsp these changes must first be committed with
735 4ed9f614 2019-08-04 stsp .Cm got commit
736 4ed9f614 2019-08-04 stsp or unstaged with
737 4ed9f614 2019-08-04 stsp .Cm got unstage .
738 4ed9f614 2019-08-04 stsp .Pp
739 507dc3bb 2018-12-29 stsp The options for
740 507dc3bb 2018-12-29 stsp .Cm got update
741 507dc3bb 2018-12-29 stsp are as follows:
742 507dc3bb 2018-12-29 stsp .Bl -tag -width Ds
743 024e9686 2019-05-14 stsp .It Fl b Ar branch
744 024e9686 2019-05-14 stsp Switch the work tree's branch reference to the specified
745 024e9686 2019-05-14 stsp .Ar branch
746 024e9686 2019-05-14 stsp before updating the work tree.
747 024e9686 2019-05-14 stsp This option requires that all paths in the work tree are updated.
748 4f331d3a 2020-04-01 stsp .Pp
749 4f331d3a 2020-04-01 stsp As usual, any local changes in the work tree will be preserved.
750 4f331d3a 2020-04-01 stsp This can be useful when switching to a newly created branch in order
751 4f331d3a 2020-04-01 stsp to commit existing local changes to this branch.
752 4f331d3a 2020-04-01 stsp .Pp
753 4f331d3a 2020-04-01 stsp Any local changes must be dealt with separately in order to obtain a
754 4f331d3a 2020-04-01 stsp work tree with pristine file contents corresponding exactly to the specified
755 4f331d3a 2020-04-01 stsp .Ar branch .
756 4f331d3a 2020-04-01 stsp Such changes could first be committed to a different branch with
757 4f331d3a 2020-04-01 stsp .Cm got commit ,
758 4f331d3a 2020-04-01 stsp or could be discarded with
759 4f331d3a 2020-04-01 stsp .Cm got revert .
760 507dc3bb 2018-12-29 stsp .It Fl c Ar commit
761 507dc3bb 2018-12-29 stsp Update the work tree to the specified
762 507dc3bb 2018-12-29 stsp .Ar commit .
763 10d73284 2023-07-18 stsp If this option is not specified, the most recent commit on the work tree's
764 10d73284 2023-07-18 stsp branch will be used.
765 10d73284 2023-07-18 stsp .Pp
766 10d73284 2023-07-18 stsp The expected
767 10d73284 2023-07-18 stsp .Ar commit
768 6b483b31 2023-07-18 stsp argument is a commit ID SHA1 hash, or a reference name or a keyword
769 6b483b31 2023-07-18 stsp which will be resolved to a commit ID.
770 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
771 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
772 6b483b31 2023-07-18 stsp The keywords
773 fd7552d2 2023-07-17 mark .Qq :base
774 fd7552d2 2023-07-17 mark and
775 fd7552d2 2023-07-17 mark .Qq :head
776 6b483b31 2023-07-18 stsp resolve to the work tree's base commit and branch head, respectively.
777 fd7552d2 2023-07-17 mark Keywords and reference names may be appended with
778 fd7552d2 2023-07-17 mark .Qq :+
779 fd7552d2 2023-07-17 mark or
780 fd7552d2 2023-07-17 mark .Qq :-
781 fd7552d2 2023-07-17 mark modifiers and an optional integer N to denote the
782 fd7552d2 2023-07-17 mark Nth descendant or antecedent, respectively, by first parent traversal;
783 fd7552d2 2023-07-17 mark for example,
784 fd7552d2 2023-07-17 mark .Sy :head:-2
785 e764eb5b 2023-07-17 stsp denotes the work tree branch head's 2nd generation ancestor, and
786 fd7552d2 2023-07-17 mark .Sy :base:+4
787 fd7552d2 2023-07-17 mark denotes the 4th generation descendant of the work tree's base commit.
788 fd7552d2 2023-07-17 mark Similarly,
789 fd7552d2 2023-07-17 mark .Sy foo:-3
790 fd7552d2 2023-07-17 mark will denote the 3rd generation ancestor of the commit resolved by the
791 fd7552d2 2023-07-17 mark .Qq foo
792 fd7552d2 2023-07-17 mark reference.
793 fd7552d2 2023-07-17 mark If an integer does not follow the
794 fd7552d2 2023-07-17 mark .Qq :+
795 fd7552d2 2023-07-17 mark or
796 fd7552d2 2023-07-17 mark .Qq :-
797 fd7552d2 2023-07-17 mark modifier, a
798 fd7552d2 2023-07-17 mark .Qq 1
799 fd7552d2 2023-07-17 mark is implicitly appended
800 fd7552d2 2023-07-17 mark .Po e.g.,
801 fd7552d2 2023-07-17 mark .Sy :head:-
802 fd7552d2 2023-07-17 mark is equivalent to
803 fd7552d2 2023-07-17 mark .Sy :head:-1
804 fd7552d2 2023-07-17 mark .Pc .
805 4ad4a1ec 2021-09-13 tracey .It Fl q
806 4ad4a1ec 2021-09-13 tracey Silence progress output.
807 507dc3bb 2018-12-29 stsp .El
808 95f394e8 2021-10-04 kn .Tg st
809 5fc4f020 2022-08-30 op .It Xo
810 5fc4f020 2022-08-30 op .Cm status
811 5fc4f020 2022-08-30 op .Op Fl I
812 5fc4f020 2022-08-30 op .Op Fl S Ar status-codes
813 5fc4f020 2022-08-30 op .Op Fl s Ar status-codes
814 5fc4f020 2022-08-30 op .Op Ar path ...
815 5fc4f020 2022-08-30 op .Xc
816 4683a10b 2021-11-04 kn .Dl Pq alias: Cm st
817 6cd959e6 2019-03-26 stsp Show the current modification status of files in a work tree,
818 6bad629b 2019-02-04 stsp using the following status codes:
819 6bad629b 2019-02-04 stsp .Bl -column YXZ description
820 6bad629b 2019-02-04 stsp .It M Ta modified file
821 079890a9 2019-03-26 stsp .It A Ta file scheduled for addition in next commit
822 079890a9 2019-03-26 stsp .It D Ta file scheduled for deletion in next commit
823 7154f6ce 2019-03-27 stsp .It C Ta modified or added file which contains merge conflicts
824 6bad629b 2019-02-04 stsp .It ! Ta versioned file was expected on disk but is missing
825 1dd86744 2019-08-12 anthony .It \(a~ Ta versioned file is obstructed by a non-regular file
826 6bad629b 2019-02-04 stsp .It ? Ta unversioned item not tracked by
827 6bad629b 2019-02-04 stsp .Nm
828 1ebedb77 2019-10-19 stsp .It m Ta modified file modes (executable bit only)
829 2a06fe5f 2019-08-24 stsp .It N Ta non-existent
830 2a06fe5f 2019-08-24 stsp .Ar path
831 2a06fe5f 2019-08-24 stsp specified on the command line
832 6bad629b 2019-02-04 stsp .El
833 6bad629b 2019-02-04 stsp .Pp
834 72ea6654 2019-07-27 stsp If no
835 927df6b7 2019-02-10 stsp .Ar path
836 72ea6654 2019-07-27 stsp is specified, show modifications in the entire work tree.
837 72ea6654 2019-07-27 stsp Otherwise, show modifications at or within the specified paths.
838 4ed9f614 2019-08-04 stsp .Pp
839 4ed9f614 2019-08-04 stsp If changes have been staged with
840 4ed9f614 2019-08-04 stsp .Cm got stage ,
841 4ed9f614 2019-08-04 stsp staged changes are shown in the second output column, using the following
842 4ed9f614 2019-08-04 stsp status codes:
843 4ed9f614 2019-08-04 stsp .Bl -column YXZ description
844 4ed9f614 2019-08-04 stsp .It M Ta file modification is staged
845 4ed9f614 2019-08-04 stsp .It A Ta file addition is staged
846 4ed9f614 2019-08-04 stsp .It D Ta file deletion is staged
847 4ed9f614 2019-08-04 stsp .El
848 4ed9f614 2019-08-04 stsp .Pp
849 95ac67f0 2019-08-08 stsp Changes created on top of staged changes are indicated in the first column:
850 4ed9f614 2019-08-04 stsp .Bl -column YXZ description
851 95ac67f0 2019-08-08 stsp .It MM Ta file was modified after earlier changes have been staged
852 95ac67f0 2019-08-08 stsp .It MA Ta file was modified after having been staged for addition
853 4ed9f614 2019-08-04 stsp .El
854 f4ab0e57 2024-03-28 stsp .Pp
855 f4ab0e57 2024-03-28 stsp If the work tree contains the results of an interrupted
856 f4ab0e57 2024-03-28 stsp .Cm got rebase ,
857 a4656c38 2024-03-28 stsp .Cm got histedit ,
858 a4656c38 2024-03-28 stsp or
859 f4ab0e57 2024-03-28 stsp .Cm got merge
860 f4ab0e57 2024-03-28 stsp operation then display a message which shows the branches involved.
861 6841da00 2019-08-08 stsp .Pp
862 081470ac 2020-08-13 stsp The options for
863 081470ac 2020-08-13 stsp .Cm got status
864 081470ac 2020-08-13 stsp are as follows:
865 081470ac 2020-08-13 stsp .Bl -tag -width Ds
866 f6343036 2021-06-22 stsp .It Fl I
867 f6343036 2021-06-22 stsp Show unversioned files even if they match an ignore pattern.
868 827a167b 2022-08-16 stsp .It Fl S Ar status-codes
869 827a167b 2022-08-16 stsp Suppress the output of files with a modification status matching any of the
870 00357e4d 2021-09-14 tracey single-character status codes contained in the
871 00357e4d 2021-09-14 tracey .Ar status-codes
872 00357e4d 2021-09-14 tracey argument.
873 00357e4d 2021-09-14 tracey Any combination of codes from the above list of possible status codes
874 00357e4d 2021-09-14 tracey may be specified.
875 00357e4d 2021-09-14 tracey For staged files, status codes displayed in either column will be matched.
876 b043307b 2021-09-14 stsp Cannot be used together with the
877 827a167b 2022-08-16 stsp .Fl s
878 b043307b 2021-09-14 stsp option.
879 827a167b 2022-08-16 stsp .It Fl s Ar status-codes
880 827a167b 2022-08-16 stsp Only show files with a modification status matching any of the
881 081470ac 2020-08-13 stsp single-character status codes contained in the
882 081470ac 2020-08-13 stsp .Ar status-codes
883 081470ac 2020-08-13 stsp argument.
884 081470ac 2020-08-13 stsp Any combination of codes from the above list of possible status codes
885 081470ac 2020-08-13 stsp may be specified.
886 081470ac 2020-08-13 stsp For staged files, status codes displayed in either column will be matched.
887 b043307b 2021-09-14 stsp Cannot be used together with the
888 827a167b 2022-08-16 stsp .Fl S
889 b043307b 2021-09-14 stsp option.
890 081470ac 2020-08-13 stsp .El
891 081470ac 2020-08-13 stsp .Pp
892 6841da00 2019-08-08 stsp For compatibility with
893 bd8de430 2019-10-04 stsp .Xr cvs 1
894 bd8de430 2019-10-04 stsp and
895 bd8de430 2019-10-04 stsp .Xr git 1 ,
896 6841da00 2019-08-08 stsp .Cm got status
897 bd8de430 2019-10-04 stsp reads
898 bd8de430 2019-10-04 stsp .Xr glob 7
899 bd8de430 2019-10-04 stsp patterns from
900 6841da00 2019-08-08 stsp .Pa .cvsignore
901 bd8de430 2019-10-04 stsp and
902 bd8de430 2019-10-04 stsp .Pa .gitignore
903 6841da00 2019-08-08 stsp files in each traversed directory and will not display unversioned files
904 bd8de430 2019-10-04 stsp which match these patterns.
905 249b637c 2023-02-20 stsp Ignore patterns which end with a slash,
906 249b637c 2023-02-20 stsp .Dq / ,
907 249b637c 2023-02-20 stsp will only match directories.
908 bd8de430 2019-10-04 stsp As an extension to
909 6841da00 2019-08-08 stsp .Xr glob 7
910 bd8de430 2019-10-04 stsp matching rules,
911 bd8de430 2019-10-04 stsp .Cm got status
912 bd8de430 2019-10-04 stsp supports consecutive asterisks,
913 bd8de430 2019-10-04 stsp .Dq ** ,
914 bd8de430 2019-10-04 stsp which will match an arbitrary amount of directories.
915 6841da00 2019-08-08 stsp Unlike
916 6841da00 2019-08-08 stsp .Xr cvs 1 ,
917 6841da00 2019-08-08 stsp .Cm got status
918 6841da00 2019-08-08 stsp only supports a single ignore pattern per line.
919 bd8de430 2019-10-04 stsp Unlike
920 bd8de430 2019-10-04 stsp .Xr git 1 ,
921 bd8de430 2019-10-04 stsp .Cm got status
922 bd8de430 2019-10-04 stsp does not support negated ignore patterns prefixed with
923 bd8de430 2019-10-04 stsp .Dq \&! ,
924 bd8de430 2019-10-04 stsp and gives no special significance to the location of path component separators,
925 bd8de430 2019-10-04 stsp .Dq / ,
926 bd8de430 2019-10-04 stsp in a pattern.
927 5fc4f020 2022-08-30 op .It Xo
928 5fc4f020 2022-08-30 op .Cm log
929 83e5e9a1 2024-03-27 stsp .Op Fl bdPpRst
930 5fc4f020 2022-08-30 op .Op Fl C Ar number
931 5fc4f020 2022-08-30 op .Op Fl c Ar commit
932 5fc4f020 2022-08-30 op .Op Fl l Ar N
933 5fc4f020 2022-08-30 op .Op Fl r Ar repository-path
934 5fc4f020 2022-08-30 op .Op Fl S Ar search-pattern
935 5fc4f020 2022-08-30 op .Op Fl x Ar commit
936 5fc4f020 2022-08-30 op .Op Ar path
937 5fc4f020 2022-08-30 op .Xc
938 38e11793 2018-06-13 stsp Display history of a repository.
939 04ca23f4 2018-07-16 stsp If a
940 04ca23f4 2018-07-16 stsp .Ar path
941 04ca23f4 2018-07-16 stsp is specified, show only commits which modified this path.
942 dc990cbf 2020-02-22 stsp If invoked in a work tree, the
943 dc990cbf 2020-02-22 stsp .Ar path
944 dc990cbf 2020-02-22 stsp is interpreted relative to the current working directory,
945 dc990cbf 2020-02-22 stsp and the work tree's path prefix is implicitly prepended.
946 dc990cbf 2020-02-22 stsp Otherwise, the path is interpreted relative to the repository root.
947 38e11793 2018-06-13 stsp .Pp
948 38e11793 2018-06-13 stsp The options for
949 38e11793 2018-06-13 stsp .Cm got log
950 38e11793 2018-06-13 stsp are as follows:
951 38e11793 2018-06-13 stsp .Bl -tag -width Ds
952 48c8c60d 2020-01-27 stsp .It Fl b
953 1137e0ae 2020-01-27 stsp Display individual commits which were merged into the current branch
954 1137e0ae 2020-01-27 stsp from other branches.
955 48c8c60d 2020-01-27 stsp By default,
956 48c8c60d 2020-01-27 stsp .Cm got log
957 48c8c60d 2020-01-27 stsp shows the linear history of the current branch only.
958 827a167b 2022-08-16 stsp .It Fl C Ar number
959 827a167b 2022-08-16 stsp Set the number of context lines shown in diffs with
960 827a167b 2022-08-16 stsp .Fl p .
961 827a167b 2022-08-16 stsp By default, 3 lines of context are shown.
962 38e11793 2018-06-13 stsp .It Fl c Ar commit
963 38e11793 2018-06-13 stsp Start traversing history at the specified
964 38e11793 2018-06-13 stsp .Ar commit .
965 10d73284 2023-07-18 stsp If this option is not specified, default to the work tree's current branch
966 10d73284 2023-07-18 stsp if invoked in a work tree, or to the repository's HEAD reference.
967 10d73284 2023-07-18 stsp .Pp
968 10d73284 2023-07-18 stsp The expected
969 10d73284 2023-07-18 stsp .Ar commit
970 6b483b31 2023-07-18 stsp argument is a commit ID SHA1 hash, or a reference name or a keyword
971 6b483b31 2023-07-18 stsp which will be resolved to a commit ID.
972 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
973 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
974 6b483b31 2023-07-18 stsp The keywords
975 fd7552d2 2023-07-17 mark .Qq :base
976 fd7552d2 2023-07-17 mark and
977 fd7552d2 2023-07-17 mark .Qq :head
978 6b483b31 2023-07-18 stsp resolve to the work tree's base commit and branch head, respectively.
979 fd7552d2 2023-07-17 mark The former is only valid if invoked in a work tree, while the latter will
980 fd7552d2 2023-07-17 mark resolve to the tip of the work tree's current branch if invoked in a
981 fd7552d2 2023-07-17 mark work tree, otherwise it will resolve to the repository's HEAD reference.
982 fd7552d2 2023-07-17 mark Keywords and references may be appended with
983 fd7552d2 2023-07-17 mark .Qq :+
984 fd7552d2 2023-07-17 mark or
985 fd7552d2 2023-07-17 mark .Qq :-
986 fd7552d2 2023-07-17 mark modifiers and an optional integer N to denote the
987 fd7552d2 2023-07-17 mark Nth descendant or antecedent, respectively, by first parent traversal;
988 fd7552d2 2023-07-17 mark for example,
989 fd7552d2 2023-07-17 mark .Sy :head:-2
990 fd7552d2 2023-07-17 mark denotes the HEAD reference's 2nd generation ancestor, and
991 fd7552d2 2023-07-17 mark .Sy :base:+4
992 fd7552d2 2023-07-17 mark denotes the 4th generation descendant of the work tree's base commit.
993 fd7552d2 2023-07-17 mark Similarly,
994 fd7552d2 2023-07-17 mark .Sy bar:+3
995 fd7552d2 2023-07-17 mark will denote the 3rd generation descendant of the commit resolved by the
996 fd7552d2 2023-07-17 mark .Qq bar
997 fd7552d2 2023-07-17 mark reference.
998 fd7552d2 2023-07-17 mark A
999 fd7552d2 2023-07-17 mark .Qq :+
1000 fd7552d2 2023-07-17 mark or
1001 fd7552d2 2023-07-17 mark .Qq :-
1002 fd7552d2 2023-07-17 mark modifier without a trailing integer has an implicit
1003 fd7552d2 2023-07-17 mark .Qq 1
1004 fd7552d2 2023-07-17 mark appended
1005 fd7552d2 2023-07-17 mark .Po e.g.,
1006 fd7552d2 2023-07-17 mark .Sy :base:+
1007 fd7552d2 2023-07-17 mark is equivalent to
1008 fd7552d2 2023-07-17 mark .Sy :base:+1
1009 fd7552d2 2023-07-17 mark .Pc .
1010 5191b70b 2023-01-07 mark .It Fl d
1011 1f3405c9 2023-01-17 mark Display diffstat of changes introduced in each commit.
1012 5191b70b 2023-01-07 mark Cannot be used with the
1013 5191b70b 2023-01-07 mark .Fl s
1014 5191b70b 2023-01-07 mark option.
1015 123cba5a 2023-08-11 stsp Implies the
1016 123cba5a 2023-08-11 stsp .Fl P
1017 123cba5a 2023-08-11 stsp option (diffstat displays a list of changed paths).
1018 6238ee32 2018-06-13 stsp .It Fl l Ar N
1019 6238ee32 2018-06-13 stsp Limit history traversal to a given number of commits.
1020 b1ebc001 2019-08-13 stsp If this option is not specified, a default limit value of zero is used,
1021 b1ebc001 2019-08-13 stsp which is treated as an unbounded limit.
1022 b1ebc001 2019-08-13 stsp The
1023 b1ebc001 2019-08-13 stsp .Ev GOT_LOG_DEFAULT_LIMIT
1024 b1ebc001 2019-08-13 stsp environment variable may be set to change this default value.
1025 0208f208 2020-05-05 stsp .It Fl P
1026 0208f208 2020-05-05 stsp Display the list of file paths changed in each commit, using the following
1027 0208f208 2020-05-05 stsp status codes:
1028 0208f208 2020-05-05 stsp .Bl -column YXZ description
1029 0208f208 2020-05-05 stsp .It M Ta modified file
1030 0208f208 2020-05-05 stsp .It D Ta file was deleted
1031 0208f208 2020-05-05 stsp .It A Ta new file was added
1032 0208f208 2020-05-05 stsp .It m Ta modified file modes (executable bit only)
1033 0208f208 2020-05-05 stsp .El
1034 caea18c1 2022-06-08 stsp .Pp
1035 c1c775eb 2022-06-08 stsp Cannot be used with the
1036 c1c775eb 2022-06-08 stsp .Fl s
1037 c1c775eb 2022-06-08 stsp option.
1038 827a167b 2022-08-16 stsp .It Fl p
1039 827a167b 2022-08-16 stsp Display the patch of modifications made in each commit.
1040 827a167b 2022-08-16 stsp If a
1041 827a167b 2022-08-16 stsp .Ar path
1042 827a167b 2022-08-16 stsp is specified, only show the patch of modifications at or within this path.
1043 827a167b 2022-08-16 stsp Cannot be used with the
1044 827a167b 2022-08-16 stsp .Fl s
1045 c1c775eb 2022-06-08 stsp option.
1046 827a167b 2022-08-16 stsp .It Fl R
1047 827a167b 2022-08-16 stsp Determine a set of commits to display as usual, but display these commits
1048 827a167b 2022-08-16 stsp in reverse order.
1049 827a167b 2022-08-16 stsp .It Fl r Ar repository-path
1050 827a167b 2022-08-16 stsp Use the repository at the specified path.
1051 827a167b 2022-08-16 stsp If not specified, assume the repository is located at or above the current
1052 827a167b 2022-08-16 stsp working directory.
1053 827a167b 2022-08-16 stsp If this directory is a
1054 827a167b 2022-08-16 stsp .Nm
1055 827a167b 2022-08-16 stsp work tree, use the repository path associated with this work tree.
1056 c1c775eb 2022-06-08 stsp .It Fl S Ar search-pattern
1057 793b9394 2022-06-12 op If specified, show only commits with a log message, author name,
1058 793b9394 2022-06-12 op committer name, or ID SHA1 hash matched by the extended regular
1059 793b9394 2022-06-12 op expression
1060 6841bf13 2019-11-29 kn .Ar search-pattern .
1061 3ef807ee 2022-06-08 stsp Lines in committed patches will be matched if
1062 3ef807ee 2022-06-08 stsp .Fl p
1063 3ef807ee 2022-06-08 stsp is specified.
1064 3ef807ee 2022-06-08 stsp File paths changed by a commit will be matched if
1065 3ef807ee 2022-06-08 stsp .Fl P
1066 3ef807ee 2022-06-08 stsp is specified.
1067 6841bf13 2019-11-29 kn Regular expression syntax is documented in
1068 6841bf13 2019-11-29 kn .Xr re_format 7 .
1069 827a167b 2022-08-16 stsp .It Fl s
1070 827a167b 2022-08-16 stsp Display a short one-line summary of each commit, instead of the default
1071 827a167b 2022-08-16 stsp history format.
1072 827a167b 2022-08-16 stsp Cannot be used together with the
1073 827a167b 2022-08-16 stsp .Fl p
1074 827a167b 2022-08-16 stsp or
1075 827a167b 2022-08-16 stsp .Fl P
1076 827a167b 2022-08-16 stsp option.
1077 83e5e9a1 2024-03-27 stsp .It Fl t
1078 83e5e9a1 2024-03-27 stsp Display commits in topological order.
1079 83e5e9a1 2024-03-27 stsp This option has no effect without the
1080 a397e3fb 2024-03-28 op .Fl b
1081 83e5e9a1 2024-03-27 stsp option because a linear history is sorted in topological order by definition.
1082 83e5e9a1 2024-03-27 stsp Topological sorting is disabled by default because the present implementation
1083 83e5e9a1 2024-03-27 stsp requires that commit history is fully traversed before any output can be shown.
1084 d1fe46f9 2020-04-18 stsp .It Fl x Ar commit
1085 4e20a648 2021-03-21 jrick Stop traversing commit history immediately after the specified
1086 d1fe46f9 2020-04-18 stsp .Ar commit
1087 52ab7958 2020-04-18 stsp has been traversed.
1088 93c250cd 2023-08-07 mark Like
1089 93c250cd 2023-08-07 mark .Fl c ,
1090 93c250cd 2023-08-07 mark the expected
1091 93c250cd 2023-08-07 mark .Ar commit
1092 93c250cd 2023-08-07 mark argument is a commit ID SHA1 hash, or a reference name or a keyword
1093 93c250cd 2023-08-07 mark which will be resolved to a commit ID.
1094 d1fe46f9 2020-04-18 stsp This option has no effect if the specified
1095 d1fe46f9 2020-04-18 stsp .Ar commit
1096 d1fe46f9 2020-04-18 stsp is never traversed.
1097 38e11793 2018-06-13 stsp .El
1098 95f394e8 2021-10-04 kn .Tg di
1099 5fc4f020 2022-08-30 op .It Xo
1100 5fc4f020 2022-08-30 op .Cm diff
1101 a76e88e5 2023-01-10 mark .Op Fl adPsw
1102 5fc4f020 2022-08-30 op .Op Fl C Ar number
1103 5fc4f020 2022-08-30 op .Op Fl c Ar commit
1104 5fc4f020 2022-08-30 op .Op Fl r Ar repository-path
1105 5fc4f020 2022-08-30 op .Op Ar object1 Ar object2 | Ar path ...
1106 5fc4f020 2022-08-30 op .Xc
1107 4683a10b 2021-11-04 kn .Dl Pq alias: Cm di
1108 e7ffb0b0 2021-10-07 stsp When invoked within a work tree without any arguments, display all
1109 bd81cfb7 2020-04-19 stsp local changes in the work tree.
1110 e7ffb0b0 2021-10-07 stsp If one or more
1111 927df6b7 2019-02-10 stsp .Ar path
1112 e7ffb0b0 2021-10-07 stsp arguments are specified, only show changes within the specified paths.
1113 927df6b7 2019-02-10 stsp .Pp
1114 d24820bf 2019-08-11 stsp If two arguments are provided, treat each argument as a reference, a tag
1115 d24820bf 2019-08-11 stsp name, or an object ID SHA1 hash, and display differences between the
1116 d24820bf 2019-08-11 stsp corresponding objects.
1117 3f8b7d6a 2018-04-01 stsp Both objects must be of the same type (blobs, trees, or commits).
1118 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1119 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
1120 e7ffb0b0 2021-10-07 stsp If none of these interpretations produce a valid result or if the
1121 e7ffb0b0 2021-10-07 stsp .Fl P
1122 e7ffb0b0 2021-10-07 stsp option is used,
1123 e7ffb0b0 2021-10-07 stsp and if
1124 e7ffb0b0 2021-10-07 stsp .Cm got diff
1125 e7ffb0b0 2021-10-07 stsp is running in a work tree, attempt to interpret the two arguments as paths.
1126 c0cc5c62 2018-10-18 stsp .Pp
1127 c0cc5c62 2018-10-18 stsp The options for
1128 c0cc5c62 2018-10-18 stsp .Cm got diff
1129 c0cc5c62 2018-10-18 stsp are as follows:
1130 c0cc5c62 2018-10-18 stsp .Bl -tag -width Ds
1131 64453f7e 2020-11-21 stsp .It Fl a
1132 64453f7e 2020-11-21 stsp Treat file contents as ASCII text even if binary data is detected.
1133 827a167b 2022-08-16 stsp .It Fl C Ar number
1134 827a167b 2022-08-16 stsp Set the number of context lines shown in the diff.
1135 827a167b 2022-08-16 stsp By default, 3 lines of context are shown.
1136 67b631c9 2021-10-10 stsp .It Fl c Ar commit
1137 67b631c9 2021-10-10 stsp Show differences between commits in the repository.
1138 827a167b 2022-08-16 stsp This option may be used up to two times.
1139 67b631c9 2021-10-10 stsp When used only once, show differences between the specified
1140 67b631c9 2021-10-10 stsp .Ar commit
1141 67b631c9 2021-10-10 stsp and its first parent commit.
1142 67b631c9 2021-10-10 stsp When used twice, show differences between the two specified commits.
1143 67b631c9 2021-10-10 stsp .Pp
1144 10d73284 2023-07-18 stsp If the
1145 10d73284 2023-07-18 stsp .Fl c
1146 10d73284 2023-07-18 stsp option is used, all non-option arguments will be interpreted as paths.
1147 10d73284 2023-07-18 stsp If one or more such
1148 10d73284 2023-07-18 stsp .Ar path
1149 10d73284 2023-07-18 stsp arguments are provided, only show differences for the specified paths.
1150 10d73284 2023-07-18 stsp .Pp
1151 10d73284 2023-07-18 stsp The expected
1152 10d73284 2023-07-18 stsp .Ar commit
1153 6b483b31 2023-07-18 stsp argument is a commit ID SHA1 hash, or a reference name or a keyword
1154 6b483b31 2023-07-18 stsp which will be resolved to a commit ID.
1155 67b631c9 2021-10-10 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1156 67b631c9 2021-10-10 stsp automatically, provided the abbreviation is unique.
1157 6b483b31 2023-07-18 stsp The keywords
1158 fd7552d2 2023-07-17 mark .Qq :base
1159 fd7552d2 2023-07-17 mark and
1160 fd7552d2 2023-07-17 mark .Qq :head
1161 6b483b31 2023-07-18 stsp resolve to the work tree's base commit and branch head, respectively.
1162 fd7552d2 2023-07-17 mark The former is only valid if invoked in a work tree, while the latter will
1163 fd7552d2 2023-07-17 mark resolve to the tip of the work tree's current branch if invoked in a
1164 fd7552d2 2023-07-17 mark work tree, otherwise it will resolve to the repository's HEAD reference.
1165 fd7552d2 2023-07-17 mark Keywords and references may be appended with
1166 fd7552d2 2023-07-17 mark .Qq :+
1167 fd7552d2 2023-07-17 mark or
1168 fd7552d2 2023-07-17 mark .Qq :-
1169 fd7552d2 2023-07-17 mark modifiers and an optional integer N to denote the
1170 fd7552d2 2023-07-17 mark Nth descendant or antecedent, respectively, by first parent traversal;
1171 fd7552d2 2023-07-17 mark for example,
1172 fd7552d2 2023-07-17 mark .Sy :head:-2
1173 fd7552d2 2023-07-17 mark denotes the HEAD reference's 2nd generation ancestor, and
1174 fd7552d2 2023-07-17 mark .Sy :base:+4
1175 fd7552d2 2023-07-17 mark denotes the 4th generation descendant of the work tree's base commit.
1176 fd7552d2 2023-07-17 mark Similarly,
1177 fd7552d2 2023-07-17 mark .Sy baz:+8
1178 fd7552d2 2023-07-17 mark will denote the 8th generation descendant of the commit resolved by the
1179 fd7552d2 2023-07-17 mark .Qq baz
1180 fd7552d2 2023-07-17 mark reference.
1181 fd7552d2 2023-07-17 mark If an integer does not follow the
1182 fd7552d2 2023-07-17 mark .Qq :+
1183 fd7552d2 2023-07-17 mark or
1184 fd7552d2 2023-07-17 mark .Qq :-
1185 fd7552d2 2023-07-17 mark modifier, a
1186 fd7552d2 2023-07-17 mark .Qq 1
1187 fd7552d2 2023-07-17 mark is implicitly appended
1188 fd7552d2 2023-07-17 mark .Po e.g.,
1189 fd7552d2 2023-07-17 mark .Sy :head:-
1190 fd7552d2 2023-07-17 mark is equivalent to
1191 fd7552d2 2023-07-17 mark .Sy :head:-1
1192 fd7552d2 2023-07-17 mark .Pc .
1193 67b631c9 2021-10-10 stsp .Pp
1194 67b631c9 2021-10-10 stsp Cannot be used together with the
1195 67b631c9 2021-10-10 stsp .Fl P
1196 67b631c9 2021-10-10 stsp option.
1197 a76e88e5 2023-01-10 mark .It Fl d
1198 a76e88e5 2023-01-10 mark Display diffstat of changes before the actual diff by annotating each file path
1199 a76e88e5 2023-01-10 mark or blob hash being diffed with the total number of lines added and removed.
1200 a76e88e5 2023-01-10 mark A summary line will display the total number of changes across all files.
1201 827a167b 2022-08-16 stsp .It Fl P
1202 827a167b 2022-08-16 stsp Interpret all arguments as paths only.
1203 827a167b 2022-08-16 stsp This option can be used to resolve ambiguity in cases where paths
1204 827a167b 2022-08-16 stsp look like tag names, reference names, or object IDs.
1205 827a167b 2022-08-16 stsp This option is only valid when
1206 827a167b 2022-08-16 stsp .Cm got diff
1207 827a167b 2022-08-16 stsp is invoked in a work tree.
1208 b72f483a 2019-02-05 stsp .It Fl r Ar repository-path
1209 b72f483a 2019-02-05 stsp Use the repository at the specified path.
1210 b72f483a 2019-02-05 stsp If not specified, assume the repository is located at or above the current
1211 b72f483a 2019-02-05 stsp working directory.
1212 b72f483a 2019-02-05 stsp If this directory is a
1213 b72f483a 2019-02-05 stsp .Nm
1214 b72f483a 2019-02-05 stsp work tree, use the repository path associated with this work tree.
1215 4ed9f614 2019-08-04 stsp .It Fl s
1216 4ed9f614 2019-08-04 stsp Show changes staged with
1217 4ed9f614 2019-08-04 stsp .Cm got stage
1218 bd81cfb7 2020-04-19 stsp instead of showing local changes in the work tree.
1219 e7ffb0b0 2021-10-07 stsp This option is only valid when
1220 e7ffb0b0 2021-10-07 stsp .Cm got diff
1221 e7ffb0b0 2021-10-07 stsp is invoked in a work tree.
1222 63035f9f 2019-10-06 stsp .It Fl w
1223 63035f9f 2019-10-06 stsp Ignore whitespace-only changes.
1224 c0cc5c62 2018-10-18 stsp .El
1225 95f394e8 2021-10-04 kn .Tg bl
1226 5fc4f020 2022-08-30 op .It Xo
1227 5fc4f020 2022-08-30 op .Cm blame
1228 5fc4f020 2022-08-30 op .Op Fl c Ar commit
1229 5fc4f020 2022-08-30 op .Op Fl r Ar repository-path
1230 5fc4f020 2022-08-30 op .Ar path
1231 5fc4f020 2022-08-30 op .Xc
1232 4683a10b 2021-11-04 kn .Dl Pq alias: Cm bl
1233 1ff8e573 2018-08-02 stsp Display line-by-line history of a file at the specified path.
1234 1ff8e573 2018-08-02 stsp .Pp
1235 1ff8e573 2018-08-02 stsp The options for
1236 1ff8e573 2018-08-02 stsp .Cm got blame
1237 1ff8e573 2018-08-02 stsp are as follows:
1238 1ff8e573 2018-08-02 stsp .Bl -tag -width Ds
1239 1ff8e573 2018-08-02 stsp .It Fl c Ar commit
1240 1ff8e573 2018-08-02 stsp Start traversing history at the specified
1241 1ff8e573 2018-08-02 stsp .Ar commit .
1242 fd220d9f 2023-07-18 stsp The expected argument is a commit ID SHA1 hash, or a reference name
1243 fd220d9f 2023-07-18 stsp or a keyword which will be resolved to a commit ID.
1244 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1245 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
1246 fd220d9f 2023-07-18 stsp The keywords
1247 4390d6c1 2023-07-18 mark .Qq :base
1248 4390d6c1 2023-07-18 mark and
1249 4390d6c1 2023-07-18 mark .Qq :head
1250 fd220d9f 2023-07-18 stsp resolve to the work tree's base commit and branch head, respectively.
1251 4390d6c1 2023-07-18 mark The former is only valid if invoked in a work tree, while the latter will
1252 4390d6c1 2023-07-18 mark resolve to the tip of the work tree's current branch if invoked in a
1253 4390d6c1 2023-07-18 mark work tree, otherwise it will resolve to the repository's HEAD reference.
1254 4390d6c1 2023-07-18 mark Keywords and references may be appended with
1255 4390d6c1 2023-07-18 mark .Qq :+
1256 4390d6c1 2023-07-18 mark or
1257 4390d6c1 2023-07-18 mark .Qq :-
1258 4390d6c1 2023-07-18 mark modifiers and an optional integer N to denote the
1259 4390d6c1 2023-07-18 mark Nth descendant or antecedent by first parent traversal, respectively;
1260 4390d6c1 2023-07-18 mark for example,
1261 4390d6c1 2023-07-18 mark .Sy :head:-2
1262 4390d6c1 2023-07-18 mark denotes the work tree branch head's 2nd generation ancestor, and
1263 4390d6c1 2023-07-18 mark .Sy :base:+4
1264 4390d6c1 2023-07-18 mark denotes the 4th generation descendant of the work tree's base commit.
1265 4390d6c1 2023-07-18 mark Similarly,
1266 4390d6c1 2023-07-18 mark .Sy xyz:-5
1267 4390d6c1 2023-07-18 mark will denote the 5th generation ancestor of the commit resolved by the
1268 4390d6c1 2023-07-18 mark .Qq xyz
1269 4390d6c1 2023-07-18 mark reference.
1270 4390d6c1 2023-07-18 mark A
1271 4390d6c1 2023-07-18 mark .Qq :+
1272 4390d6c1 2023-07-18 mark or
1273 4390d6c1 2023-07-18 mark .Qq :-
1274 4390d6c1 2023-07-18 mark modifier without a trailing integer has an implicit
1275 4390d6c1 2023-07-18 mark .Qq 1
1276 4390d6c1 2023-07-18 mark appended
1277 4390d6c1 2023-07-18 mark .Po e.g.,
1278 4390d6c1 2023-07-18 mark .Sy :base:+
1279 4390d6c1 2023-07-18 mark is equivalent to
1280 4390d6c1 2023-07-18 mark .Sy :base:+1
1281 4390d6c1 2023-07-18 mark .Pc .
1282 1ff8e573 2018-08-02 stsp .It Fl r Ar repository-path
1283 1ff8e573 2018-08-02 stsp Use the repository at the specified path.
1284 1ff8e573 2018-08-02 stsp If not specified, assume the repository is located at or above the current
1285 1ff8e573 2018-08-02 stsp working directory.
1286 0c06baac 2019-02-05 stsp If this directory is a
1287 0c06baac 2019-02-05 stsp .Nm
1288 0c06baac 2019-02-05 stsp work tree, use the repository path associated with this work tree.
1289 5c860e29 2018-03-12 stsp .El
1290 95f394e8 2021-10-04 kn .Tg tr
1291 5fc4f020 2022-08-30 op .It Xo
1292 5fc4f020 2022-08-30 op .Cm tree
1293 5fc4f020 2022-08-30 op .Op Fl iR
1294 5fc4f020 2022-08-30 op .Op Fl c Ar commit
1295 5fc4f020 2022-08-30 op .Op Fl r Ar repository-path
1296 5fc4f020 2022-08-30 op .Op Ar path
1297 5fc4f020 2022-08-30 op .Xc
1298 4683a10b 2021-11-04 kn .Dl Pq alias: Cm tr
1299 5de5890b 2018-10-18 stsp Display a listing of files and directories at the specified
1300 5de5890b 2018-10-18 stsp directory path in the repository.
1301 db0c2996 2019-02-10 stsp Entries shown in this listing may carry one of the following trailing
1302 db0c2996 2019-02-10 stsp annotations:
1303 db0c2996 2019-02-10 stsp .Bl -column YXZ description
1304 848d6979 2019-08-12 stsp .It @ Ta entry is a symbolic link
1305 db0c2996 2019-02-10 stsp .It / Ta entry is a directory
1306 db0c2996 2019-02-10 stsp .It * Ta entry is an executable file
1307 63c5ca5d 2019-08-24 stsp .It $ Ta entry is a Git submodule
1308 db0c2996 2019-02-10 stsp .El
1309 0d6c6ee3 2020-05-20 stsp .Pp
1310 0d6c6ee3 2020-05-20 stsp Symbolic link entries are also annotated with the target path of the link.
1311 db0c2996 2019-02-10 stsp .Pp
1312 0c849583 2019-02-05 stsp If no
1313 0c849583 2019-02-05 stsp .Ar path
1314 0c849583 2019-02-05 stsp is specified, list the repository path corresponding to the current
1315 0c849583 2019-02-05 stsp directory of the work tree, or the root directory of the repository
1316 0c849583 2019-02-05 stsp if there is no work tree.
1317 5de5890b 2018-10-18 stsp .Pp
1318 5de5890b 2018-10-18 stsp The options for
1319 5de5890b 2018-10-18 stsp .Cm got tree
1320 5de5890b 2018-10-18 stsp are as follows:
1321 5de5890b 2018-10-18 stsp .Bl -tag -width Ds
1322 5de5890b 2018-10-18 stsp .It Fl c Ar commit
1323 5de5890b 2018-10-18 stsp List files and directories as they appear in the specified
1324 5de5890b 2018-10-18 stsp .Ar commit .
1325 fd220d9f 2023-07-18 stsp .Pp
1326 fd220d9f 2023-07-18 stsp The expected argument is a commit ID SHA1 hash, or a reference name
1327 fd220d9f 2023-07-18 stsp or a keyword which will be resolved to a commit ID.
1328 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1329 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
1330 fd220d9f 2023-07-18 stsp The keywords
1331 4390d6c1 2023-07-18 mark .Qq :base
1332 4390d6c1 2023-07-18 mark and
1333 4390d6c1 2023-07-18 mark .Qq :head
1334 fd220d9f 2023-07-18 stsp resolve to the work tree's base commit and branch head, respectively.
1335 4390d6c1 2023-07-18 mark The former is only valid if invoked in a work tree, while the latter will
1336 4390d6c1 2023-07-18 mark resolve to the tip of the work tree's current branch if invoked in a
1337 4390d6c1 2023-07-18 mark work tree, otherwise it will resolve to the repository's HEAD reference.
1338 4390d6c1 2023-07-18 mark Keywords and references may be appended with
1339 4390d6c1 2023-07-18 mark .Qq :+
1340 4390d6c1 2023-07-18 mark or
1341 4390d6c1 2023-07-18 mark .Qq :-
1342 4390d6c1 2023-07-18 mark modifiers and an optional integer N to denote the
1343 4390d6c1 2023-07-18 mark Nth descendant or antecedent by first parent traversal, respectively;
1344 4390d6c1 2023-07-18 mark for example,
1345 4390d6c1 2023-07-18 mark .Sy :head:-2
1346 4390d6c1 2023-07-18 mark denotes the work tree branch head's 2nd generation ancestor, and
1347 4390d6c1 2023-07-18 mark .Sy :base:+4
1348 4390d6c1 2023-07-18 mark denotes the 4th generation descendant of the work tree's base commit.
1349 4390d6c1 2023-07-18 mark Similarly,
1350 4390d6c1 2023-07-18 mark .Sy spam:-3
1351 4390d6c1 2023-07-18 mark will denote the 3rd generation ancestor of the commit resolved by the
1352 4390d6c1 2023-07-18 mark .Qq spam
1353 4390d6c1 2023-07-18 mark reference.
1354 4390d6c1 2023-07-18 mark A
1355 4390d6c1 2023-07-18 mark .Qq :+
1356 4390d6c1 2023-07-18 mark or
1357 4390d6c1 2023-07-18 mark .Qq :-
1358 4390d6c1 2023-07-18 mark modifier without a trailing integer has an implicit
1359 4390d6c1 2023-07-18 mark .Qq 1
1360 4390d6c1 2023-07-18 mark appended
1361 4390d6c1 2023-07-18 mark .Po e.g.,
1362 4390d6c1 2023-07-18 mark .Sy :base:+
1363 4390d6c1 2023-07-18 mark is equivalent to
1364 4390d6c1 2023-07-18 mark .Sy :base:+1
1365 4390d6c1 2023-07-18 mark .Pc .
1366 827a167b 2022-08-16 stsp .It Fl i
1367 827a167b 2022-08-16 stsp Show object IDs of files (blob objects) and directories (tree objects).
1368 827a167b 2022-08-16 stsp .It Fl R
1369 827a167b 2022-08-16 stsp Recurse into sub-directories in the repository.
1370 5de5890b 2018-10-18 stsp .It Fl r Ar repository-path
1371 5de5890b 2018-10-18 stsp Use the repository at the specified path.
1372 5de5890b 2018-10-18 stsp If not specified, assume the repository is located at or above the current
1373 5de5890b 2018-10-18 stsp working directory.
1374 0c849583 2019-02-05 stsp If this directory is a
1375 0c849583 2019-02-05 stsp .Nm
1376 0c849583 2019-02-05 stsp work tree, use the repository path associated with this work tree.
1377 d0eebce4 2019-03-11 stsp .El
1378 5fc4f020 2022-08-30 op .It Xo
1379 5fc4f020 2022-08-30 op .Cm ref
1380 5fc4f020 2022-08-30 op .Op Fl dlt
1381 5e91dae4 2022-08-30 stsp .Op Fl c Ar object
1382 5fc4f020 2022-08-30 op .Op Fl r Ar repository-path
1383 5fc4f020 2022-08-30 op .Op Fl s Ar reference
1384 5fc4f020 2022-08-30 op .Op Ar name
1385 5fc4f020 2022-08-30 op .Xc
1386 d0eebce4 2019-03-11 stsp Manage references in a repository.
1387 d0eebce4 2019-03-11 stsp .Pp
1388 e31abbf2 2020-03-22 stsp References may be listed, created, deleted, and changed.
1389 e31abbf2 2020-03-22 stsp When creating, deleting, or changing a reference the specified
1390 e31abbf2 2020-03-22 stsp .Ar name
1391 e31abbf2 2020-03-22 stsp must be an absolute reference name, i.e. it must begin with
1392 f16e4044 2019-10-09 stsp .Dq refs/ .
1393 e31abbf2 2020-03-22 stsp .Pp
1394 d0eebce4 2019-03-11 stsp The options for
1395 d0eebce4 2019-03-11 stsp .Cm got ref
1396 d0eebce4 2019-03-11 stsp are as follows:
1397 d0eebce4 2019-03-11 stsp .Bl -tag -width Ds
1398 827a167b 2022-08-16 stsp .It Fl c Ar object
1399 827a167b 2022-08-16 stsp Create a reference or change an existing reference.
1400 827a167b 2022-08-16 stsp The reference with the specified
1401 827a167b 2022-08-16 stsp .Ar name
1402 827a167b 2022-08-16 stsp will point at the specified
1403 827a167b 2022-08-16 stsp .Ar object .
1404 4390d6c1 2023-07-18 mark .Pp
1405 827a167b 2022-08-16 stsp The expected
1406 827a167b 2022-08-16 stsp .Ar object
1407 4390d6c1 2023-07-18 mark argument is an ID SHA1 hash or an existing reference or tag name
1408 4390d6c1 2023-07-18 mark or a keyword which will be resolved to the ID of a corresponding commit,
1409 4390d6c1 2023-07-18 mark tree, tag, or blob object.
1410 4390d6c1 2023-07-18 mark An abbreviated hash argument will be expanded to a full SHA1 hash
1411 4390d6c1 2023-07-18 mark automatically, provided the abbreviation is unique.
1412 4390d6c1 2023-07-18 mark The keywords
1413 4390d6c1 2023-07-18 mark .Qq :base
1414 4390d6c1 2023-07-18 mark and
1415 4390d6c1 2023-07-18 mark .Qq :head
1416 4390d6c1 2023-07-18 mark resolve to the work tree's base commit and branch head, respectively.
1417 4390d6c1 2023-07-18 mark The former is only valid if invoked in a work tree, while the latter will
1418 4390d6c1 2023-07-18 mark resolve to the tip of the work tree's current branch if invoked in a
1419 4390d6c1 2023-07-18 mark work tree, otherwise it will resolve to the repository's HEAD reference.
1420 4390d6c1 2023-07-18 mark Keywords and reference names may be appended with
1421 4390d6c1 2023-07-18 mark .Qq :+
1422 4390d6c1 2023-07-18 mark or
1423 4390d6c1 2023-07-18 mark .Qq :-
1424 4390d6c1 2023-07-18 mark modifiers and an optional integer N to denote the
1425 4390d6c1 2023-07-18 mark Nth descendant or antecedent by first parent traversal, respectively;
1426 4390d6c1 2023-07-18 mark for example,
1427 4390d6c1 2023-07-18 mark .Sy :head:-2
1428 4390d6c1 2023-07-18 mark denotes the work tree branch head's 2nd generation ancestor, and
1429 4390d6c1 2023-07-18 mark .Sy tagged:-3
1430 4390d6c1 2023-07-18 mark will denote the 3rd generation ancestor of the commit resolved by the
1431 4390d6c1 2023-07-18 mark .Qq tagged
1432 4390d6c1 2023-07-18 mark reference.
1433 4390d6c1 2023-07-18 mark If an integer does not follow the
1434 4390d6c1 2023-07-18 mark .Qq :+
1435 4390d6c1 2023-07-18 mark or
1436 4390d6c1 2023-07-18 mark .Qq :-
1437 4390d6c1 2023-07-18 mark modifier, a
1438 4390d6c1 2023-07-18 mark .Qq 1
1439 4390d6c1 2023-07-18 mark is implicitly appended
1440 4390d6c1 2023-07-18 mark .Po e.g.,
1441 4390d6c1 2023-07-18 mark .Sy :head:-
1442 4390d6c1 2023-07-18 mark is equivalent to
1443 4390d6c1 2023-07-18 mark .Sy :head:-1
1444 4390d6c1 2023-07-18 mark .Pc .
1445 4390d6c1 2023-07-18 mark .Pp
1446 827a167b 2022-08-16 stsp Cannot be used together with any other options except
1447 827a167b 2022-08-16 stsp .Fl r .
1448 827a167b 2022-08-16 stsp .It Fl d
1449 827a167b 2022-08-16 stsp Delete the reference with the specified
1450 827a167b 2022-08-16 stsp .Ar name
1451 827a167b 2022-08-16 stsp from the repository.
1452 827a167b 2022-08-16 stsp Any commit, tree, tag, and blob objects belonging to deleted references
1453 827a167b 2022-08-16 stsp remain in the repository and may be removed separately with
1454 827a167b 2022-08-16 stsp Git's garbage collector or
1455 827a167b 2022-08-16 stsp .Cm gotadmin cleanup .
1456 827a167b 2022-08-16 stsp Cannot be used together with any other options except
1457 827a167b 2022-08-16 stsp .Fl r .
1458 d0eebce4 2019-03-11 stsp .It Fl l
1459 b2070a3f 2020-03-22 stsp List references in the repository.
1460 b2070a3f 2020-03-22 stsp If no
1461 b2070a3f 2020-03-22 stsp .Ar name
1462 b2070a3f 2020-03-22 stsp is specified, list all existing references in the repository.
1463 b2070a3f 2020-03-22 stsp If
1464 b2070a3f 2020-03-22 stsp .Ar name
1465 b2070a3f 2020-03-22 stsp is a reference namespace, list all references in this namespace.
1466 b2070a3f 2020-03-22 stsp Otherwise, show only the reference with the given
1467 b2070a3f 2020-03-22 stsp .Ar name .
1468 e31abbf2 2020-03-22 stsp Cannot be used together with any other options except
1469 0f104432 2021-11-20 stsp .Fl r
1470 0f104432 2021-11-20 stsp and
1471 0f104432 2021-11-20 stsp .Fl t .
1472 827a167b 2022-08-16 stsp .It Fl r Ar repository-path
1473 827a167b 2022-08-16 stsp Use the repository at the specified path.
1474 827a167b 2022-08-16 stsp If not specified, assume the repository is located at or above the current
1475 827a167b 2022-08-16 stsp working directory.
1476 827a167b 2022-08-16 stsp If this directory is a
1477 827a167b 2022-08-16 stsp .Nm
1478 827a167b 2022-08-16 stsp work tree, use the repository path associated with this work tree.
1479 e31abbf2 2020-03-22 stsp .It Fl s Ar reference
1480 e31abbf2 2020-03-22 stsp Create a symbolic reference, or change an existing symbolic reference.
1481 e31abbf2 2020-03-22 stsp The symbolic reference with the specified
1482 e31abbf2 2020-03-22 stsp .Ar name
1483 e31abbf2 2020-03-22 stsp will point at the specified
1484 e31abbf2 2020-03-22 stsp .Ar reference
1485 e31abbf2 2020-03-22 stsp which must already exist in the repository.
1486 d1c1ae5f 2019-08-12 stsp Care should be taken not to create loops between references when
1487 d1c1ae5f 2019-08-12 stsp this option is used.
1488 e31abbf2 2020-03-22 stsp Cannot be used together with any other options except
1489 e31abbf2 2020-03-22 stsp .Fl r .
1490 827a167b 2022-08-16 stsp .It Fl t
1491 827a167b 2022-08-16 stsp Sort listed references by modification time (most recently modified first)
1492 827a167b 2022-08-16 stsp instead of sorting by lexicographical order.
1493 827a167b 2022-08-16 stsp Use of this option requires the
1494 827a167b 2022-08-16 stsp .Fl l
1495 827a167b 2022-08-16 stsp option to be used as well.
1496 4e759de4 2019-06-26 stsp .El
1497 95f394e8 2021-10-04 kn .Tg br
1498 5fc4f020 2022-08-30 op .It Xo
1499 5fc4f020 2022-08-30 op .Cm branch
1500 5fc4f020 2022-08-30 op .Op Fl lnt
1501 5fc4f020 2022-08-30 op .Op Fl c Ar commit
1502 5fc4f020 2022-08-30 op .Op Fl d Ar name
1503 5fc4f020 2022-08-30 op .Op Fl r Ar repository-path
1504 5fc4f020 2022-08-30 op .Op Ar name
1505 5fc4f020 2022-08-30 op .Xc
1506 4683a10b 2021-11-04 kn .Dl Pq alias: Cm br
1507 da76fce2 2020-02-24 stsp Create, list, or delete branches.
1508 4e759de4 2019-06-26 stsp .Pp
1509 34d4e04c 2021-02-08 stsp Local branches are managed via references which live in the
1510 4e759de4 2019-06-26 stsp .Dq refs/heads/
1511 4e759de4 2019-06-26 stsp reference namespace.
1512 4e759de4 2019-06-26 stsp The
1513 4e759de4 2019-06-26 stsp .Cm got branch
1514 2f1457c6 2021-08-27 stsp command creates references in this namespace only.
1515 2f1457c6 2021-08-27 stsp .Pp
1516 e38d4cde 2022-03-21 naddy When deleting branches, the specified
1517 2f1457c6 2021-08-27 stsp .Ar name
1518 2f1457c6 2021-08-27 stsp is searched in the
1519 2f1457c6 2021-08-27 stsp .Dq refs/heads
1520 2f1457c6 2021-08-27 stsp reference namespace first.
1521 e38d4cde 2022-03-21 naddy If no corresponding branch is found, the
1522 2f1457c6 2021-08-27 stsp .Dq refs/remotes
1523 2f1457c6 2021-08-27 stsp namespace will be searched next.
1524 4e759de4 2019-06-26 stsp .Pp
1525 ad89fa31 2019-10-04 stsp If invoked in a work tree without any arguments, print the name of the
1526 ad89fa31 2019-10-04 stsp work tree's current branch.
1527 da76fce2 2020-02-24 stsp .Pp
1528 a74f7e83 2019-11-10 stsp If a
1529 a74f7e83 2019-11-10 stsp .Ar name
1530 a74f7e83 2019-11-10 stsp argument is passed, attempt to create a branch reference with the given name.
1531 a74f7e83 2019-11-10 stsp By default the new branch reference will point at the latest commit on the
1532 a74f7e83 2019-11-10 stsp work tree's current branch if invoked in a work tree, and otherwise to a commit
1533 a74f7e83 2019-11-10 stsp resolved via the repository's HEAD reference.
1534 4e759de4 2019-06-26 stsp .Pp
1535 da76fce2 2020-02-24 stsp If invoked in a work tree, once the branch was created successfully
1536 da76fce2 2020-02-24 stsp switch the work tree's head reference to the newly created branch and
1537 da76fce2 2020-02-24 stsp update files across the entire work tree, just like
1538 da76fce2 2020-02-24 stsp .Cm got update -b Ar name
1539 da76fce2 2020-02-24 stsp would do.
1540 da76fce2 2020-02-24 stsp Show the status of each affected file, using the following status codes:
1541 da76fce2 2020-02-24 stsp .Bl -column YXZ description
1542 da76fce2 2020-02-24 stsp .It U Ta file was updated and contained no local changes
1543 da76fce2 2020-02-24 stsp .It G Ta file was updated and local changes were merged cleanly
1544 da76fce2 2020-02-24 stsp .It C Ta file was updated and conflicts occurred during merge
1545 da76fce2 2020-02-24 stsp .It D Ta file was deleted
1546 da76fce2 2020-02-24 stsp .It A Ta new file was added
1547 da76fce2 2020-02-24 stsp .It \(a~ Ta versioned file is obstructed by a non-regular file
1548 da76fce2 2020-02-24 stsp .It ! Ta a missing versioned file was restored
1549 da76fce2 2020-02-24 stsp .El
1550 da76fce2 2020-02-24 stsp .Pp
1551 4e759de4 2019-06-26 stsp The options for
1552 4e759de4 2019-06-26 stsp .Cm got branch
1553 4e759de4 2019-06-26 stsp are as follows:
1554 4e759de4 2019-06-26 stsp .Bl -tag -width Ds
1555 a74f7e83 2019-11-10 stsp .It Fl c Ar commit
1556 a74f7e83 2019-11-10 stsp Make a newly created branch reference point at the specified
1557 a74f7e83 2019-11-10 stsp .Ar commit .
1558 6b483b31 2023-07-18 stsp The expected argument is a commit ID SHA1 hash, or a reference name or keyword
1559 6b483b31 2023-07-18 stsp which will be resolved to a commit ID.
1560 6b483b31 2023-07-18 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1561 6b483b31 2023-07-18 stsp automatically, provided the abbreviation is unique.
1562 6b483b31 2023-07-18 stsp The keywords
1563 c8d1a97c 2023-07-17 mark .Qq :base
1564 c8d1a97c 2023-07-17 mark and
1565 c8d1a97c 2023-07-17 mark .Qq :head
1566 6b483b31 2023-07-18 stsp resolve to the work tree's base commit and branch head, respectively.
1567 c8d1a97c 2023-07-17 mark The former is only valid if invoked in a work tree, while the latter will
1568 c8d1a97c 2023-07-17 mark resolve to the tip of the work tree's current branch if invoked in a
1569 c8d1a97c 2023-07-17 mark work tree, otherwise it will resolve to the repository's HEAD reference.
1570 c8d1a97c 2023-07-17 mark Keywords and references may be appended with
1571 c8d1a97c 2023-07-17 mark .Qq :+
1572 c8d1a97c 2023-07-17 mark or
1573 c8d1a97c 2023-07-17 mark .Qq :-
1574 c8d1a97c 2023-07-17 mark modifiers and an optional integer N to denote the
1575 c8d1a97c 2023-07-17 mark Nth descendant or antecedent by first parent traversal, respectively;
1576 c8d1a97c 2023-07-17 mark for example,
1577 c8d1a97c 2023-07-17 mark .Sy :head:-2
1578 c8d1a97c 2023-07-17 mark denotes the work tree branch head's 2nd generation ancestor, and
1579 c8d1a97c 2023-07-17 mark .Sy :base:+4
1580 c8d1a97c 2023-07-17 mark denotes the 4th generation descendant of the work tree's base commit.
1581 c8d1a97c 2023-07-17 mark Similarly,
1582 c8d1a97c 2023-07-17 mark .Sy foobar:+3
1583 c8d1a97c 2023-07-17 mark will denote the 3rd generation descendant of the commit resolved by the
1584 c8d1a97c 2023-07-17 mark .Qq foobar
1585 c8d1a97c 2023-07-17 mark reference.
1586 c8d1a97c 2023-07-17 mark A
1587 c8d1a97c 2023-07-17 mark .Qq :+
1588 c8d1a97c 2023-07-17 mark or
1589 c8d1a97c 2023-07-17 mark .Qq :-
1590 c8d1a97c 2023-07-17 mark modifier without a trailing integer has an implicit
1591 c8d1a97c 2023-07-17 mark .Qq 1
1592 c8d1a97c 2023-07-17 mark appended
1593 c8d1a97c 2023-07-17 mark .Po e.g.,
1594 c8d1a97c 2023-07-17 mark .Sy :base:+
1595 c8d1a97c 2023-07-17 mark is equivalent to
1596 c8d1a97c 2023-07-17 mark .Sy :base:+1
1597 c8d1a97c 2023-07-17 mark .Pc .
1598 827a167b 2022-08-16 stsp .It Fl d Ar name
1599 827a167b 2022-08-16 stsp Delete the branch with the specified
1600 827a167b 2022-08-16 stsp .Ar name
1601 827a167b 2022-08-16 stsp from the
1602 827a167b 2022-08-16 stsp .Dq refs/heads
1603 827a167b 2022-08-16 stsp or
1604 827a167b 2022-08-16 stsp .Dq refs/remotes
1605 827a167b 2022-08-16 stsp reference namespace.
1606 827a167b 2022-08-16 stsp .Pp
1607 827a167b 2022-08-16 stsp Only the branch reference is deleted.
1608 827a167b 2022-08-16 stsp Any commit, tree, and blob objects belonging to the branch
1609 827a167b 2022-08-16 stsp remain in the repository and may be removed separately with
1610 827a167b 2022-08-16 stsp Git's garbage collector or
1611 827a167b 2022-08-16 stsp .Cm gotadmin cleanup .
1612 4e759de4 2019-06-26 stsp .It Fl l
1613 34d4e04c 2021-02-08 stsp List all existing branches in the repository, including copies of remote
1614 34d4e04c 2021-02-08 stsp repositories' branches in the
1615 34d4e04c 2021-02-08 stsp .Dq refs/remotes/
1616 34d4e04c 2021-02-08 stsp reference namespace.
1617 34d4e04c 2021-02-08 stsp .Pp
1618 ba882ee3 2019-07-11 stsp If invoked in a work tree, the work tree's current branch is shown
1619 e19d5545 2023-07-04 stsp with one of the following annotations:
1620 ba882ee3 2019-07-11 stsp .Bl -column YXZ description
1621 863cc633 2023-07-23 mark .It * Ta work tree's base commit and the base commit of all tracked files
1622 863cc633 2023-07-23 mark matches the branch tip
1623 863cc633 2023-07-23 mark .It \(a~ Ta work tree comprises mixed commits or its base commit is out-of-date
1624 ba882ee3 2019-07-11 stsp .El
1625 827a167b 2022-08-16 stsp .It Fl n
1626 827a167b 2022-08-16 stsp Do not switch and update the work tree after creating a new branch.
1627 827a167b 2022-08-16 stsp .It Fl r Ar repository-path
1628 827a167b 2022-08-16 stsp Use the repository at the specified path.
1629 827a167b 2022-08-16 stsp If not specified, assume the repository is located at or above the current
1630 827a167b 2022-08-16 stsp working directory.
1631 827a167b 2022-08-16 stsp If this directory is a
1632 827a167b 2022-08-16 stsp .Nm
1633 827a167b 2022-08-16 stsp work tree, use the repository path associated with this work tree.
1634 f76670f0 2021-11-20 stsp .It Fl t
1635 f76670f0 2021-11-20 stsp Sort listed branches by modification time (most recently modified first)
1636 f76670f0 2021-11-20 stsp instead of sorting by lexicographical order.
1637 f76670f0 2021-11-20 stsp Branches in the
1638 f76670f0 2021-11-20 stsp .Dq refs/heads/
1639 f76670f0 2021-11-20 stsp reference namespace are listed before branches in
1640 f76670f0 2021-11-20 stsp .Dq refs/remotes/
1641 f76670f0 2021-11-20 stsp regardless.
1642 f76670f0 2021-11-20 stsp Use of this option requires the
1643 f76670f0 2021-11-20 stsp .Fl l
1644 f76670f0 2021-11-20 stsp option to be used as well.
1645 5de5890b 2018-10-18 stsp .El
1646 5fc4f020 2022-08-30 op .It Xo
1647 5fc4f020 2022-08-30 op .Cm tag
1648 5fc4f020 2022-08-30 op .Op Fl lVv
1649 5fc4f020 2022-08-30 op .Op Fl c Ar commit
1650 5fc4f020 2022-08-30 op .Op Fl m Ar message
1651 5fc4f020 2022-08-30 op .Op Fl r Ar repository-path
1652 5fc4f020 2022-08-30 op .Op Fl s Ar signer-id
1653 5fc4f020 2022-08-30 op .Ar name
1654 5fc4f020 2022-08-30 op .Xc
1655 8e7bd50a 2019-08-22 stsp Manage tags in a repository.
1656 8e7bd50a 2019-08-22 stsp .Pp
1657 8e7bd50a 2019-08-22 stsp Tags are managed via references which live in the
1658 8e7bd50a 2019-08-22 stsp .Dq refs/tags/
1659 8e7bd50a 2019-08-22 stsp reference namespace.
1660 8e7bd50a 2019-08-22 stsp The
1661 8e7bd50a 2019-08-22 stsp .Cm got tag
1662 8e7bd50a 2019-08-22 stsp command operates on references in this namespace only.
1663 b3cd068e 2019-08-22 stsp References in this namespace point at tag objects which contain a pointer
1664 b3cd068e 2019-08-22 stsp to another object, a tag message, as well as author and timestamp information.
1665 8e7bd50a 2019-08-22 stsp .Pp
1666 80106605 2020-02-24 stsp Attempt to create a tag with the given
1667 8e7bd50a 2019-08-22 stsp .Ar name ,
1668 8e7bd50a 2019-08-22 stsp and make this tag point at the given
1669 8e7bd50a 2019-08-22 stsp .Ar commit .
1670 8e7bd50a 2019-08-22 stsp If no commit is specified, default to the latest commit on the work tree's
1671 8e7bd50a 2019-08-22 stsp current branch if invoked in a work tree, and to a commit resolved via
1672 8e7bd50a 2019-08-22 stsp the repository's HEAD reference otherwise.
1673 8e7bd50a 2019-08-22 stsp .Pp
1674 8e7bd50a 2019-08-22 stsp The options for
1675 8e7bd50a 2019-08-22 stsp .Cm got tag
1676 8e7bd50a 2019-08-22 stsp are as follows:
1677 8e7bd50a 2019-08-22 stsp .Bl -tag -width Ds
1678 80106605 2020-02-24 stsp .It Fl c Ar commit
1679 80106605 2020-02-24 stsp Make the newly created tag reference point at the specified
1680 80106605 2020-02-24 stsp .Ar commit .
1681 80106605 2020-02-24 stsp The expected
1682 80106605 2020-02-24 stsp .Ar commit
1683 fd220d9f 2023-07-18 stsp argument is a commit ID SHA1 hash, or a reference or keyword
1684 fd220d9f 2023-07-18 stsp which will be resolved to a commit ID.
1685 80106605 2020-02-24 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1686 80106605 2020-02-24 stsp automatically, provided the abbreviation is unique.
1687 fd220d9f 2023-07-18 stsp The keywords
1688 4390d6c1 2023-07-18 mark .Qq :base
1689 4390d6c1 2023-07-18 mark and
1690 4390d6c1 2023-07-18 mark .Qq :head
1691 fd220d9f 2023-07-18 stsp resolve to the work tree's base commit and branch head, respectively.
1692 4390d6c1 2023-07-18 mark The former is only valid if invoked in a work tree, while the latter will
1693 4390d6c1 2023-07-18 mark resolve to the tip of the work tree's current branch if invoked in a
1694 4390d6c1 2023-07-18 mark work tree, otherwise it will resolve to the repository's HEAD reference.
1695 4390d6c1 2023-07-18 mark Keywords and references may be appended with
1696 4390d6c1 2023-07-18 mark .Qq :+
1697 4390d6c1 2023-07-18 mark or
1698 4390d6c1 2023-07-18 mark .Qq :-
1699 4390d6c1 2023-07-18 mark modifiers and an optional integer N to denote the
1700 4390d6c1 2023-07-18 mark Nth descendant or antecedent by first parent traversal, respectively;
1701 4390d6c1 2023-07-18 mark for example,
1702 4390d6c1 2023-07-18 mark .Sy :head:-2
1703 4390d6c1 2023-07-18 mark denotes the work tree branch head's 2nd generation ancestor, and
1704 4390d6c1 2023-07-18 mark .Sy :base:+4
1705 4390d6c1 2023-07-18 mark denotes the 4th generation descendant of the work tree's base commit.
1706 4390d6c1 2023-07-18 mark Similarly,
1707 4390d6c1 2023-07-18 mark .Sy eggs:-3
1708 4390d6c1 2023-07-18 mark will denote the 3rd generation ancestor of the commit resolved by the
1709 4390d6c1 2023-07-18 mark .Qq eggs
1710 4390d6c1 2023-07-18 mark reference.
1711 4390d6c1 2023-07-18 mark A
1712 4390d6c1 2023-07-18 mark .Qq :+
1713 4390d6c1 2023-07-18 mark or
1714 4390d6c1 2023-07-18 mark .Qq :-
1715 4390d6c1 2023-07-18 mark modifier without a trailing integer has an implicit
1716 4390d6c1 2023-07-18 mark .Qq 1
1717 4390d6c1 2023-07-18 mark appended
1718 4390d6c1 2023-07-18 mark .Po e.g.,
1719 4390d6c1 2023-07-18 mark .Sy :base:+
1720 4390d6c1 2023-07-18 mark is equivalent to
1721 4390d6c1 2023-07-18 mark .Sy :base:+1
1722 4390d6c1 2023-07-18 mark .Pc .
1723 827a167b 2022-08-16 stsp .It Fl l
1724 827a167b 2022-08-16 stsp List all existing tags in the repository instead of creating a new tag.
1725 827a167b 2022-08-16 stsp If a
1726 827a167b 2022-08-16 stsp .Ar name
1727 827a167b 2022-08-16 stsp argument is passed, show only the tag with the given
1728 827a167b 2022-08-16 stsp .Ar name .
1729 8e7bd50a 2019-08-22 stsp .It Fl m Ar message
1730 80106605 2020-02-24 stsp Use the specified tag message when creating the new tag.
1731 8e7bd50a 2019-08-22 stsp Without the
1732 8e7bd50a 2019-08-22 stsp .Fl m
1733 8e7bd50a 2019-08-22 stsp option,
1734 3a62228f 2019-11-08 stsp .Cm got tag
1735 8e7bd50a 2019-08-22 stsp opens a temporary file in an editor where a tag message can be written.
1736 ee27b57e 2023-07-15 naddy Quitting the editor without saving the file will abort the tag operation.
1737 8e7bd50a 2019-08-22 stsp .It Fl r Ar repository-path
1738 8e7bd50a 2019-08-22 stsp Use the repository at the specified path.
1739 8e7bd50a 2019-08-22 stsp If not specified, assume the repository is located at or above the current
1740 8e7bd50a 2019-08-22 stsp working directory.
1741 8e7bd50a 2019-08-22 stsp If this directory is a
1742 8e7bd50a 2019-08-22 stsp .Nm
1743 8e7bd50a 2019-08-22 stsp work tree, use the repository path associated with this work tree.
1744 10c4445c 2022-07-04 stsp .It Fl s Ar signer-id
1745 10c4445c 2022-07-04 stsp While creating a new tag, sign this tag with the identity given in
1746 10c4445c 2022-07-04 stsp .Ar signer-id .
1747 10c4445c 2022-07-04 stsp .Pp
1748 10c4445c 2022-07-04 stsp For SSH-based signatures,
1749 10c4445c 2022-07-04 stsp .Ar signer-id
1750 10c4445c 2022-07-04 stsp is the path to a file which may refer to either a private SSH key,
1751 10c4445c 2022-07-04 stsp or a public SSH key with the private half available via
1752 10c4445c 2022-07-04 stsp .Xr ssh-agent 1 .
1753 10c4445c 2022-07-04 stsp .Cm got tag
1754 10c4445c 2022-07-04 stsp will sign the tag object by invoking
1755 10c4445c 2022-07-04 stsp .Xr ssh-keygen 1
1756 10c4445c 2022-07-04 stsp with the
1757 217e00e5 2022-08-16 stsp .Fl Y Cm sign
1758 10c4445c 2022-07-04 stsp command, using the signature namespace
1759 10c4445c 2022-07-04 stsp .Dq git
1760 10c4445c 2022-07-04 stsp for compatibility with
1761 10c4445c 2022-07-04 stsp .Xr git 1 .
1762 10c4445c 2022-07-04 stsp .It Fl V
1763 10c4445c 2022-07-04 stsp Verify tag object signatures.
1764 10c4445c 2022-07-04 stsp If a
1765 10c4445c 2022-07-04 stsp .Ar name
1766 10c4445c 2022-07-04 stsp is specified, show and verify the tag object with the provided name.
1767 10c4445c 2022-07-04 stsp Otherwise, list all tag objects and verify signatures where present.
1768 10c4445c 2022-07-04 stsp .Pp
1769 10c4445c 2022-07-04 stsp .Cm got tag
1770 10c4445c 2022-07-04 stsp verifies SSH-based signatures by invoking
1771 10c4445c 2022-07-04 stsp .Xr ssh-keygen 1
1772 10c4445c 2022-07-04 stsp with the options
1773 217e00e5 2022-08-16 stsp .Fl Y Cm verify Fl f Ar allowed_signers .
1774 10c4445c 2022-07-04 stsp A path to the
1775 10c4445c 2022-07-04 stsp .Ar allowed_signers
1776 10c4445c 2022-07-04 stsp file must be set in
1777 10c4445c 2022-07-04 stsp .Xr got.conf 5 ,
1778 10c4445c 2022-07-04 stsp otherwise verification is impossible.
1779 827a167b 2022-08-16 stsp .It Fl v
1780 827a167b 2022-08-16 stsp Verbose mode.
1781 827a167b 2022-08-16 stsp During SSH signature creation and verification this option will be passed to
1782 827a167b 2022-08-16 stsp .Xr ssh-keygen 1 .
1783 827a167b 2022-08-16 stsp Multiple -v options increase the verbosity.
1784 827a167b 2022-08-16 stsp The maximum is 3.
1785 8e7bd50a 2019-08-22 stsp .El
1786 8e7bd50a 2019-08-22 stsp .Pp
1787 8e7bd50a 2019-08-22 stsp By design, the
1788 8e7bd50a 2019-08-22 stsp .Cm got tag
1789 8e7bd50a 2019-08-22 stsp command will not delete tags or change existing tags.
1790 8e7bd50a 2019-08-22 stsp If a tag must be deleted, the
1791 8e7bd50a 2019-08-22 stsp .Cm got ref
1792 8e7bd50a 2019-08-22 stsp command may be used to delete a tag's reference.
1793 8e7bd50a 2019-08-22 stsp This should only be done if the tag has not already been copied to
1794 8e7bd50a 2019-08-22 stsp another repository.
1795 5fc4f020 2022-08-30 op .It Xo
1796 5fc4f020 2022-08-30 op .Cm add
1797 5fc4f020 2022-08-30 op .Op Fl IR
1798 5fc4f020 2022-08-30 op .Ar path ...
1799 5fc4f020 2022-08-30 op .Xc
1800 8125ddca 2019-05-11 stsp Schedule unversioned files in a work tree for addition to the
1801 d00136be 2019-03-26 stsp repository in the next commit.
1802 ff56836b 2021-07-08 stsp By default, files which match a
1803 ff56836b 2021-07-08 stsp .Cm got status
1804 ff56836b 2021-07-08 stsp ignore pattern will not be added.
1805 4e68cba3 2019-11-23 stsp .Pp
1806 b88936d3 2023-06-21 stsp If a
1807 b88936d3 2023-06-21 stsp .Ar path
1808 b88936d3 2023-06-21 stsp mentioned in the command line is not an unversioned file then
1809 b88936d3 2023-06-21 stsp .Cm got add
1810 b88936d3 2023-06-21 stsp may raise an error.
1811 b88936d3 2023-06-21 stsp To avoid unnecessary errors from paths picked up by file globbing patterns
1812 b88936d3 2023-06-21 stsp in the shell, paths in the argument list will be silently ignored if they
1813 b88936d3 2023-06-21 stsp are not reported by
1814 b88936d3 2023-06-21 stsp .Cm got status
1815 b88936d3 2023-06-21 stsp at all, or if they are reported with one of the following status codes
1816 b88936d3 2023-06-21 stsp and do not have changes staged via
1817 b88936d3 2023-06-21 stsp .Cm got stage :
1818 b88936d3 2023-06-21 stsp .Bl -column YXZ description
1819 b88936d3 2023-06-21 stsp .It M Ta modified file
1820 b88936d3 2023-06-21 stsp .It A Ta file scheduled for addition in next commit
1821 b88936d3 2023-06-21 stsp .It C Ta modified or added file which contains merge conflicts
1822 b88936d3 2023-06-21 stsp .It m Ta modified file modes (executable bit only)
1823 b88936d3 2023-06-21 stsp .El
1824 b88936d3 2023-06-21 stsp .Pp
1825 4e68cba3 2019-11-23 stsp The options for
1826 4e68cba3 2019-11-23 stsp .Cm got add
1827 4e68cba3 2019-11-23 stsp are as follows:
1828 4e68cba3 2019-11-23 stsp .Bl -tag -width Ds
1829 827a167b 2022-08-16 stsp .It Fl I
1830 827a167b 2022-08-16 stsp Add files even if they match a
1831 827a167b 2022-08-16 stsp .Cm got status
1832 827a167b 2022-08-16 stsp ignore pattern.
1833 4e68cba3 2019-11-23 stsp .It Fl R
1834 4e68cba3 2019-11-23 stsp Permit recursion into directories.
1835 4e68cba3 2019-11-23 stsp If this option is not specified,
1836 4e68cba3 2019-11-23 stsp .Cm got add
1837 4e68cba3 2019-11-23 stsp will refuse to run if a specified
1838 4e68cba3 2019-11-23 stsp .Ar path
1839 4e68cba3 2019-11-23 stsp is a directory.
1840 4e68cba3 2019-11-23 stsp .El
1841 95f394e8 2021-10-04 kn .Tg rm
1842 5fc4f020 2022-08-30 op .It Xo
1843 5fc4f020 2022-08-30 op .Cm remove
1844 5fc4f020 2022-08-30 op .Op Fl fkR
1845 5fc4f020 2022-08-30 op .Op Fl s Ar status-codes
1846 5fc4f020 2022-08-30 op .Ar path ...
1847 5fc4f020 2022-08-30 op .Xc
1848 4683a10b 2021-11-04 kn .Dl Pq alias: Cm rm
1849 17ed4618 2019-06-02 stsp Remove versioned files from a work tree and schedule them for deletion
1850 2ec1f75b 2019-03-26 stsp from the repository in the next commit.
1851 2ec1f75b 2019-03-26 stsp .Pp
1852 2ec1f75b 2019-03-26 stsp The options for
1853 86d25a1b 2019-07-11 stsp .Cm got remove
1854 2ec1f75b 2019-03-26 stsp are as follows:
1855 2ec1f75b 2019-03-26 stsp .Bl -tag -width Ds
1856 2ec1f75b 2019-03-26 stsp .It Fl f
1857 4e12cd97 2022-01-25 stsp Perform the operation even if a file contains local modifications,
1858 4e12cd97 2022-01-25 stsp and do not raise an error if a specified
1859 4e12cd97 2022-01-25 stsp .Ar path
1860 4e12cd97 2022-01-25 stsp does not exist on disk.
1861 70e3e7f5 2019-12-13 tracey .It Fl k
1862 70e3e7f5 2019-12-13 tracey Keep affected files on disk.
1863 f2a9dc41 2019-12-13 tracey .It Fl R
1864 f2a9dc41 2019-12-13 tracey Permit recursion into directories.
1865 f2a9dc41 2019-12-13 tracey If this option is not specified,
1866 f2a9dc41 2019-12-13 tracey .Cm got remove
1867 f2a9dc41 2019-12-13 tracey will refuse to run if a specified
1868 f2a9dc41 2019-12-13 tracey .Ar path
1869 f2a9dc41 2019-12-13 tracey is a directory.
1870 766841c2 2020-08-13 stsp .It Fl s Ar status-codes
1871 766841c2 2020-08-13 stsp Only delete files with a modification status matching one of the
1872 766841c2 2020-08-13 stsp single-character status codes contained in the
1873 766841c2 2020-08-13 stsp .Ar status-codes
1874 766841c2 2020-08-13 stsp argument.
1875 766841c2 2020-08-13 stsp The following status codes may be specified:
1876 766841c2 2020-08-13 stsp .Bl -column YXZ description
1877 766841c2 2020-08-13 stsp .It M Ta modified file (this implies the
1878 766841c2 2020-08-13 stsp .Fl f
1879 766841c2 2020-08-13 stsp option)
1880 766841c2 2020-08-13 stsp .It ! Ta versioned file expected on disk but missing
1881 766841c2 2020-08-13 stsp .El
1882 d0eebce4 2019-03-11 stsp .El
1883 e9ce266e 2022-03-07 op .Tg pa
1884 5fc4f020 2022-08-30 op .It Xo
1885 5fc4f020 2022-08-30 op .Cm patch
1886 5fc4f020 2022-08-30 op .Op Fl nR
1887 5fc4f020 2022-08-30 op .Op Fl c Ar commit
1888 5fc4f020 2022-08-30 op .Op Fl p Ar strip-count
1889 5fc4f020 2022-08-30 op .Op Ar patchfile
1890 5fc4f020 2022-08-30 op .Xc
1891 e9ce266e 2022-03-07 op .Dl Pq alias: Cm pa
1892 e9ce266e 2022-03-07 op Apply changes from
1893 e9ce266e 2022-03-07 op .Ar patchfile
1894 750a3093 2022-03-13 stsp to files in a work tree.
1895 986288a6 2022-03-13 stsp Files added or removed by a patch will be scheduled for addition or removal in
1896 986288a6 2022-03-13 stsp the work tree.
1897 750a3093 2022-03-13 stsp .Pp
1898 750a3093 2022-03-13 stsp The patch must be in the unified diff format as produced by
1899 750a3093 2022-03-13 stsp .Cm got diff ,
1900 3f3a6472 2022-03-22 stsp .Xr git-diff 1 ,
1901 3e72b288 2022-03-13 stsp or by
1902 750a3093 2022-03-13 stsp .Xr diff 1
1903 3b01d641 2022-03-22 stsp and
1904 3b01d641 2022-03-22 stsp .Xr cvs 1
1905 1a7a534e 2022-03-22 stsp diff when invoked with their
1906 750a3093 2022-03-13 stsp .Fl u
1907 1a7a534e 2022-03-22 stsp options.
1908 750a3093 2022-03-13 stsp If no
1909 e9ce266e 2022-03-07 op .Ar patchfile
1910 750a3093 2022-03-13 stsp argument is provided, read unified diff data from standard input instead.
1911 750a3093 2022-03-13 stsp .Pp
1912 750a3093 2022-03-13 stsp If the
1913 750a3093 2022-03-13 stsp .Ar patchfile
1914 e38d4cde 2022-03-21 naddy contains multiple patches, then attempt to apply each of them in sequence.
1915 e9ce266e 2022-03-07 op .Pp
1916 3e72b288 2022-03-13 stsp Show the status of each affected file, using the following status codes:
1917 e9ce266e 2022-03-07 op .Bl -column XYZ description
1918 750a3093 2022-03-13 stsp .It M Ta file was modified
1919 9802c41c 2022-06-21 op .It G Ta file was merged using a merge-base found in the repository
1920 9802c41c 2022-06-21 op .It C Ta file was merged and conflicts occurred during merge
1921 750a3093 2022-03-13 stsp .It D Ta file was deleted
1922 750a3093 2022-03-13 stsp .It A Ta file was added
1923 60aa1fa0 2022-03-17 op .It # Ta failed to patch the file
1924 e9ce266e 2022-03-07 op .El
1925 e9ce266e 2022-03-07 op .Pp
1926 750a3093 2022-03-13 stsp If a change does not match at its exact line number, attempt to
1927 3e72b288 2022-03-13 stsp apply it somewhere else in the file if a good spot can be found.
1928 3e72b288 2022-03-13 stsp Otherwise, the patch will fail to apply.
1929 dd6c3779 2022-03-13 op .Pp
1930 dd6c3779 2022-03-13 op .Nm
1931 dd6c3779 2022-03-13 op .Cm patch
1932 dd6c3779 2022-03-13 op will refuse to apply a patch if certain preconditions are not met.
1933 3e72b288 2022-03-13 stsp Files to be deleted must already be under version control, and must
1934 3e72b288 2022-03-13 stsp not have been scheduled for deletion already.
1935 3e72b288 2022-03-13 stsp Files to be added must not yet be under version control and must not
1936 3e72b288 2022-03-13 stsp already be present on disk.
1937 3e72b288 2022-03-13 stsp Files to be modified must already be under version control and may not
1938 3e72b288 2022-03-13 stsp contain conflict markers.
1939 dd6c3779 2022-03-13 op .Pp
1940 dd6c3779 2022-03-13 op If an error occurs, the
1941 dd6c3779 2022-03-13 op .Cm patch
1942 dd6c3779 2022-03-13 op operation will be aborted.
1943 dd6c3779 2022-03-13 op Any changes made to the work tree up to this point will be left behind.
1944 750a3093 2022-03-13 stsp Such changes can be viewed with
1945 dd6c3779 2022-03-13 op .Cm got diff
1946 dd6c3779 2022-03-13 op and can be reverted with
1947 dd6c3779 2022-03-13 op .Cm got revert
1948 dd6c3779 2022-03-13 op if needed.
1949 899fcfdf 2022-03-13 op .Pp
1950 899fcfdf 2022-03-13 op The options for
1951 899fcfdf 2022-03-13 op .Cm got patch
1952 899fcfdf 2022-03-13 op are as follows:
1953 899fcfdf 2022-03-13 op .Bl -tag -width Ds
1954 5f56d41e 2022-07-28 op .It Fl c Ar commit
1955 76e495bd 2022-07-29 stsp Attempt to locate files within the specified
1956 5f56d41e 2022-07-28 op .Ar commit
1957 76e495bd 2022-07-29 stsp for use as a merge-base for 3-way merges.
1958 10d73284 2023-07-18 stsp .Pp
1959 10d73284 2023-07-18 stsp If the
1960 10d73284 2023-07-18 stsp .Fl c
1961 10d73284 2023-07-18 stsp option is not used then
1962 10d73284 2023-07-18 stsp .Cm got patch
1963 10d73284 2023-07-18 stsp will attempt to locate merge-bases via object IDs found in
1964 10d73284 2023-07-18 stsp .Ar patchfile
1965 10d73284 2023-07-18 stsp meta-data, such as produced by
1966 10d73284 2023-07-18 stsp .Cm got diff
1967 10d73284 2023-07-18 stsp or
1968 10d73284 2023-07-18 stsp .Xr git-diff 1 .
1969 10d73284 2023-07-18 stsp Use of the
1970 10d73284 2023-07-18 stsp .Fl c
1971 10d73284 2023-07-18 stsp option is only recommended in the absence of such meta-data.
1972 10d73284 2023-07-18 stsp .Pp
1973 10d73284 2023-07-18 stsp Ideally, the specified
1974 10d73284 2023-07-18 stsp .Ar commit
1975 10d73284 2023-07-18 stsp should contain versions of files which the changes contained in the
1976 10d73284 2023-07-18 stsp .Ar patchfile
1977 10d73284 2023-07-18 stsp were based on.
1978 10d73284 2023-07-18 stsp Files will be located by path, relative to the repository root.
1979 10d73284 2023-07-18 stsp If the
1980 10d73284 2023-07-18 stsp .Fl p
1981 10d73284 2023-07-18 stsp option is used then leading path components will be stripped
1982 10d73284 2023-07-18 stsp before paths are looked up in the repository.
1983 10d73284 2023-07-18 stsp .Pp
1984 10d73284 2023-07-18 stsp In case no merge-base is available for a file, changes will be applied
1985 10d73284 2023-07-18 stsp without doing a 3-way merge.
1986 10d73284 2023-07-18 stsp Changes which do not apply cleanly may then be rejected entirely, rather
1987 10d73284 2023-07-18 stsp than producing merge conflicts in the patched target file.
1988 10d73284 2023-07-18 stsp .Pp
1989 c8d1a97c 2023-07-17 mark The expected
1990 c8d1a97c 2023-07-17 mark .Ar commit
1991 6b483b31 2023-07-18 stsp argument is a commit ID SHA1 hash, or a reference name or a keyword
1992 6b483b31 2023-07-18 stsp which will be resolved to a commit ID.
1993 c8d1a97c 2023-07-17 mark An abbreviated hash argument will be expanded to a full SHA1 hash
1994 c8d1a97c 2023-07-17 mark automatically, provided the abbreviation is unique.
1995 6b483b31 2023-07-18 stsp The keywords
1996 c8d1a97c 2023-07-17 mark .Qq :base
1997 c8d1a97c 2023-07-17 mark and
1998 c8d1a97c 2023-07-17 mark .Qq :head
1999 6b483b31 2023-07-18 stsp resolve to the work tree's base commit and branch head, respectively.
2000 c8d1a97c 2023-07-17 mark Keywords and references may be appended with
2001 c8d1a97c 2023-07-17 mark .Qq :+
2002 c8d1a97c 2023-07-17 mark or
2003 c8d1a97c 2023-07-17 mark .Qq :-
2004 c8d1a97c 2023-07-17 mark modifiers and an optional integer N to denote the
2005 c8d1a97c 2023-07-17 mark Nth descendant or antecedent by first parent traversal, respectively;
2006 c8d1a97c 2023-07-17 mark for example,
2007 c8d1a97c 2023-07-17 mark .Sy :head:-2
2008 c8d1a97c 2023-07-17 mark denotes the work tree branch head's 2nd generation ancestor, and
2009 c8d1a97c 2023-07-17 mark .Sy :base:+4
2010 c8d1a97c 2023-07-17 mark denotes the 4th generation descendant of the work tree's base commit.
2011 c8d1a97c 2023-07-17 mark Similarly,
2012 c8d1a97c 2023-07-17 mark .Sy flan:+3
2013 c8d1a97c 2023-07-17 mark will denote the 3rd generation descendant of the commit resolved by the
2014 c8d1a97c 2023-07-17 mark .Qq flan
2015 c8d1a97c 2023-07-17 mark reference.
2016 c8d1a97c 2023-07-17 mark A
2017 c8d1a97c 2023-07-17 mark .Qq :+
2018 c8d1a97c 2023-07-17 mark or
2019 c8d1a97c 2023-07-17 mark .Qq :-
2020 c8d1a97c 2023-07-17 mark modifier without a trailing integer has an implicit
2021 c8d1a97c 2023-07-17 mark .Qq 1
2022 c8d1a97c 2023-07-17 mark appended
2023 c8d1a97c 2023-07-17 mark .Po e.g.,
2024 c8d1a97c 2023-07-17 mark .Sy :base:+
2025 c8d1a97c 2023-07-17 mark is equivalent to
2026 c8d1a97c 2023-07-17 mark .Sy :base:+1
2027 c8d1a97c 2023-07-17 mark .Pc .
2028 899fcfdf 2022-03-13 op .It Fl n
2029 899fcfdf 2022-03-13 op Do not make any modifications to the work tree.
2030 899fcfdf 2022-03-13 op This can be used to check whether a patch would apply without issues.
2031 899fcfdf 2022-03-13 op If the
2032 899fcfdf 2022-03-13 op .Ar patchfile
2033 e38d4cde 2022-03-21 naddy contains diffs that affect the same file multiple times, the results
2034 899fcfdf 2022-03-13 op displayed may be incorrect.
2035 9d6cabd5 2022-04-07 op .It Fl p Ar strip-count
2036 9d6cabd5 2022-04-07 op Specify the number of leading path components to strip from paths
2037 9d6cabd5 2022-04-07 op parsed from
2038 9d6cabd5 2022-04-07 op .Ar patchfile .
2039 9d6cabd5 2022-04-07 op If the
2040 9d6cabd5 2022-04-07 op .Fl p
2041 9d6cabd5 2022-04-07 op option is not used,
2042 9d6cabd5 2022-04-07 op .Sq a/
2043 9d6cabd5 2022-04-07 op and
2044 9d6cabd5 2022-04-07 op .Sq b/
2045 9d6cabd5 2022-04-07 op path prefixes generated by
2046 9d6cabd5 2022-04-07 op .Xr git-diff 1
2047 9d6cabd5 2022-04-07 op will be recognized and stripped automatically.
2048 bad961bf 2022-04-23 op .It Fl R
2049 bad961bf 2022-04-23 op Reverse the patch before applying it.
2050 899fcfdf 2022-03-13 op .El
2051 95f394e8 2021-10-04 kn .Tg rv
2052 5fc4f020 2022-08-30 op .It Xo
2053 5fc4f020 2022-08-30 op .Cm revert
2054 5fc4f020 2022-08-30 op .Op Fl pR
2055 5fc4f020 2022-08-30 op .Op Fl F Ar response-script
2056 5fc4f020 2022-08-30 op .Ar path ...
2057 5fc4f020 2022-08-30 op .Xc
2058 4683a10b 2021-11-04 kn .Dl Pq alias: Cm rv
2059 bd81cfb7 2020-04-19 stsp Revert any local changes in files at the specified paths in a work tree.
2060 a129376b 2019-03-28 stsp File contents will be overwritten with those contained in the
2061 1dd86744 2019-08-12 anthony work tree's base commit.
2062 1dd86744 2019-08-12 anthony There is no way to bring discarded changes back after
2063 a129376b 2019-03-28 stsp .Cm got revert !
2064 a129376b 2019-03-28 stsp .Pp
2065 e20a8b6f 2019-06-04 stsp If a file was added with
2066 e38d4cde 2022-03-21 naddy .Cm got add ,
2067 a129376b 2019-03-28 stsp it will become an unversioned file again.
2068 e20a8b6f 2019-06-04 stsp If a file was deleted with
2069 e38d4cde 2022-03-21 naddy .Cm got remove ,
2070 a129376b 2019-03-28 stsp it will be restored.
2071 0f6d7415 2019-08-08 stsp .Pp
2072 0f6d7415 2019-08-08 stsp The options for
2073 0f6d7415 2019-08-08 stsp .Cm got revert
2074 0f6d7415 2019-08-08 stsp are as follows:
2075 0f6d7415 2019-08-08 stsp .Bl -tag -width Ds
2076 827a167b 2022-08-16 stsp .It Fl F Ar response-script
2077 827a167b 2022-08-16 stsp With the
2078 827a167b 2022-08-16 stsp .Fl p
2079 827a167b 2022-08-16 stsp option, read
2080 827a167b 2022-08-16 stsp .Dq y ,
2081 827a167b 2022-08-16 stsp .Dq n ,
2082 827a167b 2022-08-16 stsp and
2083 827a167b 2022-08-16 stsp .Dq q
2084 827a167b 2022-08-16 stsp responses line-by-line from the specified
2085 827a167b 2022-08-16 stsp .Ar response-script
2086 827a167b 2022-08-16 stsp file instead of prompting interactively.
2087 33aa809d 2019-08-08 stsp .It Fl p
2088 33aa809d 2019-08-08 stsp Instead of reverting all changes in files, interactively select or reject
2089 33aa809d 2019-08-08 stsp changes to revert based on
2090 33aa809d 2019-08-08 stsp .Dq y
2091 33aa809d 2019-08-08 stsp (revert change),
2092 33aa809d 2019-08-08 stsp .Dq n
2093 33aa809d 2019-08-08 stsp (keep change), and
2094 33aa809d 2019-08-08 stsp .Dq q
2095 33aa809d 2019-08-08 stsp (quit reverting this file) responses.
2096 33aa809d 2019-08-08 stsp If a file is in modified status, individual patches derived from the
2097 33aa809d 2019-08-08 stsp modified file content can be reverted.
2098 33aa809d 2019-08-08 stsp Files in added or deleted status may only be reverted in their entirety.
2099 0f6d7415 2019-08-08 stsp .It Fl R
2100 0f6d7415 2019-08-08 stsp Permit recursion into directories.
2101 0f6d7415 2019-08-08 stsp If this option is not specified,
2102 0f6d7415 2019-08-08 stsp .Cm got revert
2103 0f6d7415 2019-08-08 stsp will refuse to run if a specified
2104 0f6d7415 2019-08-08 stsp .Ar path
2105 0f6d7415 2019-08-08 stsp is a directory.
2106 0f6d7415 2019-08-08 stsp .El
2107 95f394e8 2021-10-04 kn .Tg ci
2108 5fc4f020 2022-08-30 op .It Xo
2109 5fc4f020 2022-08-30 op .Cm commit
2110 12383673 2023-02-18 mark .Op Fl CNnS
2111 5fc4f020 2022-08-30 op .Op Fl A Ar author
2112 5fc4f020 2022-08-30 op .Op Fl F Ar path
2113 5fc4f020 2022-08-30 op .Op Fl m Ar message
2114 5fc4f020 2022-08-30 op .Op Ar path ...
2115 5fc4f020 2022-08-30 op .Xc
2116 4683a10b 2021-11-04 kn .Dl Pq alias: Cm ci
2117 4ed9f614 2019-08-04 stsp Create a new commit in the repository from changes in a work tree
2118 15cd91f7 2019-05-12 stsp and use this commit as the new base commit for the work tree.
2119 5c1e53bc 2019-07-28 stsp If no
2120 90e8619e 2019-07-25 stsp .Ar path
2121 4ed9f614 2019-08-04 stsp is specified, commit all changes in the work tree.
2122 4ed9f614 2019-08-04 stsp Otherwise, commit changes at or within the specified paths.
2123 15cd91f7 2019-05-12 stsp .Pp
2124 4ed9f614 2019-08-04 stsp If changes have been explicitly staged for commit with
2125 1dd86744 2019-08-12 anthony .Cm got stage ,
2126 4ed9f614 2019-08-04 stsp only commit staged changes and reject any specified paths which
2127 4ed9f614 2019-08-04 stsp have not been staged.
2128 4ed9f614 2019-08-04 stsp .Pp
2129 28cf319f 2021-01-28 stsp .Cm got commit
2130 28cf319f 2021-01-28 stsp opens a temporary file in an editor where a log message can be written
2131 28cf319f 2021-01-28 stsp unless the
2132 28cf319f 2021-01-28 stsp .Fl m
2133 28cf319f 2021-01-28 stsp option is used
2134 28cf319f 2021-01-28 stsp or the
2135 28cf319f 2021-01-28 stsp .Fl F
2136 28cf319f 2021-01-28 stsp and
2137 28cf319f 2021-01-28 stsp .Fl N
2138 28cf319f 2021-01-28 stsp options are used together.
2139 ee27b57e 2023-07-15 naddy Quitting the editor without saving the file will abort the commit operation.
2140 28cf319f 2021-01-28 stsp .Pp
2141 15cd91f7 2019-05-12 stsp Show the status of each affected file, using the following status codes:
2142 15cd91f7 2019-05-12 stsp .Bl -column YXZ description
2143 15cd91f7 2019-05-12 stsp .It M Ta modified file
2144 15cd91f7 2019-05-12 stsp .It D Ta file was deleted
2145 15cd91f7 2019-05-12 stsp .It A Ta new file was added
2146 1ebedb77 2019-10-19 stsp .It m Ta modified file modes (executable bit only)
2147 15cd91f7 2019-05-12 stsp .El
2148 15cd91f7 2019-05-12 stsp .Pp
2149 996d5ccd 2019-08-05 stsp Files which are not part of the new commit will retain their previously
2150 996d5ccd 2019-08-05 stsp recorded base commit.
2151 15cd91f7 2019-05-12 stsp Some
2152 15cd91f7 2019-05-12 stsp .Nm
2153 15cd91f7 2019-05-12 stsp commands may refuse to run while the work tree contains files from
2154 15cd91f7 2019-05-12 stsp multiple base commits.
2155 15cd91f7 2019-05-12 stsp The base commit of such a work tree can be made consistent by running
2156 47ec7be7 2019-05-12 stsp .Cm got update
2157 47ec7be7 2019-05-12 stsp across the entire work tree.
2158 15cd91f7 2019-05-12 stsp .Pp
2159 15cd91f7 2019-05-12 stsp The
2160 15cd91f7 2019-05-12 stsp .Cm got commit
2161 15cd91f7 2019-05-12 stsp command requires the
2162 74416c47 2019-05-09 stsp .Ev GOT_AUTHOR
2163 aba9c984 2019-09-08 stsp environment variable to be set,
2164 257add31 2020-09-09 stsp unless an author has been configured in
2165 257add31 2020-09-09 stsp .Xr got.conf 5
2166 257add31 2020-09-09 stsp or Git's
2167 aba9c984 2019-09-08 stsp .Dv user.name
2168 aba9c984 2019-09-08 stsp and
2169 709ae9eb 2019-09-08 stsp .Dv user.email
2170 709ae9eb 2019-09-08 stsp configuration settings can be
2171 aba9c984 2019-09-08 stsp obtained from the repository's
2172 aba9c984 2019-09-08 stsp .Pa .git/config
2173 c9956ddf 2019-09-08 stsp file or from Git's global
2174 c9956ddf 2019-09-08 stsp .Pa ~/.gitconfig
2175 c9956ddf 2019-09-08 stsp configuration file.
2176 74416c47 2019-05-09 stsp .Pp
2177 74416c47 2019-05-09 stsp The options for
2178 74416c47 2019-05-09 stsp .Cm got commit
2179 74416c47 2019-05-09 stsp are as follows:
2180 74416c47 2019-05-09 stsp .Bl -tag -width Ds
2181 62b21d33 2022-07-19 op .It Fl A Ar author
2182 62b21d33 2022-07-19 op Set author information in the newly created commit to
2183 62b21d33 2022-07-19 op .Ar author .
2184 e8049a88 2023-02-13 op This is useful when committing changes on behalf of someone else.
2185 62b21d33 2022-07-19 op The
2186 62b21d33 2022-07-19 op .Ar author
2187 62b21d33 2022-07-19 op argument must use the same format as the
2188 62b21d33 2022-07-19 op .Ev GOT_AUTHOR
2189 62b21d33 2022-07-19 op environment variable.
2190 62b21d33 2022-07-19 op .Pp
2191 62b21d33 2022-07-19 op In addition to storing author information, the newly created commit
2192 62b21d33 2022-07-19 op object will retain
2193 62b21d33 2022-07-19 op .Dq committer
2194 62b21d33 2022-07-19 op information which is obtained, as usual, from the
2195 62b21d33 2022-07-19 op .Ev GOT_AUTHOR
2196 62b21d33 2022-07-19 op environment variable, or
2197 62b21d33 2022-07-19 op .Xr got.conf 5 ,
2198 62b21d33 2022-07-19 op or Git configuration settings.
2199 12383673 2023-02-18 mark .It Fl C
2200 12383673 2023-02-18 mark Allow committing files in conflicted status.
2201 12383673 2023-02-18 mark .Pp
2202 12383673 2023-02-18 mark Committing files with conflict markers should generally be avoided.
2203 12383673 2023-02-18 mark Cases where conflict markers must be stored in the repository for
2204 12383673 2023-02-18 mark some legitimate reason should be very rare.
2205 12383673 2023-02-18 mark There are usually ways to avoid storing conflict markers verbatim by
2206 12383673 2023-02-18 mark applying appropriate programming tricks.
2207 28cf319f 2021-01-28 stsp .It Fl F Ar path
2208 28cf319f 2021-01-28 stsp Use the prepared log message stored in the file found at
2209 28cf319f 2021-01-28 stsp .Ar path
2210 28cf319f 2021-01-28 stsp when creating the new commit.
2211 28cf319f 2021-01-28 stsp .Cm got commit
2212 28cf319f 2021-01-28 stsp opens a temporary file in an editor where the prepared log message can be
2213 28cf319f 2021-01-28 stsp reviewed and edited further if needed.
2214 28cf319f 2021-01-28 stsp Cannot be used together with the
2215 23594da9 2019-05-13 stsp .Fl m
2216 28cf319f 2021-01-28 stsp option.
2217 28cf319f 2021-01-28 stsp .It Fl m Ar message
2218 28cf319f 2021-01-28 stsp Use the specified log message when creating the new commit.
2219 28cf319f 2021-01-28 stsp Cannot be used together with the
2220 28cf319f 2021-01-28 stsp .Fl F
2221 28cf319f 2021-01-28 stsp option.
2222 28cf319f 2021-01-28 stsp .It Fl N
2223 28cf319f 2021-01-28 stsp This option prevents
2224 23594da9 2019-05-13 stsp .Cm got commit
2225 28cf319f 2021-01-28 stsp from opening the commit message in an editor.
2226 28cf319f 2021-01-28 stsp It has no effect unless it is used together with the
2227 28cf319f 2021-01-28 stsp .Fl F
2228 28cf319f 2021-01-28 stsp option and is intended for non-interactive use such as scripting.
2229 2a47b1e5 2022-11-01 stsp .It Fl n
2230 2a47b1e5 2022-11-01 stsp This option prevents
2231 2a47b1e5 2022-11-01 stsp .Cm got commit
2232 2a47b1e5 2022-11-01 stsp from generating a diff of the to-be-committed changes in a temporary file
2233 2a47b1e5 2022-11-01 stsp which can be viewed while editing a commit message.
2234 35213c7c 2020-07-23 stsp .It Fl S
2235 af358f55 2020-07-23 stsp Allow the addition of symbolic links which point outside of the path space
2236 af358f55 2020-07-23 stsp that is under version control.
2237 af358f55 2020-07-23 stsp By default,
2238 af358f55 2020-07-23 stsp .Cm got commit
2239 af358f55 2020-07-23 stsp will reject such symbolic links due to safety concerns.
2240 35213c7c 2020-07-23 stsp As a precaution,
2241 35213c7c 2020-07-23 stsp .Nm
2242 af358f55 2020-07-23 stsp may decide to represent such a symbolic link as a regular file which contains
2243 af358f55 2020-07-23 stsp the link's target path, rather than creating an actual symbolic link which
2244 af358f55 2020-07-23 stsp points outside of the work tree.
2245 af358f55 2020-07-23 stsp Use of this option is discouraged because external mechanisms such as
2246 af358f55 2020-07-23 stsp .Dq make obj
2247 af358f55 2020-07-23 stsp are better suited for managing symbolic links to paths not under
2248 af358f55 2020-07-23 stsp version control.
2249 2ec1f75b 2019-03-26 stsp .El
2250 cfce0458 2019-07-28 stsp .Pp
2251 cfce0458 2019-07-28 stsp .Cm got commit
2252 cfce0458 2019-07-28 stsp will refuse to run if certain preconditions are not met.
2253 916f288c 2019-07-30 stsp If the work tree's current branch is not in the
2254 916f288c 2019-07-30 stsp .Dq refs/heads/
2255 916f288c 2019-07-30 stsp reference namespace, new commits may not be created on this branch.
2256 cfce0458 2019-07-28 stsp Local changes may only be committed if they are based on file content
2257 cfce0458 2019-07-28 stsp found in the most recent commit on the work tree's branch.
2258 cfce0458 2019-07-28 stsp If a path is found to be out of date,
2259 cfce0458 2019-07-28 stsp .Cm got update
2260 cfce0458 2019-07-28 stsp must be used first in order to merge local changes with changes made
2261 cfce0458 2019-07-28 stsp in the repository.
2262 95f394e8 2021-10-04 kn .Tg se
2263 5fc4f020 2022-08-30 op .It Xo
2264 5fc4f020 2022-08-30 op .Cm send
2265 5fc4f020 2022-08-30 op .Op Fl afqTv
2266 5fc4f020 2022-08-30 op .Op Fl b Ar branch
2267 5fc4f020 2022-08-30 op .Op Fl d Ar branch
2268 5fc4f020 2022-08-30 op .Op Fl r Ar repository-path
2269 5fc4f020 2022-08-30 op .Op Fl t Ar tag
2270 5fc4f020 2022-08-30 op .Op Ar remote-repository
2271 5fc4f020 2022-08-30 op .Xc
2272 4683a10b 2021-11-04 kn .Dl Pq alias: Cm se
2273 f8a36e22 2021-08-26 stsp Send new changes to a remote repository.
2274 f8a36e22 2021-08-26 stsp If no
2275 f8a36e22 2021-08-26 stsp .Ar remote-repository
2276 f8a36e22 2021-08-26 stsp is specified,
2277 f8a36e22 2021-08-26 stsp .Dq origin
2278 f8a36e22 2021-08-26 stsp will be used.
2279 f8a36e22 2021-08-26 stsp The remote repository's URL is obtained from the corresponding entry in
2280 f8a36e22 2021-08-26 stsp .Xr got.conf 5
2281 f8a36e22 2021-08-26 stsp or Git's
2282 f8a36e22 2021-08-26 stsp .Pa config
2283 f8a36e22 2021-08-26 stsp file of the local repository, as created by
2284 f8a36e22 2021-08-26 stsp .Cm got clone .
2285 f8a36e22 2021-08-26 stsp .Pp
2286 f8a36e22 2021-08-26 stsp All objects corresponding to new changes will be written to a temporary
2287 f8a36e22 2021-08-26 stsp pack file which is then uploaded to the server.
2288 f8a36e22 2021-08-26 stsp Upon success, references in the
2289 f8a36e22 2021-08-26 stsp .Dq refs/remotes/
2290 f8a36e22 2021-08-26 stsp reference namespace of the local repository will be updated to point at
2291 f8a36e22 2021-08-26 stsp the commits which have been sent.
2292 f8a36e22 2021-08-26 stsp .Pp
2293 f8a36e22 2021-08-26 stsp By default, changes will only be sent if they are based on up-to-date
2294 f8a36e22 2021-08-26 stsp copies of relevant branches in the remote repository.
2295 fd44090b 2021-08-26 stsp If any changes to be sent are based on out-of-date copies or would
2296 fd44090b 2021-08-26 stsp otherwise break linear history of existing branches, new changes must
2297 fd44090b 2021-08-26 stsp be fetched from the server with
2298 f8a36e22 2021-08-26 stsp .Cm got fetch
2299 f8a36e22 2021-08-26 stsp and local branches must be rebased with
2300 f8a36e22 2021-08-26 stsp .Cm got rebase
2301 f8a36e22 2021-08-26 stsp before
2302 f8a36e22 2021-08-26 stsp .Cm got send
2303 f8a36e22 2021-08-26 stsp can succeed.
2304 fd44090b 2021-08-26 stsp The
2305 fd44090b 2021-08-26 stsp .Fl f
2306 fd44090b 2021-08-26 stsp option can be used to make exceptions to these requirements.
2307 f8a36e22 2021-08-26 stsp .Pp
2308 f8a36e22 2021-08-26 stsp The options for
2309 f8a36e22 2021-08-26 stsp .Cm got send
2310 f8a36e22 2021-08-26 stsp are as follows:
2311 f8a36e22 2021-08-26 stsp .Bl -tag -width Ds
2312 f8a36e22 2021-08-26 stsp .It Fl a
2313 f8a36e22 2021-08-26 stsp Send all branches from the local repository's
2314 f8a36e22 2021-08-26 stsp .Dq refs/heads/
2315 f8a36e22 2021-08-26 stsp reference namespace.
2316 f8a36e22 2021-08-26 stsp The
2317 f8a36e22 2021-08-26 stsp .Fl a
2318 f8a36e22 2021-08-26 stsp option is equivalent to listing all branches with multiple
2319 f8a36e22 2021-08-26 stsp .Fl b
2320 f8a36e22 2021-08-26 stsp options.
2321 f8a36e22 2021-08-26 stsp Cannot be used together with the
2322 f8a36e22 2021-08-26 stsp .Fl b
2323 f8a36e22 2021-08-26 stsp option.
2324 f8a36e22 2021-08-26 stsp .It Fl b Ar branch
2325 f8a36e22 2021-08-26 stsp Send the specified
2326 f8a36e22 2021-08-26 stsp .Ar branch
2327 f8a36e22 2021-08-26 stsp from the local repository's
2328 f8a36e22 2021-08-26 stsp .Dq refs/heads/
2329 f8a36e22 2021-08-26 stsp reference namespace.
2330 f8a36e22 2021-08-26 stsp This option may be specified multiple times to build a list of branches
2331 f8a36e22 2021-08-26 stsp to send.
2332 f8a36e22 2021-08-26 stsp If this option is not specified, default to the work tree's current branch
2333 f8a36e22 2021-08-26 stsp if invoked in a work tree, or to the repository's HEAD reference.
2334 f8a36e22 2021-08-26 stsp Cannot be used together with the
2335 f8a36e22 2021-08-26 stsp .Fl a
2336 f8a36e22 2021-08-26 stsp option.
2337 f8a36e22 2021-08-26 stsp .It Fl d Ar branch
2338 f8a36e22 2021-08-26 stsp Delete the specified
2339 f8a36e22 2021-08-26 stsp .Ar branch
2340 f8a36e22 2021-08-26 stsp from the remote repository's
2341 f8a36e22 2021-08-26 stsp .Dq refs/heads/
2342 f8a36e22 2021-08-26 stsp reference namespace.
2343 f8a36e22 2021-08-26 stsp This option may be specified multiple times to build a list of branches
2344 f8a36e22 2021-08-26 stsp to delete.
2345 f8a36e22 2021-08-26 stsp .Pp
2346 f8a36e22 2021-08-26 stsp Only references are deleted.
2347 f8a36e22 2021-08-26 stsp Any commit, tree, tag, and blob objects belonging to deleted branches
2348 f8a36e22 2021-08-26 stsp may become subject to deletion by Git's garbage collector running on
2349 f8a36e22 2021-08-26 stsp the server.
2350 f8a36e22 2021-08-26 stsp .Pp
2351 f8a36e22 2021-08-26 stsp Requesting deletion of branches results in an error if the server
2352 fd44090b 2021-08-26 stsp does not support this feature or disallows the deletion of branches
2353 fd44090b 2021-08-26 stsp based on its configuration.
2354 f8a36e22 2021-08-26 stsp .It Fl f
2355 fd44090b 2021-08-26 stsp Attempt to force the server to overwrite existing branches or tags
2356 fd44090b 2021-08-26 stsp in the remote repository, even when
2357 fd44090b 2021-08-26 stsp .Cm got fetch
2358 7b53188e 2023-07-03 stsp followed by
2359 fd44090b 2021-08-26 stsp .Cm got rebase
2360 7b53188e 2023-07-03 stsp or
2361 7b53188e 2023-07-03 stsp .Cm got merge
2362 fd44090b 2021-08-26 stsp would usually be required before changes can be sent.
2363 f8a36e22 2021-08-26 stsp The server may reject forced requests regardless, depending on its
2364 f8a36e22 2021-08-26 stsp configuration.
2365 f8a36e22 2021-08-26 stsp .Pp
2366 f8a36e22 2021-08-26 stsp Any commit, tree, tag, and blob objects belonging to overwritten branches
2367 f8a36e22 2021-08-26 stsp or tags may become subject to deletion by Git's garbage collector running
2368 f8a36e22 2021-08-26 stsp on the server.
2369 f8a36e22 2021-08-26 stsp .Pp
2370 f8a36e22 2021-08-26 stsp The
2371 f8a36e22 2021-08-26 stsp .Dq refs/tags
2372 f8a36e22 2021-08-26 stsp reference namespace is globally shared between all repositories.
2373 f8a36e22 2021-08-26 stsp Use of the
2374 f8a36e22 2021-08-26 stsp .Fl f
2375 f8a36e22 2021-08-26 stsp option to overwrite tags is discouraged because it can lead to
2376 f8a36e22 2021-08-26 stsp inconsistencies between the tags present in different repositories.
2377 f8a36e22 2021-08-26 stsp In general, creating a new tag with a different name is recommended
2378 f8a36e22 2021-08-26 stsp instead of overwriting an existing tag.
2379 f8a36e22 2021-08-26 stsp .Pp
2380 f8a36e22 2021-08-26 stsp Use of the
2381 f8a36e22 2021-08-26 stsp .Fl f
2382 f8a36e22 2021-08-26 stsp option is particularly discouraged if changes being sent are based
2383 f8a36e22 2021-08-26 stsp on an out-of-date copy of a branch in the remote repository.
2384 f8a36e22 2021-08-26 stsp Instead of using the
2385 f8a36e22 2021-08-26 stsp .Fl f
2386 f8a36e22 2021-08-26 stsp option, new changes should
2387 f8a36e22 2021-08-26 stsp be fetched with
2388 f8a36e22 2021-08-26 stsp .Cm got fetch
2389 f8a36e22 2021-08-26 stsp and local branches should be rebased with
2390 7b53188e 2023-07-03 stsp .Cm got rebase
2391 7b53188e 2023-07-03 stsp or merged with
2392 7b53188e 2023-07-03 stsp .Cm got merge ,
2393 f8a36e22 2021-08-26 stsp followed by another attempt to send the changes.
2394 f8a36e22 2021-08-26 stsp .Pp
2395 f8a36e22 2021-08-26 stsp The
2396 f8a36e22 2021-08-26 stsp .Fl f
2397 f8a36e22 2021-08-26 stsp option should only be needed in situations where the remote repository's
2398 f8a36e22 2021-08-26 stsp copy of a branch or tag is known to be out-of-date and is considered
2399 f8a36e22 2021-08-26 stsp disposable.
2400 f8a36e22 2021-08-26 stsp The risks of creating inconsistencies between different repositories
2401 f8a36e22 2021-08-26 stsp should also be taken into account.
2402 827a167b 2022-08-16 stsp .It Fl q
2403 827a167b 2022-08-16 stsp Suppress progress reporting output.
2404 827a167b 2022-08-16 stsp The same option will be passed to
2405 827a167b 2022-08-16 stsp .Xr ssh 1
2406 827a167b 2022-08-16 stsp if applicable.
2407 f8a36e22 2021-08-26 stsp .It Fl r Ar repository-path
2408 f8a36e22 2021-08-26 stsp Use the repository at the specified path.
2409 f8a36e22 2021-08-26 stsp If not specified, assume the repository is located at or above the current
2410 f8a36e22 2021-08-26 stsp working directory.
2411 f8a36e22 2021-08-26 stsp If this directory is a
2412 f8a36e22 2021-08-26 stsp .Nm
2413 f8a36e22 2021-08-26 stsp work tree, use the repository path associated with this work tree.
2414 827a167b 2022-08-16 stsp .It Fl T
2415 827a167b 2022-08-16 stsp Attempt to send all tags from the local repository's
2416 827a167b 2022-08-16 stsp .Dq refs/tags/
2417 827a167b 2022-08-16 stsp reference namespace.
2418 827a167b 2022-08-16 stsp The
2419 827a167b 2022-08-16 stsp .Fl T
2420 827a167b 2022-08-16 stsp option is equivalent to listing all tags with multiple
2421 827a167b 2022-08-16 stsp .Fl t
2422 827a167b 2022-08-16 stsp options.
2423 827a167b 2022-08-16 stsp Cannot be used together with the
2424 827a167b 2022-08-16 stsp .Fl t
2425 827a167b 2022-08-16 stsp option.
2426 f8a36e22 2021-08-26 stsp .It Fl t Ar tag
2427 f8a36e22 2021-08-26 stsp Send the specified
2428 f8a36e22 2021-08-26 stsp .Ar tag
2429 f8a36e22 2021-08-26 stsp from the local repository's
2430 f8a36e22 2021-08-26 stsp .Dq refs/tags/
2431 f8a36e22 2021-08-26 stsp reference namespace, in addition to any branches that are being sent.
2432 f8a36e22 2021-08-26 stsp The
2433 f8a36e22 2021-08-26 stsp .Fl t
2434 f8a36e22 2021-08-26 stsp option may be specified multiple times to build a list of tags to send.
2435 f8a36e22 2021-08-26 stsp No tags will be sent if the
2436 f8a36e22 2021-08-26 stsp .Fl t
2437 f8a36e22 2021-08-26 stsp option is not used.
2438 f8a36e22 2021-08-26 stsp .Pp
2439 f8a36e22 2021-08-26 stsp Raise an error if the specified
2440 f8a36e22 2021-08-26 stsp .Ar tag
2441 f8a36e22 2021-08-26 stsp already exists in the remote repository, unless the
2442 f8a36e22 2021-08-26 stsp .Fl f
2443 93a300b2 2021-08-26 stsp option is used to overwrite the server's copy of the tag.
2444 f8a36e22 2021-08-26 stsp In general, creating a new tag with a different name is recommended
2445 f8a36e22 2021-08-26 stsp instead of overwriting an existing tag.
2446 f8a36e22 2021-08-26 stsp .Pp
2447 f8a36e22 2021-08-26 stsp Cannot be used together with the
2448 f8a36e22 2021-08-26 stsp .Fl T
2449 f8a36e22 2021-08-26 stsp option.
2450 f8a36e22 2021-08-26 stsp .It Fl v
2451 f8a36e22 2021-08-26 stsp Verbose mode.
2452 f8a36e22 2021-08-26 stsp Causes
2453 f8a36e22 2021-08-26 stsp .Cm got send
2454 f8a36e22 2021-08-26 stsp to print debugging messages to standard error output.
2455 f8a36e22 2021-08-26 stsp The same option will be passed to
2456 f8a36e22 2021-08-26 stsp .Xr ssh 1
2457 f8a36e22 2021-08-26 stsp if applicable.
2458 f8a36e22 2021-08-26 stsp Multiple -v options increase the verbosity.
2459 f8a36e22 2021-08-26 stsp The maximum is 3.
2460 f8a36e22 2021-08-26 stsp .El
2461 95f394e8 2021-10-04 kn .Tg cy
2462 9587e6cc 2023-01-28 mark .It Xo
2463 9587e6cc 2023-01-28 mark .Cm cherrypick
2464 9587e6cc 2023-01-28 mark .Op Fl lX
2465 555f1fe0 2023-01-28 stsp .Op Ar commit
2466 9587e6cc 2023-01-28 mark .Xc
2467 4683a10b 2021-11-04 kn .Dl Pq alias: Cm cy
2468 234035bc 2019-06-01 stsp Merge changes from a single
2469 234035bc 2019-06-01 stsp .Ar commit
2470 234035bc 2019-06-01 stsp into the work tree.
2471 234035bc 2019-06-01 stsp The specified
2472 234035bc 2019-06-01 stsp .Ar commit
2473 a16d97bd 2021-09-02 stsp should be on a different branch than the work tree's base commit.
2474 6b483b31 2023-07-18 stsp .Pp
2475 6b483b31 2023-07-18 stsp The expected argument is a commit ID SHA1 hash, or a reference name or
2476 6b483b31 2023-07-18 stsp keyword which will be resolved to a commit ID.
2477 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
2478 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
2479 6b483b31 2023-07-18 stsp The keywords
2480 c8d1a97c 2023-07-17 mark .Qq :base
2481 c8d1a97c 2023-07-17 mark and
2482 c8d1a97c 2023-07-17 mark .Qq :head
2483 6b483b31 2023-07-18 stsp resolve to the work tree's base commit and branch head, respectively.
2484 c8d1a97c 2023-07-17 mark Keywords and references may be appended with
2485 c8d1a97c 2023-07-17 mark .Qq :+
2486 c8d1a97c 2023-07-17 mark or
2487 c8d1a97c 2023-07-17 mark .Qq :-
2488 c8d1a97c 2023-07-17 mark modifiers and an optional integer N to denote the
2489 c8d1a97c 2023-07-17 mark Nth descendant or antecedent by first parent traversal, respectively;
2490 c8d1a97c 2023-07-17 mark for example,
2491 c8d1a97c 2023-07-17 mark .Sy :head:-2
2492 c8d1a97c 2023-07-17 mark denotes the work tree branch head's 2nd generation ancestor, and
2493 c8d1a97c 2023-07-17 mark .Sy :base:+4
2494 c8d1a97c 2023-07-17 mark denotes the 4th generation descendant of the work tree's base commit.
2495 c8d1a97c 2023-07-17 mark Similarly,
2496 c8d1a97c 2023-07-17 mark .Sy barbaz:+3
2497 c8d1a97c 2023-07-17 mark will denote the 3rd generation descendant of the commit resolved by the
2498 c8d1a97c 2023-07-17 mark .Qq barbaz
2499 c8d1a97c 2023-07-17 mark reference.
2500 c8d1a97c 2023-07-17 mark A
2501 c8d1a97c 2023-07-17 mark .Qq :+
2502 c8d1a97c 2023-07-17 mark or
2503 c8d1a97c 2023-07-17 mark .Qq :-
2504 c8d1a97c 2023-07-17 mark modifier without a trailing integer has an implicit
2505 c8d1a97c 2023-07-17 mark .Qq 1
2506 c8d1a97c 2023-07-17 mark appended
2507 c8d1a97c 2023-07-17 mark .Po e.g.,
2508 c8d1a97c 2023-07-17 mark .Sy :base:+
2509 c8d1a97c 2023-07-17 mark is equivalent to
2510 c8d1a97c 2023-07-17 mark .Sy :base:+1
2511 c8d1a97c 2023-07-17 mark .Pc .
2512 234035bc 2019-06-01 stsp .Pp
2513 234035bc 2019-06-01 stsp Show the status of each affected file, using the following status codes:
2514 234035bc 2019-06-01 stsp .Bl -column YXZ description
2515 234035bc 2019-06-01 stsp .It G Ta file was merged
2516 234035bc 2019-06-01 stsp .It C Ta file was merged and conflicts occurred during merge
2517 234035bc 2019-06-01 stsp .It ! Ta changes destined for a missing file were not merged
2518 234035bc 2019-06-01 stsp .It D Ta file was deleted
2519 f365d762 2021-09-24 stsp .It d Ta file's deletion was prevented by local modifications
2520 234035bc 2019-06-01 stsp .It A Ta new file was added
2521 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
2522 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
2523 74416c47 2019-05-09 stsp .El
2524 234035bc 2019-06-01 stsp .Pp
2525 234035bc 2019-06-01 stsp The merged changes will appear as local changes in the work tree, which
2526 234035bc 2019-06-01 stsp may be viewed with
2527 234035bc 2019-06-01 stsp .Cm got diff ,
2528 234035bc 2019-06-01 stsp amended manually or with further
2529 234035bc 2019-06-01 stsp .Cm got cherrypick
2530 bc3056e3 2019-08-18 stsp commands,
2531 234035bc 2019-06-01 stsp committed with
2532 4c16511c 2023-01-28 stsp .Cm got commit .
2533 4c16511c 2023-01-28 stsp .Pp
2534 4c16511c 2023-01-28 stsp If invoked in a work tree where no
2535 4c16511c 2023-01-28 stsp .Cm rebase ,
2536 4c16511c 2023-01-28 stsp .Cm histedit ,
2537 4c16511c 2023-01-28 stsp or
2538 4c16511c 2023-01-28 stsp .Cm merge
2539 4c16511c 2023-01-28 stsp operation is taking place,
2540 4c16511c 2023-01-28 stsp .Cm got cherrypick
2541 4c16511c 2023-01-28 stsp creates a record of commits which have been merged into the work tree.
2542 4c16511c 2023-01-28 stsp When a file changed by
2543 4c16511c 2023-01-28 stsp .Cm got cherrypick
2544 4c16511c 2023-01-28 stsp is committed with
2545 4c16511c 2023-01-28 stsp .Cm got commit ,
2546 4c16511c 2023-01-28 stsp the log messages of relevant merged commits will then appear in the editor,
2547 91a3781a 2023-02-09 stsp where the messages should be further adjusted to convey the reasons for
2548 8bf76af3 2023-01-28 stsp cherrypicking the changes.
2549 93436ccd 2023-02-10 mark Upon exiting the editor, if the time stamp of the log message file
2550 93436ccd 2023-02-10 mark is unchanged or the log message is empty,
2551 91a3781a 2023-02-09 stsp .Cm got commit
2552 93436ccd 2023-02-10 mark will fail with an unmodified or empty log message error.
2553 91a3781a 2023-02-09 stsp .Pp
2554 4c16511c 2023-01-28 stsp If all the changes in all files touched by a given commit are discarded,
2555 4c16511c 2023-01-28 stsp e.g. with
2556 4c16511c 2023-01-28 stsp .Cm got revert ,
2557 4c16511c 2023-01-28 stsp this commit's log message record will also disappear.
2558 234035bc 2019-06-01 stsp .Pp
2559 234035bc 2019-06-01 stsp .Cm got cherrypick
2560 234035bc 2019-06-01 stsp will refuse to run if certain preconditions are not met.
2561 e38d4cde 2022-03-21 naddy If the work tree contains multiple base commits, it must first be updated
2562 234035bc 2019-06-01 stsp to a single base commit with
2563 234035bc 2019-06-01 stsp .Cm got update .
2564 69de9dd4 2021-09-03 stsp If any relevant files already contain merge conflicts, these
2565 234035bc 2019-06-01 stsp conflicts must be resolved first.
2566 9587e6cc 2023-01-28 mark .Pp
2567 9587e6cc 2023-01-28 mark The options for
2568 9587e6cc 2023-01-28 mark .Nm
2569 9587e6cc 2023-01-28 mark .Cm cherrypick
2570 9587e6cc 2023-01-28 mark are as follows:
2571 9587e6cc 2023-01-28 mark .Bl -tag -width Ds
2572 9587e6cc 2023-01-28 mark .It Fl l
2573 9587e6cc 2023-01-28 mark Display a list of commit log messages recorded by cherrypick operations,
2574 9587e6cc 2023-01-28 mark represented by references in the
2575 9587e6cc 2023-01-28 mark .Dq refs/got/worktree
2576 9587e6cc 2023-01-28 mark reference namespace.
2577 9587e6cc 2023-01-28 mark If a
2578 9587e6cc 2023-01-28 mark .Ar commit
2579 9587e6cc 2023-01-28 mark is specified, only show the log message of the specified commit.
2580 9587e6cc 2023-01-28 mark .Pp
2581 9587e6cc 2023-01-28 mark If invoked in a work tree, only log messages recorded by cherrypick operations
2582 9587e6cc 2023-01-28 mark in the current work tree will be displayed.
2583 9587e6cc 2023-01-28 mark Otherwise, all commit log messages will be displayed irrespective of the
2584 9587e6cc 2023-01-28 mark work tree in which they were created.
2585 9587e6cc 2023-01-28 mark This option cannot be used with
2586 4c16511c 2023-01-28 stsp .Fl X .
2587 9587e6cc 2023-01-28 mark .It Fl X
2588 9587e6cc 2023-01-28 mark Delete log messages created by previous cherrypick operations, represented by
2589 9587e6cc 2023-01-28 mark references in the
2590 9587e6cc 2023-01-28 mark .Dq refs/got/worktree
2591 9587e6cc 2023-01-28 mark reference namespace.
2592 9587e6cc 2023-01-28 mark If a
2593 9587e6cc 2023-01-28 mark .Ar commit
2594 9587e6cc 2023-01-28 mark is specified, only delete the log message of the specified commit.
2595 9587e6cc 2023-01-28 mark .Pp
2596 9587e6cc 2023-01-28 mark If invoked in a work tree, only log messages recorded by cherrypick operations
2597 9587e6cc 2023-01-28 mark in the current work tree will be deleted.
2598 9587e6cc 2023-01-28 mark Otherwise, all commit log messages will be deleted irrespective of the
2599 9587e6cc 2023-01-28 mark work tree in which they were created.
2600 9587e6cc 2023-01-28 mark This option cannot be used with
2601 4c16511c 2023-01-28 stsp .Fl l .
2602 9587e6cc 2023-01-28 mark .El
2603 9587e6cc 2023-01-28 mark .Pp
2604 95f394e8 2021-10-04 kn .Tg bo
2605 9587e6cc 2023-01-28 mark .It Xo
2606 9587e6cc 2023-01-28 mark .Cm backout
2607 9587e6cc 2023-01-28 mark .Op Fl lX
2608 555f1fe0 2023-01-28 stsp .Op Ar commit
2609 9587e6cc 2023-01-28 mark .Xc
2610 4683a10b 2021-11-04 kn .Dl Pq alias: Cm bo
2611 5ef14e63 2019-06-02 stsp Reverse-merge changes from a single
2612 5ef14e63 2019-06-02 stsp .Ar commit
2613 5ef14e63 2019-06-02 stsp into the work tree.
2614 5ef14e63 2019-06-02 stsp The specified
2615 5ef14e63 2019-06-02 stsp .Ar commit
2616 a16d97bd 2021-09-02 stsp should be on the same branch as the work tree's base commit.
2617 6b483b31 2023-07-18 stsp .Pp
2618 6b483b31 2023-07-18 stsp The expected argument is a commit ID SHA1 hash, or a reference name
2619 6b483b31 2023-07-18 stsp or keyword which will be resolved to a commit ID.
2620 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
2621 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
2622 6b483b31 2023-07-18 stsp The keywords
2623 c8d1a97c 2023-07-17 mark .Qq :base
2624 c8d1a97c 2023-07-17 mark and
2625 c8d1a97c 2023-07-17 mark .Qq :head
2626 6b483b31 2023-07-18 stsp resolve to the work tree's base commit and branch head, respectively.
2627 c8d1a97c 2023-07-17 mark Keywords and references may be appended with
2628 c8d1a97c 2023-07-17 mark .Qq :+
2629 c8d1a97c 2023-07-17 mark or
2630 c8d1a97c 2023-07-17 mark .Qq :-
2631 c8d1a97c 2023-07-17 mark modifiers and an optional integer N to denote the
2632 c8d1a97c 2023-07-17 mark Nth descendant or antecedent by first parent traversal, respectively;
2633 c8d1a97c 2023-07-17 mark for example,
2634 c8d1a97c 2023-07-17 mark .Sy :head:-2
2635 c8d1a97c 2023-07-17 mark denotes the work tree branch head's 2nd generation ancestor, and
2636 c8d1a97c 2023-07-17 mark .Sy :base:+4
2637 c8d1a97c 2023-07-17 mark denotes the 4th generation descendant of the work tree's base commit.
2638 c8d1a97c 2023-07-17 mark Similarly,
2639 c8d1a97c 2023-07-17 mark .Sy wip:+5
2640 c8d1a97c 2023-07-17 mark will denote the 5th generation descendant of the commit resolved by the
2641 c8d1a97c 2023-07-17 mark .Qq wip
2642 c8d1a97c 2023-07-17 mark reference.
2643 c8d1a97c 2023-07-17 mark A
2644 c8d1a97c 2023-07-17 mark .Qq :+
2645 c8d1a97c 2023-07-17 mark or
2646 c8d1a97c 2023-07-17 mark .Qq :-
2647 c8d1a97c 2023-07-17 mark modifier without a trailing integer has an implicit
2648 c8d1a97c 2023-07-17 mark .Qq 1
2649 c8d1a97c 2023-07-17 mark appended
2650 c8d1a97c 2023-07-17 mark .Po e.g.,
2651 c8d1a97c 2023-07-17 mark .Sy :base:+
2652 c8d1a97c 2023-07-17 mark is equivalent to
2653 c8d1a97c 2023-07-17 mark .Sy :base:+1
2654 c8d1a97c 2023-07-17 mark .Pc .
2655 c8d1a97c 2023-07-17 mark .Pp
2656 5ef14e63 2019-06-02 stsp Show the status of each affected file, using the following status codes:
2657 5ef14e63 2019-06-02 stsp .Bl -column YXZ description
2658 5ef14e63 2019-06-02 stsp .It G Ta file was merged
2659 5ef14e63 2019-06-02 stsp .It C Ta file was merged and conflicts occurred during merge
2660 5ef14e63 2019-06-02 stsp .It ! Ta changes destined for a missing file were not merged
2661 5ef14e63 2019-06-02 stsp .It D Ta file was deleted
2662 f365d762 2021-09-24 stsp .It d Ta file's deletion was prevented by local modifications
2663 5ef14e63 2019-06-02 stsp .It A Ta new file was added
2664 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
2665 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
2666 234035bc 2019-06-01 stsp .El
2667 5ef14e63 2019-06-02 stsp .Pp
2668 5ef14e63 2019-06-02 stsp The reverse-merged changes will appear as local changes in the work tree,
2669 5ef14e63 2019-06-02 stsp which may be viewed with
2670 5ef14e63 2019-06-02 stsp .Cm got diff ,
2671 5ef14e63 2019-06-02 stsp amended manually or with further
2672 778a73c2 2019-07-12 stsp .Cm got backout
2673 bc3056e3 2019-08-18 stsp commands,
2674 5ef14e63 2019-06-02 stsp committed with
2675 4c16511c 2023-01-28 stsp .Cm got commit .
2676 4c16511c 2023-01-28 stsp .Pp
2677 4c16511c 2023-01-28 stsp If invoked in a work tree where no
2678 4c16511c 2023-01-28 stsp .Cm rebase ,
2679 4c16511c 2023-01-28 stsp .Cm histedit ,
2680 4c16511c 2023-01-28 stsp or
2681 4c16511c 2023-01-28 stsp .Cm merge
2682 4c16511c 2023-01-28 stsp operation is taking place,
2683 4c16511c 2023-01-28 stsp .Cm got backout
2684 4c16511c 2023-01-28 stsp creates a record of commits which have been reverse-merged into the work tree.
2685 4c16511c 2023-01-28 stsp When a file changed by
2686 4c16511c 2023-01-28 stsp .Cm got backout
2687 4c16511c 2023-01-28 stsp is committed with
2688 4c16511c 2023-01-28 stsp .Cm got commit ,
2689 4c16511c 2023-01-28 stsp the log messages of relevant reverse-merged commits will then appear in
2690 91a3781a 2023-02-09 stsp the editor, where the messages should be further adjusted to convey the
2691 8bf76af3 2023-01-28 stsp reasons for backing out the changes.
2692 93436ccd 2023-02-10 mark Upon exiting the editor, if the time stamp of the log message file
2693 93436ccd 2023-02-10 mark is unchanged or the log message is empty,
2694 91a3781a 2023-02-09 stsp .Cm got commit
2695 93436ccd 2023-02-10 mark will fail with an unmodified or empty log message error.
2696 91a3781a 2023-02-09 stsp .Pp
2697 4c16511c 2023-01-28 stsp If all the changes in all files touched by a given commit are discarded,
2698 4c16511c 2023-01-28 stsp e.g. with
2699 4c16511c 2023-01-28 stsp .Cm got revert ,
2700 4c16511c 2023-01-28 stsp this commit's log message record will also disappear.
2701 5ef14e63 2019-06-02 stsp .Pp
2702 92228c38 2019-06-02 stsp .Cm got backout
2703 92228c38 2019-06-02 stsp will refuse to run if certain preconditions are not met.
2704 e38d4cde 2022-03-21 naddy If the work tree contains multiple base commits, it must first be updated
2705 92228c38 2019-06-02 stsp to a single base commit with
2706 92228c38 2019-06-02 stsp .Cm got update .
2707 69de9dd4 2021-09-03 stsp If any relevant files already contain merge conflicts, these
2708 92228c38 2019-06-02 stsp conflicts must be resolved first.
2709 9587e6cc 2023-01-28 mark .Pp
2710 9587e6cc 2023-01-28 mark The options for
2711 9587e6cc 2023-01-28 mark .Nm
2712 9587e6cc 2023-01-28 mark .Cm backout
2713 9587e6cc 2023-01-28 mark are as follows:
2714 9587e6cc 2023-01-28 mark .Bl -tag -width Ds
2715 9587e6cc 2023-01-28 mark .It Fl l
2716 9587e6cc 2023-01-28 mark Display a list of commit log messages recorded by backout operations,
2717 9587e6cc 2023-01-28 mark represented by references in the
2718 9587e6cc 2023-01-28 mark .Dq refs/got/worktree
2719 9587e6cc 2023-01-28 mark reference namespace.
2720 9587e6cc 2023-01-28 mark If a
2721 9587e6cc 2023-01-28 mark .Ar commit
2722 9587e6cc 2023-01-28 mark is specified, only show the log message of the specified commit.
2723 9587e6cc 2023-01-28 mark .Pp
2724 9587e6cc 2023-01-28 mark If invoked in a work tree, only log messages recorded by backout operations
2725 9587e6cc 2023-01-28 mark in the current work tree will be displayed.
2726 9587e6cc 2023-01-28 mark Otherwise, all commit log messages will be displayed irrespective of the
2727 9587e6cc 2023-01-28 mark work tree in which they were created.
2728 9587e6cc 2023-01-28 mark This option cannot be used with
2729 4c16511c 2023-01-28 stsp .Fl X .
2730 9587e6cc 2023-01-28 mark .It Fl X
2731 9587e6cc 2023-01-28 mark Delete log messages created by previous backout operations, represented by
2732 9587e6cc 2023-01-28 mark references in the
2733 9587e6cc 2023-01-28 mark .Dq refs/got/worktree
2734 9587e6cc 2023-01-28 mark reference namespace.
2735 9587e6cc 2023-01-28 mark If a
2736 9587e6cc 2023-01-28 mark .Ar commit
2737 9587e6cc 2023-01-28 mark is specified, only delete the log message of the specified commit.
2738 9587e6cc 2023-01-28 mark .Pp
2739 9587e6cc 2023-01-28 mark If invoked in a work tree, only log messages recorded by backout operations
2740 9587e6cc 2023-01-28 mark in the current work tree will be deleted.
2741 9587e6cc 2023-01-28 mark Otherwise, all commit log messages will be deleted irrespective of the
2742 9587e6cc 2023-01-28 mark work tree in which they were created.
2743 9587e6cc 2023-01-28 mark This option cannot be used with
2744 4c16511c 2023-01-28 stsp .Fl l .
2745 9587e6cc 2023-01-28 mark .El
2746 9587e6cc 2023-01-28 mark .Pp
2747 95f394e8 2021-10-04 kn .Tg rb
2748 5fc4f020 2022-08-30 op .It Xo
2749 5fc4f020 2022-08-30 op .Cm rebase
2750 12383673 2023-02-18 mark .Op Fl aCclX
2751 5fc4f020 2022-08-30 op .Op Ar branch
2752 5fc4f020 2022-08-30 op .Xc
2753 4683a10b 2021-11-04 kn .Dl Pq alias: Cm rb
2754 818c7501 2019-07-11 stsp Rebase commits on the specified
2755 818c7501 2019-07-11 stsp .Ar branch
2756 818c7501 2019-07-11 stsp onto the tip of the current branch of the work tree.
2757 818c7501 2019-07-11 stsp The
2758 818c7501 2019-07-11 stsp .Ar branch
2759 818c7501 2019-07-11 stsp must share common ancestry with the work tree's current branch.
2760 bc3056e3 2019-08-18 stsp Rebasing begins with the first descendant commit of the youngest
2761 f09e2405 2019-07-11 stsp common ancestor commit shared by the specified
2762 818c7501 2019-07-11 stsp .Ar branch
2763 818c7501 2019-07-11 stsp and the work tree's current branch, and stops once the tip commit
2764 f09e2405 2019-07-11 stsp of the specified
2765 818c7501 2019-07-11 stsp .Ar branch
2766 f09e2405 2019-07-11 stsp has been rebased.
2767 818c7501 2019-07-11 stsp .Pp
2768 2b6826ba 2020-02-24 stsp When
2769 2b6826ba 2020-02-24 stsp .Cm got rebase
2770 2b6826ba 2020-02-24 stsp is used as intended, the specified
2771 2b6826ba 2020-02-24 stsp .Ar branch
2772 c10890ce 2020-02-25 stsp represents a local commit history and may already contain changes
2773 c10890ce 2020-02-25 stsp that are not yet visible in any other repositories.
2774 2b6826ba 2020-02-24 stsp The work tree's current branch, which must be set with
2775 2b6826ba 2020-02-24 stsp .Cm got update -b
2776 2b6826ba 2020-02-24 stsp before starting the
2777 2b6826ba 2020-02-24 stsp .Cm rebase
2778 2b6826ba 2020-02-24 stsp operation, represents a branch from a remote repository which shares
2779 2b6826ba 2020-02-24 stsp a common history with the specified
2780 2b6826ba 2020-02-24 stsp .Ar branch
2781 c10890ce 2020-02-25 stsp but has progressed, and perhaps diverged, due to commits added to the
2782 c10890ce 2020-02-25 stsp remote repository.
2783 2b6826ba 2020-02-24 stsp .Pp
2784 c6b4581b 2019-07-28 stsp Rebased commits are accumulated on a temporary branch which the work tree
2785 c6b4581b 2019-07-28 stsp will remain switched to throughout the entire rebase operation.
2786 c6b4581b 2019-07-28 stsp Commits on this branch represent the same changes with the same log
2787 c6b4581b 2019-07-28 stsp messages as their counterparts on the original
2788 818c7501 2019-07-11 stsp .Ar branch ,
2789 818c7501 2019-07-11 stsp but with different commit IDs.
2790 818c7501 2019-07-11 stsp Once rebasing has completed successfully, the temporary branch becomes
2791 f09e2405 2019-07-11 stsp the new version of the specified
2792 818c7501 2019-07-11 stsp .Ar branch
2793 818c7501 2019-07-11 stsp and the work tree is automatically switched to it.
2794 7f5531cd 2022-07-22 stsp If author information is available via the
2795 7f5531cd 2022-07-22 stsp .Ev GOT_AUTHOR
2796 7f5531cd 2022-07-22 stsp environment variable,
2797 7f5531cd 2022-07-22 stsp .Xr got.conf 5
2798 7f5531cd 2022-07-22 stsp or Git's
2799 7f5531cd 2022-07-22 stsp .Dv user.name
2800 7f5531cd 2022-07-22 stsp and
2801 7f5531cd 2022-07-22 stsp .Dv user.email
2802 7f5531cd 2022-07-22 stsp configuration settings, this author information will be used to identify
2803 7f5531cd 2022-07-22 stsp the
2804 7f5531cd 2022-07-22 stsp .Dq committer
2805 7f5531cd 2022-07-22 stsp of rebased commits.
2806 e600f124 2021-03-21 stsp .Pp
2807 1795b260 2021-04-02 kn Old commits in their pre-rebase state are automatically backed up in the
2808 e600f124 2021-03-21 stsp .Dq refs/got/backup/rebase
2809 e600f124 2021-03-21 stsp reference namespace.
2810 e600f124 2021-03-21 stsp As long as these references are not removed older versions of rebased
2811 e600f124 2021-03-21 stsp commits will remain in the repository and can be viewed with the
2812 e600f124 2021-03-21 stsp .Cm got rebase -l
2813 e600f124 2021-03-21 stsp command.
2814 e600f124 2021-03-21 stsp Removal of these references makes objects which become unreachable via
2815 e6786710 2021-07-03 stsp any reference subject to removal by Git's garbage collector or
2816 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
2817 818c7501 2019-07-11 stsp .Pp
2818 818c7501 2019-07-11 stsp While rebasing commits, show the status of each affected file,
2819 818c7501 2019-07-11 stsp using the following status codes:
2820 818c7501 2019-07-11 stsp .Bl -column YXZ description
2821 818c7501 2019-07-11 stsp .It G Ta file was merged
2822 818c7501 2019-07-11 stsp .It C Ta file was merged and conflicts occurred during merge
2823 818c7501 2019-07-11 stsp .It ! Ta changes destined for a missing file were not merged
2824 818c7501 2019-07-11 stsp .It D Ta file was deleted
2825 f365d762 2021-09-24 stsp .It d Ta file's deletion was prevented by local modifications
2826 818c7501 2019-07-11 stsp .It A Ta new file was added
2827 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
2828 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
2829 5ef14e63 2019-06-02 stsp .El
2830 818c7501 2019-07-11 stsp .Pp
2831 e38d4cde 2022-03-21 naddy If merge conflicts occur, the rebase operation is interrupted and may
2832 f09e2405 2019-07-11 stsp be continued once conflicts have been resolved.
2833 1fa49072 2021-09-28 stsp If any files with destined changes are found to be missing or unversioned,
2834 1fa49072 2021-09-28 stsp or if files could not be deleted due to differences in deleted content,
2835 1fa49072 2021-09-28 stsp the rebase operation will be interrupted to prevent potentially incomplete
2836 1fa49072 2021-09-28 stsp changes from being committed to the repository without user intervention.
2837 1fa49072 2021-09-28 stsp The work tree may be modified as desired and the rebase operation can be
2838 1fa49072 2021-09-28 stsp continued once the changes present in the work tree are considered complete.
2839 818c7501 2019-07-11 stsp Alternatively, the rebase operation may be aborted which will leave
2840 818c7501 2019-07-11 stsp .Ar branch
2841 818c7501 2019-07-11 stsp unmodified and the work tree switched back to its original branch.
2842 818c7501 2019-07-11 stsp .Pp
2843 ff0d2220 2019-07-11 stsp If a merge conflict is resolved in a way which renders the merged
2844 f09e2405 2019-07-11 stsp change into a no-op change, the corresponding commit will be elided
2845 f09e2405 2019-07-11 stsp when the rebase operation continues.
2846 ff0d2220 2019-07-11 stsp .Pp
2847 818c7501 2019-07-11 stsp .Cm got rebase
2848 818c7501 2019-07-11 stsp will refuse to run if certain preconditions are not met.
2849 442ede73 2022-09-04 stsp If the
2850 442ede73 2022-09-04 stsp .Ar branch
2851 442ede73 2022-09-04 stsp is not in the
2852 442ede73 2022-09-04 stsp .Dq refs/heads/
2853 442ede73 2022-09-04 stsp reference namespace, the branch may not be rebased.
2854 a85446b2 2020-01-04 stsp If the work tree is not yet fully updated to the tip commit of its
2855 e38d4cde 2022-03-21 naddy branch, then the work tree must first be updated with
2856 818c7501 2019-07-11 stsp .Cm got update .
2857 4ed9f614 2019-08-04 stsp If changes have been staged with
2858 4ed9f614 2019-08-04 stsp .Cm got stage ,
2859 bc3056e3 2019-08-18 stsp these changes must first be committed with
2860 4ed9f614 2019-08-04 stsp .Cm got commit
2861 4ed9f614 2019-08-04 stsp or unstaged with
2862 4ed9f614 2019-08-04 stsp .Cm got unstage .
2863 f09e2405 2019-07-11 stsp If the work tree contains local changes, these changes must first be
2864 f09e2405 2019-07-11 stsp committed with
2865 f09e2405 2019-07-11 stsp .Cm got commit
2866 f09e2405 2019-07-11 stsp or reverted with
2867 f09e2405 2019-07-11 stsp .Cm got revert .
2868 64c6d990 2019-07-11 stsp If the
2869 64c6d990 2019-07-11 stsp .Ar branch
2870 64c6d990 2019-07-11 stsp contains changes to files outside of the work tree's path prefix,
2871 64c6d990 2019-07-11 stsp the work tree cannot be used to rebase this branch.
2872 818c7501 2019-07-11 stsp .Pp
2873 7d5807f4 2019-07-11 stsp The
2874 dae92a24 2023-01-08 stsp .Cm got update ,
2875 dae92a24 2023-01-08 stsp .Cm got integrate ,
2876 dae92a24 2023-01-08 stsp .Cm got merge ,
2877 dae92a24 2023-01-08 stsp .Cm got commit ,
2878 7d5807f4 2019-07-11 stsp and
2879 dae92a24 2023-01-08 stsp .Cm got histedit
2880 7d5807f4 2019-07-11 stsp commands will refuse to run while a rebase operation is in progress.
2881 7d5807f4 2019-07-11 stsp Other commands which manipulate the work tree may be used for
2882 7d5807f4 2019-07-11 stsp conflict resolution purposes.
2883 818c7501 2019-07-11 stsp .Pp
2884 2af61735 2021-11-03 stsp If the specified
2885 2af61735 2021-11-03 stsp .Ar branch
2886 e38d4cde 2022-03-21 naddy is already based on the work tree's current branch, then no commits
2887 2af61735 2021-11-03 stsp need to be rebased and
2888 2af61735 2021-11-03 stsp .Cm got rebase
2889 2af61735 2021-11-03 stsp will simply switch the work tree to the specified
2890 2af61735 2021-11-03 stsp .Ar branch
2891 2af61735 2021-11-03 stsp and update files in the work tree accordingly.
2892 2af61735 2021-11-03 stsp .Pp
2893 818c7501 2019-07-11 stsp The options for
2894 818c7501 2019-07-11 stsp .Cm got rebase
2895 818c7501 2019-07-11 stsp are as follows:
2896 818c7501 2019-07-11 stsp .Bl -tag -width Ds
2897 818c7501 2019-07-11 stsp .It Fl a
2898 818c7501 2019-07-11 stsp Abort an interrupted rebase operation.
2899 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
2900 12383673 2023-02-18 mark .It Fl C
2901 12383673 2023-02-18 mark Allow a rebase operation to continue with files in conflicted status.
2902 12383673 2023-02-18 mark This option should generally be avoided, and can only be used with the
2903 12383673 2023-02-18 mark .Fl c
2904 12383673 2023-02-18 mark option.
2905 818c7501 2019-07-11 stsp .It Fl c
2906 06067b48 2019-07-11 stsp Continue an interrupted rebase operation.
2907 a6c2ea42 2023-07-01 falsifian If this option is used, no other command-line arguments are allowed except
2908 a6c2ea42 2023-07-01 falsifian .Fl C .
2909 e600f124 2021-03-21 stsp .It Fl l
2910 e600f124 2021-03-21 stsp Show a list of past rebase operations, represented by references in the
2911 e600f124 2021-03-21 stsp .Dq refs/got/backup/rebase
2912 e600f124 2021-03-21 stsp reference namespace.
2913 e600f124 2021-03-21 stsp .Pp
2914 e600f124 2021-03-21 stsp Display the author, date, and log message of each backed up commit,
2915 e600f124 2021-03-21 stsp the object ID of the corresponding post-rebase commit, and
2916 e600f124 2021-03-21 stsp the object ID of their common ancestor commit.
2917 e600f124 2021-03-21 stsp Given these object IDs,
2918 e600f124 2021-03-21 stsp the
2919 e600f124 2021-03-21 stsp .Cm got log
2920 e600f124 2021-03-21 stsp command with the
2921 e600f124 2021-03-21 stsp .Fl c
2922 e600f124 2021-03-21 stsp and
2923 e600f124 2021-03-21 stsp .Fl x
2924 e600f124 2021-03-21 stsp options can be used to examine the history of either version of the branch,
2925 e600f124 2021-03-21 stsp and the
2926 e600f124 2021-03-21 stsp .Cm got branch
2927 e600f124 2021-03-21 stsp command with the
2928 e600f124 2021-03-21 stsp .Fl c
2929 e600f124 2021-03-21 stsp option can be used to create a new branch from a pre-rebase state if desired.
2930 e600f124 2021-03-21 stsp .Pp
2931 e600f124 2021-03-21 stsp If a
2932 e600f124 2021-03-21 stsp .Ar branch
2933 e600f124 2021-03-21 stsp is specified, only show commits which at some point in time represented this
2934 e600f124 2021-03-21 stsp branch.
2935 e600f124 2021-03-21 stsp Otherwise, list all backed up commits for any branches.
2936 e600f124 2021-03-21 stsp .Pp
2937 e600f124 2021-03-21 stsp If this option is used,
2938 e600f124 2021-03-21 stsp .Cm got rebase
2939 e600f124 2021-03-21 stsp does not require a work tree.
2940 e600f124 2021-03-21 stsp None of the other options can be used together with
2941 e600f124 2021-03-21 stsp .Fl l .
2942 643b85bc 2021-07-16 stsp .It Fl X
2943 643b85bc 2021-07-16 stsp Delete backups created by past rebase operations, represented by references
2944 643b85bc 2021-07-16 stsp in the
2945 643b85bc 2021-07-16 stsp .Dq refs/got/backup/rebase
2946 643b85bc 2021-07-16 stsp reference namespace.
2947 643b85bc 2021-07-16 stsp .Pp
2948 643b85bc 2021-07-16 stsp If a
2949 643b85bc 2021-07-16 stsp .Ar branch
2950 643b85bc 2021-07-16 stsp is specified, only delete backups which at some point in time represented
2951 643b85bc 2021-07-16 stsp this branch.
2952 643b85bc 2021-07-16 stsp Otherwise, delete all references found within
2953 643b85bc 2021-07-16 stsp .Dq refs/got/backup/rebase .
2954 643b85bc 2021-07-16 stsp .Pp
2955 643b85bc 2021-07-16 stsp Any commit, tree, tag, and blob objects belonging to deleted backups
2956 643b85bc 2021-07-16 stsp remain in the repository and may be removed separately with
2957 643b85bc 2021-07-16 stsp Git's garbage collector or
2958 643b85bc 2021-07-16 stsp .Cm gotadmin cleanup .
2959 643b85bc 2021-07-16 stsp .Pp
2960 643b85bc 2021-07-16 stsp If this option is used,
2961 643b85bc 2021-07-16 stsp .Cm got rebase
2962 643b85bc 2021-07-16 stsp does not require a work tree.
2963 643b85bc 2021-07-16 stsp None of the other options can be used together with
2964 643b85bc 2021-07-16 stsp .Fl X .
2965 818c7501 2019-07-11 stsp .El
2966 95f394e8 2021-10-04 kn .Tg he
2967 5fc4f020 2022-08-30 op .It Xo
2968 5fc4f020 2022-08-30 op .Cm histedit
2969 12383673 2023-02-18 mark .Op Fl aCcdeflmX
2970 5fc4f020 2022-08-30 op .Op Fl F Ar histedit-script
2971 5fc4f020 2022-08-30 op .Op Ar branch
2972 5fc4f020 2022-08-30 op .Xc
2973 4683a10b 2021-11-04 kn .Dl Pq alias: Cm he
2974 0ebf8283 2019-07-24 stsp Edit commit history between the work tree's current base commit and
2975 0ebf8283 2019-07-24 stsp the tip commit of the work tree's current branch.
2976 7f5531cd 2022-07-22 stsp .Pp
2977 7f5531cd 2022-07-22 stsp The
2978 7f5531cd 2022-07-22 stsp .Cm got histedit
2979 7f5531cd 2022-07-22 stsp command requires the
2980 7f5531cd 2022-07-22 stsp .Ev GOT_AUTHOR
2981 7f5531cd 2022-07-22 stsp environment variable to be set,
2982 7f5531cd 2022-07-22 stsp unless an author has been configured in
2983 7f5531cd 2022-07-22 stsp .Xr got.conf 5
2984 7f5531cd 2022-07-22 stsp or Git's
2985 7f5531cd 2022-07-22 stsp .Dv user.name
2986 7f5531cd 2022-07-22 stsp and
2987 7f5531cd 2022-07-22 stsp .Dv user.email
2988 7f5531cd 2022-07-22 stsp configuration settings can be obtained from the repository's
2989 7f5531cd 2022-07-22 stsp .Pa .git/config
2990 7f5531cd 2022-07-22 stsp file or from Git's global
2991 7f5531cd 2022-07-22 stsp .Pa ~/.gitconfig
2992 7f5531cd 2022-07-22 stsp configuration file.
2993 6e54d307 2020-02-24 stsp .Pp
2994 6e54d307 2020-02-24 stsp Before starting a
2995 6e54d307 2020-02-24 stsp .Cm histedit
2996 e38d4cde 2022-03-21 naddy operation, the work tree's current branch must be set with
2997 6e54d307 2020-02-24 stsp .Cm got update -b
2998 6e54d307 2020-02-24 stsp to the branch which should be edited, unless this branch is already the
2999 6e54d307 2020-02-24 stsp current branch of the work tree.
3000 6e54d307 2020-02-24 stsp The tip of this branch represents the upper bound (inclusive) of commits
3001 6e54d307 2020-02-24 stsp touched by the
3002 6e54d307 2020-02-24 stsp .Cm histedit
3003 6e54d307 2020-02-24 stsp operation.
3004 0ebf8283 2019-07-24 stsp .Pp
3005 6e54d307 2020-02-24 stsp Furthermore, the work tree's base commit
3006 6e54d307 2020-02-24 stsp must be set with
3007 6e54d307 2020-02-24 stsp .Cm got update -c
3008 6e54d307 2020-02-24 stsp to a point in this branch's commit history where editing should begin.
3009 6e54d307 2020-02-24 stsp This commit represents the lower bound (non-inclusive) of commits touched
3010 6e54d307 2020-02-24 stsp by the
3011 6e54d307 2020-02-24 stsp .Cm histedit
3012 6e54d307 2020-02-24 stsp operation.
3013 6e54d307 2020-02-24 stsp .Pp
3014 0ebf8283 2019-07-24 stsp Editing of commit history is controlled via a
3015 0ebf8283 2019-07-24 stsp .Ar histedit script
3016 46fa4c83 2020-02-24 stsp which can be written in an editor based on a template, passed on the
3017 46fa4c83 2020-02-24 stsp command line, or generated with the
3018 e02ef427 2023-02-27 stsp .Fl d ,
3019 e02ef427 2023-02-27 stsp .Fl e ,
3020 e02ef427 2023-02-27 stsp .Fl f ,
3021 466785b9 2020-12-10 jrick or
3022 083957f4 2020-02-24 stsp .Fl m
3023 466785b9 2020-12-10 jrick options.
3024 ee27b57e 2023-07-15 naddy Quitting the editor without saving the file will abort the histedit operation.
3025 083957f4 2020-02-24 stsp .Pp
3026 0ebf8283 2019-07-24 stsp The format of the histedit script is line-based.
3027 0ebf8283 2019-07-24 stsp Each line in the script begins with a command name, followed by
3028 0ebf8283 2019-07-24 stsp whitespace and an argument.
3029 0ebf8283 2019-07-24 stsp For most commands, the expected argument is a commit ID SHA1 hash.
3030 0ebf8283 2019-07-24 stsp Any remaining text on the line is ignored.
3031 0ebf8283 2019-07-24 stsp Lines which begin with the
3032 0ebf8283 2019-07-24 stsp .Sq #
3033 0ebf8283 2019-07-24 stsp character are ignored entirely.
3034 0ebf8283 2019-07-24 stsp .Pp
3035 d42bbff9 2022-07-12 stsp The available histedit script commands are as follows:
3036 0ebf8283 2019-07-24 stsp .Bl -column YXZ pick-commit
3037 d42bbff9 2022-07-12 stsp .It Cm pick Ar commit Ta Use the specified commit as it is.
3038 6685e2e8 2023-02-27 stsp .It Cm edit Ar commit Ta Apply the changes from the specified commit, but
3039 6685e2e8 2023-02-27 stsp then interrupt the histedit operation for amending, without creating a commit.
3040 456d8970 2023-02-27 stsp While the histedit operation is interrupted arbitrary files may be edited,
3041 456d8970 2023-02-27 stsp and commands which manipulate the work tree can be used freely.
3042 456d8970 2023-02-27 stsp The
3043 456d8970 2023-02-27 stsp .Cm got add
3044 456d8970 2023-02-27 stsp and
3045 456d8970 2023-02-27 stsp .Cm got remove
3046 456d8970 2023-02-27 stsp commands can be used to add new files or remove existing ones.
3047 456d8970 2023-02-27 stsp The
3048 456d8970 2023-02-27 stsp .Cm got revert -p
3049 456d8970 2023-02-27 stsp command can be used to eliminate arbitrary changes from files in the work tree.
3050 456d8970 2023-02-27 stsp The
3051 456d8970 2023-02-27 stsp .Cm got stage -p
3052 456d8970 2023-02-27 stsp command may be used to prepare a subset of changes for inclusion in the
3053 456d8970 2023-02-27 stsp next commit.
3054 456d8970 2023-02-27 stsp Finally, the
3055 456d8970 2023-02-27 stsp .Cm got commit
3056 456d8970 2023-02-27 stsp command can be used to insert arbitrary commits into the edited history.
3057 456d8970 2023-02-27 stsp Regular editing of history must eventually be resumed by running
3058 456d8970 2023-02-27 stsp .Cm got histedit -c .
3059 d42bbff9 2022-07-12 stsp .It Cm fold Ar commit Ta Combine the specified commit with the next commit
3060 0ebf8283 2019-07-24 stsp listed further below that will be used.
3061 d42bbff9 2022-07-12 stsp .It Cm drop Ar commit Ta Remove this commit from the edited history.
3062 14eb0fef 2023-10-26 stsp .It Cm mesg Ar commit Ta Open an editor to create a new log message for this
3063 14eb0fef 2023-10-26 stsp commit.
3064 0ebf8283 2019-07-24 stsp .El
3065 0ebf8283 2019-07-24 stsp .Pp
3066 ba67992e 2019-07-25 stsp Every commit in the history being edited must be mentioned in the script.
3067 0ebf8283 2019-07-24 stsp Lines may be re-ordered to change the order of commits in the edited history.
3068 5b87815e 2020-03-05 stsp No commit may be listed more than once.
3069 0ebf8283 2019-07-24 stsp .Pp
3070 c6b4581b 2019-07-28 stsp Edited commits are accumulated on a temporary branch which the work tree
3071 c6b4581b 2019-07-28 stsp will remain switched to throughout the entire histedit operation.
3072 0ebf8283 2019-07-24 stsp Once history editing has completed successfully, the temporary branch becomes
3073 498a90b7 2019-07-25 stsp the new version of the work tree's branch and the work tree is automatically
3074 498a90b7 2019-07-25 stsp switched to it.
3075 0ebf8283 2019-07-24 stsp .Pp
3076 1795b260 2021-04-02 kn Old commits in their pre-histedit state are automatically backed up in the
3077 e600f124 2021-03-21 stsp .Dq refs/got/backup/histedit
3078 e600f124 2021-03-21 stsp reference namespace.
3079 e600f124 2021-03-21 stsp As long as these references are not removed older versions of edited </