Blame


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