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