Blame


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