Blame


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