Blame


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