Blame


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