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