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