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 5c860e29 2018-03-12 stsp .Ar command
26 1b6b95a8 2018-03-12 stsp .Op Fl h
27 5c860e29 2018-03-12 stsp .Op Ar arg ...
28 5c860e29 2018-03-12 stsp .Sh DESCRIPTION
29 5c860e29 2018-03-12 stsp .Nm
30 4dfb2f0f 2019-03-26 stsp is a version control system which stores the history of tracked files
31 4dfb2f0f 2019-03-26 stsp in a Git repository, as used by the Git version control system.
32 285dc8a4 2018-03-13 stsp This repository format is described in
33 5e5560e1 2018-08-01 stsp .Xr git-repository 5 .
34 285dc8a4 2018-03-13 stsp .Pp
35 4129c201 2018-03-13 stsp .Nm
36 4129c201 2018-03-13 stsp is a
37 ae73e26f 2019-03-26 stsp .Dq distributed
38 4129c201 2018-03-13 stsp version control system because every copy of a repository is writeable.
39 4129c201 2018-03-13 stsp Modifications made to files can be synchronized between repositories
40 97925469 2018-03-17 stsp at any time.
41 4129c201 2018-03-13 stsp .Pp
42 285dc8a4 2018-03-13 stsp Files managed by
43 285dc8a4 2018-03-13 stsp .Nm
44 4129c201 2018-03-13 stsp must be checked out from the repository for modification.
45 285dc8a4 2018-03-13 stsp Checked out files are stored in a
46 285dc8a4 2018-03-13 stsp .Em work tree
47 c5867b47 2018-03-13 stsp which can be placed at an arbitrary directory in the filesystem hierarchy.
48 fb2921d0 2019-03-26 stsp The on-disk format of this work tree is described in
49 285dc8a4 2018-03-13 stsp .Xr got-worktree 5 .
50 285dc8a4 2018-03-13 stsp .Pp
51 285dc8a4 2018-03-13 stsp .Nm
52 285dc8a4 2018-03-13 stsp provides global and command-specific options.
53 bc3056e3 2019-08-18 stsp Global options must precede the command name, and are as follows:
54 1b6b95a8 2018-03-12 stsp .Bl -tag -width tenletters
55 1b6b95a8 2018-03-12 stsp .It Fl h
56 fef8a0d3 2019-08-04 stsp Display usage information and exit immediately.
57 1795b260 2021-04-02 kn .It Fl V , -version
58 53ccebc2 2019-07-30 stsp Display program version and exit immediately.
59 1b6b95a8 2018-03-12 stsp .El
60 1b6b95a8 2018-03-12 stsp .Pp
61 38e11793 2018-06-13 stsp The commands for
62 38e11793 2018-06-13 stsp .Nm
63 38e11793 2018-06-13 stsp are as follows:
64 0bb8a95e 2018-03-12 stsp .Bl -tag -width checkout
65 e8aa341a 2021-10-08 thomas .Tg im
66 dfc23429 2019-08-11 stsp .It Cm import Oo Fl b Ar branch Oc Oo Fl m Ar message Oc Oo Fl r Ar repository-path Oc Oo Fl I Ar pattern Oc Ar directory
67 d912d125 2021-11-04 thomas .Dl Pq alias: Cm im
68 3ce1b845 2019-07-15 stsp Create an initial commit in a repository from the file hierarchy
69 3ce1b845 2019-07-15 stsp within the specified
70 3ce1b845 2019-07-15 stsp .Ar directory .
71 3ce1b845 2019-07-15 stsp The created commit will not have any parent commits, i.e. it will be a
72 3ce1b845 2019-07-15 stsp root commit.
73 3ce1b845 2019-07-15 stsp Also create a new reference which provides a branch name for the newly
74 3ce1b845 2019-07-15 stsp created commit.
75 21a44f98 2019-07-15 stsp Show the path of each imported file to indicate progress.
76 3ce1b845 2019-07-15 stsp .Pp
77 21a44f98 2019-07-15 stsp The
78 21a44f98 2019-07-15 stsp .Cm got import
79 21a44f98 2019-07-15 stsp command requires the
80 21a44f98 2019-07-15 stsp .Ev GOT_AUTHOR
81 aba9c984 2019-09-08 stsp environment variable to be set,
82 257add31 2020-09-09 stsp unless an author has been configured in
83 257add31 2020-09-09 stsp .Xr got.conf 5
84 257add31 2020-09-09 stsp or Git's
85 aba9c984 2019-09-08 stsp .Dv user.name
86 aba9c984 2019-09-08 stsp and
87 709ae9eb 2019-09-08 stsp .Dv user.email
88 709ae9eb 2019-09-08 stsp configuration settings can be obtained from the repository's
89 aba9c984 2019-09-08 stsp .Pa .git/config
90 c9956ddf 2019-09-08 stsp file or from Git's global
91 c9956ddf 2019-09-08 stsp .Pa ~/.gitconfig
92 c9956ddf 2019-09-08 stsp configuration file.
93 3ce1b845 2019-07-15 stsp .Pp
94 3ce1b845 2019-07-15 stsp The options for
95 3ce1b845 2019-07-15 stsp .Cm got import
96 3ce1b845 2019-07-15 stsp are as follows:
97 3ce1b845 2019-07-15 stsp .Bl -tag -width Ds
98 3ce1b845 2019-07-15 stsp .It Fl b Ar branch
99 3ce1b845 2019-07-15 stsp Create the specified
100 3ce1b845 2019-07-15 stsp .Ar branch
101 3ce1b845 2019-07-15 stsp instead of creating the default branch
102 5d67f40d 2019-11-08 stsp .Dq main .
103 3ce1b845 2019-07-15 stsp Use of this option is required if the
104 5d67f40d 2019-11-08 stsp .Dq main
105 3ce1b845 2019-07-15 stsp branch already exists.
106 3ce1b845 2019-07-15 stsp .It Fl m Ar message
107 3ce1b845 2019-07-15 stsp Use the specified log message when creating the new commit.
108 3ce1b845 2019-07-15 stsp Without the
109 3ce1b845 2019-07-15 stsp .Fl m
110 3ce1b845 2019-07-15 stsp option,
111 3ce1b845 2019-07-15 stsp .Cm got import
112 3ce1b845 2019-07-15 stsp opens a temporary file in an editor where a log message can be written.
113 3ce1b845 2019-07-15 stsp .It Fl r Ar repository-path
114 3ce1b845 2019-07-15 stsp Use the repository at the specified path.
115 3ce1b845 2019-07-15 stsp If not specified, assume the repository is located at or above the current
116 3ce1b845 2019-07-15 stsp working directory.
117 3ce1b845 2019-07-15 stsp .It Fl I Ar pattern
118 3ce1b845 2019-07-15 stsp Ignore files or directories with a name which matches the specified
119 3ce1b845 2019-07-15 stsp .Ar pattern .
120 3ce1b845 2019-07-15 stsp This option may be specified multiple times to build a list of ignore patterns.
121 3ce1b845 2019-07-15 stsp The
122 3ce1b845 2019-07-15 stsp .Ar pattern
123 3ce1b845 2019-07-15 stsp follows the globbing rules documented in
124 3ce1b845 2019-07-15 stsp .Xr glob 7 .
125 3ce1b845 2019-07-15 stsp .El
126 e8aa341a 2021-10-08 thomas .Tg cl
127 0e4002ca 2020-03-21 stsp .It Cm clone Oo Fl a Oc Oo Fl b Ar branch Oc Oo Fl l Oc Oo Fl m Oc Oo Fl q Oc Oo Fl v Oc Oo Fl R Ar reference Oc Ar repository-URL Op Ar directory
128 d912d125 2021-11-04 thomas .Dl Pq alias: Cm cl
129 2ab43947 2020-03-18 stsp Clone a Git repository at the specified
130 2ab43947 2020-03-18 stsp .Ar repository-URL
131 2ab43947 2020-03-18 stsp into the specified
132 3493b628 2020-03-20 stsp .Ar directory .
133 2ab43947 2020-03-18 stsp If no
134 3493b628 2020-03-20 stsp .Ar directory
135 4b06140e 2022-03-22 thomas is specified, the directory name will be derived from the name of the
136 2ab43947 2020-03-18 stsp cloned repository.
137 2ab43947 2020-03-18 stsp .Cm got clone
138 2ab43947 2020-03-18 stsp will refuse to run if the
139 3493b628 2020-03-20 stsp .Ar directory
140 2ab43947 2020-03-18 stsp already exists.
141 2ab43947 2020-03-18 stsp .Pp
142 2ab43947 2020-03-18 stsp The
143 2ab43947 2020-03-18 stsp .Ar repository-URL
144 619eb6dd 2020-03-20 stsp specifies a protocol scheme, a server hostname, an optional port number
145 619eb6dd 2020-03-20 stsp separated from the hostname by a colon, and a path to the repository on
146 619eb6dd 2020-03-20 stsp the server:
147 619eb6dd 2020-03-20 stsp .Lk scheme://hostname:port/path/to/repository
148 2ab43947 2020-03-18 stsp .Pp
149 2ab43947 2020-03-18 stsp The following protocol schemes are supported:
150 2ab43947 2020-03-18 stsp .Bl -tag -width git+ssh
151 2ab43947 2020-03-18 stsp .It git
152 2ab43947 2020-03-18 stsp The Git protocol as implemented by the
153 2ab43947 2020-03-18 stsp .Xr git-daemon 1
154 2ab43947 2020-03-18 stsp server.
155 10c073e7 2020-03-20 stsp Use of this protocol is discouraged since it supports neither authentication
156 10c073e7 2020-03-20 stsp nor encryption.
157 2ab43947 2020-03-18 stsp .It git+ssh
158 2ab43947 2020-03-18 stsp The Git protocol wrapped in an authenticated and encrypted
159 2ab43947 2020-03-18 stsp .Xr ssh 1
160 2ab43947 2020-03-18 stsp tunnel.
161 2ab43947 2020-03-18 stsp With this protocol the hostname may contain an embedded username for
162 2ab43947 2020-03-18 stsp .Xr ssh 1
163 2ab43947 2020-03-18 stsp to use:
164 2ab43947 2020-03-18 stsp .Mt user@hostname
165 2ab43947 2020-03-18 stsp .It ssh
166 2ab43947 2020-03-18 stsp Short alias for git+ssh.
167 2ab43947 2020-03-18 stsp .El
168 89c3c67b 2020-03-20 stsp .Pp
169 89c3c67b 2020-03-20 stsp Objects in the cloned repository are stored in a pack file which is downloaded
170 89c3c67b 2020-03-20 stsp from the server.
171 89c3c67b 2020-03-20 stsp This pack file will then be indexed to facilitate access to the objects stored
172 89c3c67b 2020-03-20 stsp within.
173 89c3c67b 2020-03-20 stsp If any objects in the pack file are stored in deltified form, all deltas will
174 89c3c67b 2020-03-20 stsp be fully resolved in order to compute the ID of such objects.
175 89c3c67b 2020-03-20 stsp This can take some time.
176 010f7279 2020-03-20 stsp More details about the pack file format are documented in
177 010f7279 2020-03-20 stsp .Xr git-repository 5 .
178 2ab43947 2020-03-18 stsp .Pp
179 7848a0e1 2020-03-19 stsp .Cm got clone
180 7848a0e1 2020-03-19 stsp creates a remote repository entry in the
181 257add31 2020-09-09 stsp .Xr got.conf 5
182 257add31 2020-09-09 stsp and
183 7848a0e1 2020-03-19 stsp .Pa config
184 257add31 2020-09-09 stsp files of the cloned repository to store the
185 7848a0e1 2020-03-19 stsp .Ar repository-url
186 99495ddb 2021-01-10 stsp and any
187 15d3c221 2021-01-05 stsp .Ar branch
188 99495ddb 2021-01-10 stsp or
189 99495ddb 2021-01-10 stsp .Ar reference
190 132af4a5 2021-01-05 stsp arguments for future use by
191 7848a0e1 2020-03-19 stsp .Cm got fetch
192 fc24bb3a 2020-03-21 stsp or
193 7848a0e1 2020-03-19 stsp .Xr git-fetch 1 .
194 7848a0e1 2020-03-19 stsp .Pp
195 2ab43947 2020-03-18 stsp The options for
196 2ab43947 2020-03-18 stsp .Cm got clone
197 2ab43947 2020-03-18 stsp are as follows:
198 2ab43947 2020-03-18 stsp .Bl -tag -width Ds
199 659e7fbd 2020-03-20 stsp .It Fl a
200 1d4b192f 2020-03-21 stsp Fetch all branches from the remote repository's
201 1d4b192f 2020-03-21 stsp .Dq refs/heads/
202 5aa20203 2021-01-05 stsp reference namespace and set
203 25eb5847 2022-07-03 thomas .Cm fetch_all_branches
204 5aa20203 2021-01-05 stsp in the cloned repository's
205 5aa20203 2021-01-05 stsp .Xr got.conf 5
206 5aa20203 2021-01-05 stsp file for future use by
207 5aa20203 2021-01-05 stsp .Cm got fetch .
208 4ba14133 2020-03-20 stsp If this option is not specified, a branch resolved via the remote
209 4ba14133 2020-03-20 stsp repository's HEAD reference will be fetched.
210 4ba14133 2020-03-20 stsp Cannot be used together with the
211 4ba14133 2020-03-20 stsp .Fl b
212 4ba14133 2020-03-20 stsp option.
213 4ba14133 2020-03-20 stsp .It Fl b Ar branch
214 4ba14133 2020-03-20 stsp Fetch the specified
215 4ba14133 2020-03-20 stsp .Ar branch
216 1d4b192f 2020-03-21 stsp from the remote repository's
217 1d4b192f 2020-03-21 stsp .Dq refs/heads/
218 1d4b192f 2020-03-21 stsp reference namespace.
219 4ba14133 2020-03-20 stsp This option may be specified multiple times to build a list of branches
220 4ba14133 2020-03-20 stsp to fetch.
221 4ba14133 2020-03-20 stsp If the branch corresponding to the remote repository's HEAD reference is not
222 4ba14133 2020-03-20 stsp in this list, the cloned repository's HEAD reference will be set to the first
223 4ba14133 2020-03-20 stsp branch which was fetched.
224 4ba14133 2020-03-20 stsp If this option is not specified, a branch resolved via the remote
225 4ba14133 2020-03-20 stsp repository's HEAD reference will be fetched.
226 4ba14133 2020-03-20 stsp Cannot be used together with the
227 4ba14133 2020-03-20 stsp .Fl a
228 4ba14133 2020-03-20 stsp option.
229 41b0de12 2020-03-21 stsp .It Fl l
230 a18cccf9 2020-03-21 stsp List branches and tags available for fetching from the remote repository
231 41b0de12 2020-03-21 stsp and exit immediately.
232 41b0de12 2020-03-21 stsp Cannot be used together with any of the other options except
233 a5a46be2 2021-01-27 stsp .Fl q
234 a5a46be2 2021-01-27 stsp and
235 41b0de12 2020-03-21 stsp .Fl v .
236 469dd726 2020-03-20 stsp .It Fl m
237 469dd726 2020-03-20 stsp Create the cloned repository as a mirror of the original repository.
238 469dd726 2020-03-20 stsp This is useful if the cloned repository will not be used to store
239 bd81cfb7 2020-04-19 stsp locally created commits.
240 469dd726 2020-03-20 stsp .Pp
241 469dd726 2020-03-20 stsp The repository's
242 257add31 2020-09-09 stsp .Xr got.conf 5
243 257add31 2020-09-09 stsp and
244 469dd726 2020-03-20 stsp .Pa config
245 257add31 2020-09-09 stsp files will be set up with the
246 469dd726 2020-03-20 stsp .Dq mirror
247 469dd726 2020-03-20 stsp option enabled, such that
248 469dd726 2020-03-20 stsp .Cm got fetch
249 469dd726 2020-03-20 stsp or
250 469dd726 2020-03-20 stsp .Xr git-fetch 1
251 bd81cfb7 2020-04-19 stsp will write incoming changes directly to branches in the
252 469dd726 2020-03-20 stsp .Dq refs/heads/
253 469dd726 2020-03-20 stsp reference namespace, rather than to branches in the
254 469dd726 2020-03-20 stsp .Dq refs/remotes/
255 469dd726 2020-03-20 stsp namespace.
256 469dd726 2020-03-20 stsp This avoids the usual requirement of having to run
257 469dd726 2020-03-20 stsp .Cm got rebase
258 469dd726 2020-03-20 stsp after
259 469dd726 2020-03-20 stsp .Cm got fetch
260 bd81cfb7 2020-04-19 stsp in order to make incoming changes appear on branches in the
261 bd81cfb7 2020-04-19 stsp .Dq refs/heads/
262 bd81cfb7 2020-04-19 stsp namespace.
263 bd81cfb7 2020-04-19 stsp But maintaining custom changes in the cloned repository becomes difficult
264 bd81cfb7 2020-04-19 stsp since such changes will be at risk of being discarded whenever incoming
265 498ef124 2020-03-21 stsp changes are fetched.
266 2ab43947 2020-03-18 stsp .It Fl q
267 2ab43947 2020-03-18 stsp Suppress progress reporting output.
268 2ab43947 2020-03-18 stsp The same option will be passed to
269 2ab43947 2020-03-18 stsp .Xr ssh 1
270 2ab43947 2020-03-18 stsp if applicable.
271 2ab43947 2020-03-18 stsp .It Fl v
272 2690194b 2020-03-21 stsp Verbose mode.
273 2690194b 2020-03-21 stsp Causes
274 2690194b 2020-03-21 stsp .Cm got clone
275 2690194b 2020-03-21 stsp to print debugging messages to standard error output.
276 2690194b 2020-03-21 stsp This option will be passed to
277 2ab43947 2020-03-18 stsp .Xr ssh 1
278 2ab43947 2020-03-18 stsp if applicable.
279 2ab43947 2020-03-18 stsp Multiple -v options increase the verbosity.
280 2ab43947 2020-03-18 stsp The maximum is 3.
281 0e4002ca 2020-03-21 stsp .It Fl R Ar reference
282 0e4002ca 2020-03-21 stsp In addition to the branches and tags that will be fetched, fetch an arbitrary
283 0e4002ca 2020-03-21 stsp .Ar reference
284 0e4002ca 2020-03-21 stsp from the remote repository's
285 0e4002ca 2020-03-21 stsp .Dq refs/
286 0e4002ca 2020-03-21 stsp namespace.
287 0e4002ca 2020-03-21 stsp This option may be specified multiple times to build a list of additional
288 0e4002ca 2020-03-21 stsp references to fetch.
289 71f12362 2020-03-21 stsp The specified
290 71f12362 2020-03-21 stsp .Ar reference
291 a18cccf9 2020-03-21 stsp may either be a path to a specific reference, or a reference namespace
292 71f12362 2020-03-21 stsp which will cause all references in this namespace to be fetched.
293 0e4002ca 2020-03-21 stsp .Pp
294 71f12362 2020-03-21 stsp Each reference will be mapped into the cloned repository's
295 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
296 0e4002ca 2020-03-21 stsp namespace, unless the
297 0e4002ca 2020-03-21 stsp .Fl m
298 0e4002ca 2020-03-21 stsp option is used to mirror references directly into the cloned repository's
299 0e4002ca 2020-03-21 stsp .Dq refs/
300 0e4002ca 2020-03-21 stsp namespace.
301 0e4002ca 2020-03-21 stsp .Pp
302 0e4002ca 2020-03-21 stsp .Cm got clone
303 0e4002ca 2020-03-21 stsp will refuse to fetch references from the remote repository's
304 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
305 0e4002ca 2020-03-21 stsp or
306 0e4002ca 2020-03-21 stsp .Dq refs/got/
307 0e4002ca 2020-03-21 stsp namespace.
308 2ab43947 2020-03-18 stsp .El
309 e8aa341a 2021-10-08 thomas .Tg fe
310 161728eb 2021-07-24 stsp .It Cm fetch Oo Fl a Oc Oo Fl b Ar branch Oc Oo Fl d Oc Oo Fl l Oc Oo Fl r Ar repository-path Oc Oo Fl t Oc Oo Fl q Oc Oo Fl v Oc Oo Fl R Ar reference Oc Oo Fl X Oc Op Ar remote-repository
311 d912d125 2021-11-04 thomas .Dl Pq alias: Cm fe
312 7848a0e1 2020-03-19 stsp Fetch new changes from a remote repository.
313 7848a0e1 2020-03-19 stsp If no
314 4ba14133 2020-03-20 stsp .Ar remote-repository
315 4ba14133 2020-03-20 stsp is specified,
316 7848a0e1 2020-03-19 stsp .Dq origin
317 7848a0e1 2020-03-19 stsp will be used.
318 50b0790e 2020-09-11 stsp The remote repository's URL is obtained from the corresponding entry in
319 257add31 2020-09-09 stsp .Xr got.conf 5
320 50b0790e 2020-09-11 stsp or Git's
321 7848a0e1 2020-03-19 stsp .Pa config
322 f8ab0c60 2020-03-20 stsp file of the local repository, as created by
323 7848a0e1 2020-03-19 stsp .Cm got clone .
324 7848a0e1 2020-03-19 stsp .Pp
325 89c3c67b 2020-03-20 stsp New changes will be stored in a separate pack file downloaded from the server.
326 89c3c67b 2020-03-20 stsp Optionally, separate pack files stored in the repository can be combined with
327 89c3c67b 2020-03-20 stsp .Xr git-repack 1 .
328 89c3c67b 2020-03-20 stsp .Pp
329 498ef124 2020-03-21 stsp By default, branch references in the
330 7848a0e1 2020-03-19 stsp .Dq refs/remotes/
331 498ef124 2020-03-21 stsp reference namespace will be updated to point at the newly fetched commits.
332 498ef124 2020-03-21 stsp The
333 498ef124 2020-03-21 stsp .Cm got rebase
334 bd81cfb7 2020-04-19 stsp command can then be used to make new changes visible on branches in the
335 7848a0e1 2020-03-19 stsp .Dq refs/heads/
336 bd81cfb7 2020-04-19 stsp namespace, merging incoming changes with the changes on those branches
337 bd81cfb7 2020-04-19 stsp as necessary.
338 7848a0e1 2020-03-19 stsp .Pp
339 498ef124 2020-03-21 stsp If the repository was created as a mirror with
340 4b06140e 2022-03-22 thomas .Cm got clone -m ,
341 498ef124 2020-03-21 stsp then all branches in the
342 469dd726 2020-03-20 stsp .Dq refs/heads/
343 498ef124 2020-03-21 stsp namespace will be updated directly to match the corresponding branches in
344 498ef124 2020-03-21 stsp the remote repository.
345 175367bd 2020-03-20 stsp If those branches contained local commits, these commits will no longer be
346 175367bd 2020-03-20 stsp reachable via a reference and will therefore be at risk of being discarded
347 e6786710 2021-07-03 stsp by Git's garbage collector or
348 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
349 bd81cfb7 2020-04-19 stsp Maintaining custom changes in a mirror repository is therefore discouraged.
350 469dd726 2020-03-20 stsp .Pp
351 db6d8ad8 2020-03-21 stsp In any case, references in the
352 7848a0e1 2020-03-19 stsp .Dq refs/tags/
353 db6d8ad8 2020-03-21 stsp namespace will always be fetched and mapped directly to local references
354 db6d8ad8 2020-03-21 stsp in the same namespace.
355 7848a0e1 2020-03-19 stsp .Pp
356 7848a0e1 2020-03-19 stsp The options for
357 7848a0e1 2020-03-19 stsp .Cm got fetch
358 7848a0e1 2020-03-19 stsp are as follows:
359 7848a0e1 2020-03-19 stsp .Bl -tag -width Ds
360 659e7fbd 2020-03-20 stsp .It Fl a
361 1d4b192f 2020-03-21 stsp Fetch all branches from the remote repository's
362 1d4b192f 2020-03-21 stsp .Dq refs/heads/
363 1d4b192f 2020-03-21 stsp reference namespace.
364 0c8b29c5 2021-01-05 stsp This option can be enabled by default for specific repositories in
365 0c8b29c5 2021-01-05 stsp .Xr got.conf 5 .
366 4ba14133 2020-03-20 stsp If this option is not specified, a branch resolved via the remote
367 4ba14133 2020-03-20 stsp repository's HEAD reference will be fetched.
368 4ba14133 2020-03-20 stsp Cannot be used together with the
369 4ba14133 2020-03-20 stsp .Fl b
370 4ba14133 2020-03-20 stsp option.
371 4ba14133 2020-03-20 stsp .It Fl b Ar branch
372 4ba14133 2020-03-20 stsp Fetch the specified
373 4ba14133 2020-03-20 stsp .Ar branch
374 1d4b192f 2020-03-21 stsp from the remote repository's
375 1d4b192f 2020-03-21 stsp .Dq refs/heads/
376 1d4b192f 2020-03-21 stsp reference namespace.
377 4ba14133 2020-03-20 stsp This option may be specified multiple times to build a list of branches
378 4ba14133 2020-03-20 stsp to fetch.
379 4ba14133 2020-03-20 stsp If this option is not specified, a branch resolved via the remote
380 4ba14133 2020-03-20 stsp repository's HEAD reference will be fetched.
381 4ba14133 2020-03-20 stsp Cannot be used together with the
382 4ba14133 2020-03-20 stsp .Fl a
383 4ba14133 2020-03-20 stsp option.
384 f21ec2f0 2020-03-21 stsp .It Fl d
385 f21ec2f0 2020-03-21 stsp Delete branches and tags from the local repository which are no longer
386 f21ec2f0 2020-03-21 stsp present in the remote repository.
387 f21ec2f0 2020-03-21 stsp Only references are deleted.
388 239821eb 2020-03-21 stsp Any commit, tree, tag, and blob objects belonging to deleted branches or
389 f21ec2f0 2020-03-21 stsp tags remain in the repository and may be removed separately with
390 e6786710 2021-07-03 stsp Git's garbage collector or
391 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
392 41b0de12 2020-03-21 stsp .It Fl l
393 41b0de12 2020-03-21 stsp List branches and tags available for fetching from the remote repository
394 41b0de12 2020-03-21 stsp and exit immediately.
395 41b0de12 2020-03-21 stsp Cannot be used together with any of the other options except
396 612392ee 2021-01-05 stsp .Fl v ,
397 612392ee 2021-01-05 stsp .Fl q ,
398 41b0de12 2020-03-21 stsp and
399 41b0de12 2020-03-21 stsp .Fl r .
400 db6d8ad8 2020-03-21 stsp .It Fl t
401 db6d8ad8 2020-03-21 stsp Allow existing references in the
402 db6d8ad8 2020-03-21 stsp .Dq refs/tags
403 db6d8ad8 2020-03-21 stsp namespace to be updated if they have changed on the server.
404 db6d8ad8 2020-03-21 stsp If not specified, only new tag references will be created.
405 7848a0e1 2020-03-19 stsp .It Fl r Ar repository-path
406 7848a0e1 2020-03-19 stsp Use the repository at the specified path.
407 7848a0e1 2020-03-19 stsp If not specified, assume the repository is located at or above the current
408 7848a0e1 2020-03-19 stsp working directory.
409 7848a0e1 2020-03-19 stsp If this directory is a
410 7848a0e1 2020-03-19 stsp .Nm
411 7848a0e1 2020-03-19 stsp work tree, use the repository path associated with this work tree.
412 7848a0e1 2020-03-19 stsp .It Fl q
413 7848a0e1 2020-03-19 stsp Suppress progress reporting output.
414 7848a0e1 2020-03-19 stsp The same option will be passed to
415 7848a0e1 2020-03-19 stsp .Xr ssh 1
416 7848a0e1 2020-03-19 stsp if applicable.
417 7848a0e1 2020-03-19 stsp .It Fl v
418 2690194b 2020-03-21 stsp Verbose mode.
419 2690194b 2020-03-21 stsp Causes
420 2690194b 2020-03-21 stsp .Cm got fetch
421 2690194b 2020-03-21 stsp to print debugging messages to standard error output.
422 7848a0e1 2020-03-19 stsp The same option will be passed to
423 7848a0e1 2020-03-19 stsp .Xr ssh 1
424 7848a0e1 2020-03-19 stsp if applicable.
425 7848a0e1 2020-03-19 stsp Multiple -v options increase the verbosity.
426 7848a0e1 2020-03-19 stsp The maximum is 3.
427 0e4002ca 2020-03-21 stsp .It Fl R Ar reference
428 0e4002ca 2020-03-21 stsp In addition to the branches and tags that will be fetched, fetch an arbitrary
429 0e4002ca 2020-03-21 stsp .Ar reference
430 0e4002ca 2020-03-21 stsp from the remote repository's
431 0e4002ca 2020-03-21 stsp .Dq refs/
432 0e4002ca 2020-03-21 stsp namespace.
433 0e4002ca 2020-03-21 stsp This option may be specified multiple times to build a list of additional
434 0e4002ca 2020-03-21 stsp references to fetch.
435 71f12362 2020-03-21 stsp The specified
436 71f12362 2020-03-21 stsp .Ar reference
437 a18cccf9 2020-03-21 stsp may either be a path to a specific reference, or a reference namespace
438 71f12362 2020-03-21 stsp which will cause all references in this namespace to be fetched.
439 0e4002ca 2020-03-21 stsp .Pp
440 0e4002ca 2020-03-21 stsp Each reference will be mapped into the local repository's
441 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
442 0e4002ca 2020-03-21 stsp namespace, unless the local repository was created as a mirror with
443 a18cccf9 2020-03-21 stsp .Cm got clone -m
444 a18cccf9 2020-03-21 stsp in which case references will be mapped directly into the local repository's
445 a18cccf9 2020-03-21 stsp .Dq refs/
446 a18cccf9 2020-03-21 stsp namespace.
447 a18cccf9 2020-03-21 stsp .Pp
448 bd81cfb7 2020-04-19 stsp Once a reference has been fetched, a branch based on it can be created with
449 0e4002ca 2020-03-21 stsp .Cm got branch
450 0e4002ca 2020-03-21 stsp if needed.
451 0e4002ca 2020-03-21 stsp .Pp
452 0e4002ca 2020-03-21 stsp .Cm got fetch
453 0e4002ca 2020-03-21 stsp will refuse to fetch references from the remote repository's
454 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
455 0e4002ca 2020-03-21 stsp or
456 0e4002ca 2020-03-21 stsp .Dq refs/got/
457 0e4002ca 2020-03-21 stsp namespace.
458 161728eb 2021-07-24 stsp .It Fl X
459 161728eb 2021-07-24 stsp Delete all references which correspond to a particular
460 161728eb 2021-07-24 stsp .Ar remote-repository
461 161728eb 2021-07-24 stsp instead of fetching new changes.
462 161728eb 2021-07-24 stsp This can be useful when a remote repository is being removed from
463 161728eb 2021-07-24 stsp .Xr got.conf 5 .
464 161728eb 2021-07-24 stsp .Pp
465 161728eb 2021-07-24 stsp With
466 161728eb 2021-07-24 stsp .Fl X ,
467 161728eb 2021-07-24 stsp the
468 161728eb 2021-07-24 stsp .Ar remote-repository
469 161728eb 2021-07-24 stsp argument is mandatory and no other options except
470 161728eb 2021-07-24 stsp .Fl r ,
471 161728eb 2021-07-24 stsp .Fl v ,
472 161728eb 2021-07-24 stsp and
473 161728eb 2021-07-24 stsp .Fl q
474 161728eb 2021-07-24 stsp are allowed.
475 161728eb 2021-07-24 stsp .Pp
476 161728eb 2021-07-24 stsp Only references are deleted.
477 161728eb 2021-07-24 stsp Any commit, tree, tag, and blob objects fetched from a remote repository
478 161728eb 2021-07-24 stsp will generally be stored in pack files and may be removed separately with
479 161728eb 2021-07-24 stsp .Xr git-repack 1
480 161728eb 2021-07-24 stsp and Git's garbage collector.
481 7848a0e1 2020-03-19 stsp .El
482 e8aa341a 2021-10-08 thomas .Tg co
483 4ad4a1ec 2021-09-13 tracey .It Cm checkout Oo Fl E Oc Oo Fl b Ar branch Oc Oo Fl c Ar commit Oc Oo Fl p Ar path-prefix Oc Oo Fl q Oc Ar repository-path Op Ar work-tree-path
484 d912d125 2021-11-04 thomas .Dl Pq alias: Cm co
485 0bb8a95e 2018-03-12 stsp Copy files from a repository into a new work tree.
486 bb51a5b4 2020-01-13 stsp Show the status of each affected file, using the following status codes:
487 bb51a5b4 2020-01-13 stsp .Bl -column YXZ description
488 bb51a5b4 2020-01-13 stsp .It A Ta new file was added
489 bb51a5b4 2020-01-13 stsp .It E Ta file already exists in work tree's meta-data
490 bb51a5b4 2020-01-13 stsp .El
491 bb51a5b4 2020-01-13 stsp .Pp
492 5d7c1dab 2018-04-01 stsp If the
493 5d7c1dab 2018-04-01 stsp .Ar work tree path
494 c844a238 2019-02-06 stsp is not specified, either use the last component of
495 5d7c1dab 2018-04-01 stsp .Ar repository path ,
496 5d7c1dab 2018-04-01 stsp or if a
497 5d7c1dab 2018-04-01 stsp .Ar path prefix
498 c844a238 2019-02-06 stsp was specified use the last component of
499 5d7c1dab 2018-04-01 stsp .Ar path prefix .
500 38e11793 2018-06-13 stsp .Pp
501 38e11793 2018-06-13 stsp The options for
502 38e11793 2018-06-13 stsp .Cm got checkout
503 38e11793 2018-06-13 stsp are as follows:
504 38e11793 2018-06-13 stsp .Bl -tag -width Ds
505 bb51a5b4 2020-01-13 stsp .It Fl E
506 bb51a5b4 2020-01-13 stsp Proceed with the checkout operation even if the directory at
507 bb51a5b4 2020-01-13 stsp .Ar work-tree-path
508 bb51a5b4 2020-01-13 stsp is not empty.
509 bb51a5b4 2020-01-13 stsp Existing files will be left intact.
510 08573d5b 2019-05-14 stsp .It Fl b Ar branch
511 3c575567 2019-07-28 stsp Check out files from a commit on the specified
512 08573d5b 2019-05-14 stsp .Ar branch .
513 08573d5b 2019-05-14 stsp If this option is not specified, a branch resolved via the repository's HEAD
514 08573d5b 2019-05-14 stsp reference will be used.
515 8069f636 2019-01-12 stsp .It Fl c Ar commit
516 8069f636 2019-01-12 stsp Check out files from the specified
517 3c575567 2019-07-28 stsp .Ar commit
518 3c575567 2019-07-28 stsp on the selected branch.
519 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
520 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
521 0e1b0230 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
522 0e1b0230 2019-07-07 stsp automatically, provided the abbreviation is unique.
523 08573d5b 2019-05-14 stsp If this option is not specified, the most recent commit on the selected
524 08573d5b 2019-05-14 stsp branch will be used.
525 4b6c9460 2020-03-05 stsp .Pp
526 4b6c9460 2020-03-05 stsp If the specified
527 4b6c9460 2020-03-05 stsp .Ar commit
528 4b6c9460 2020-03-05 stsp is not contained in the selected branch, a different branch which contains
529 4b6c9460 2020-03-05 stsp this commit must be specified with the
530 4b6c9460 2020-03-05 stsp .Fl b
531 4b6c9460 2020-03-05 stsp option.
532 4b06140e 2022-03-22 thomas If no such branch is known, a new branch must be created for this
533 4b6c9460 2020-03-05 stsp commit with
534 4b6c9460 2020-03-05 stsp .Cm got branch
535 4b6c9460 2020-03-05 stsp before
536 4b6c9460 2020-03-05 stsp .Cm got checkout
537 4b6c9460 2020-03-05 stsp can be used.
538 4b6c9460 2020-03-05 stsp Checking out work trees with an unknown branch is intentionally not supported.
539 38e11793 2018-06-13 stsp .It Fl p Ar path-prefix
540 38e11793 2018-06-13 stsp Restrict the work tree to a subset of the repository's tree hierarchy.
541 38e11793 2018-06-13 stsp Only files beneath the specified
542 38e11793 2018-06-13 stsp .Ar path-prefix
543 38e11793 2018-06-13 stsp will be checked out.
544 4ad4a1ec 2021-09-13 tracey .It Fl q
545 4ad4a1ec 2021-09-13 tracey Silence progress output.
546 38e11793 2018-06-13 stsp .El
547 e8aa341a 2021-10-08 thomas .Tg up
548 4ad4a1ec 2021-09-13 tracey .It Cm update Oo Fl b Ar branch Oc Oo Fl c Ar commit Oc Oo Fl q Oc Op Ar path ...
549 d912d125 2021-11-04 thomas .Dl Pq alias: Cm up
550 4f331d3a 2020-04-01 stsp Update an existing work tree to a different
551 4f331d3a 2020-04-01 stsp .Ar commit .
552 4f331d3a 2020-04-01 stsp Change existing files in the work tree as necessary to match file contents
553 4f331d3a 2020-04-01 stsp of this commit.
554 4f331d3a 2020-04-01 stsp Preserve any local changes in the work tree and merge them with the
555 4f331d3a 2020-04-01 stsp incoming changes.
556 4f331d3a 2020-04-01 stsp .Pp
557 5036ab18 2020-04-18 stsp Files which already contain merge conflicts will not be updated to avoid
558 5036ab18 2020-04-18 stsp further complications.
559 5036ab18 2020-04-18 stsp Such files will be updated when
560 5036ab18 2020-04-18 stsp .Cm got update
561 5036ab18 2020-04-18 stsp is run again after merge conflicts have been resolved.
562 4b06140e 2022-03-22 thomas If the conflicting changes are no longer needed, affected files can be
563 5036ab18 2020-04-18 stsp reverted with
564 5036ab18 2020-04-18 stsp .Cm got revert
565 5036ab18 2020-04-18 stsp before running
566 5036ab18 2020-04-18 stsp .Cm got update
567 5036ab18 2020-04-18 stsp again.
568 5036ab18 2020-04-18 stsp .Pp
569 7f838b36 2019-02-08 stsp Show the status of each affected file, using the following status codes:
570 7f838b36 2019-02-08 stsp .Bl -column YXZ description
571 7f838b36 2019-02-08 stsp .It U Ta file was updated and contained no local changes
572 7f838b36 2019-02-08 stsp .It G Ta file was updated and local changes were merged cleanly
573 7f838b36 2019-02-08 stsp .It C Ta file was updated and conflicts occurred during merge
574 7f838b36 2019-02-08 stsp .It D Ta file was deleted
575 7f838b36 2019-02-08 stsp .It A Ta new file was added
576 1dd86744 2019-08-12 anthony .It \(a~ Ta versioned file is obstructed by a non-regular file
577 a378724f 2019-02-10 stsp .It ! Ta a missing versioned file was restored
578 5036ab18 2020-04-18 stsp .It # Ta file was not updated because it contains merge conflicts
579 3b9f0f87 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
580 7f838b36 2019-02-08 stsp .El
581 7f838b36 2019-02-08 stsp .Pp
582 f2ea84fa 2019-07-27 stsp If no
583 c4cdcb68 2019-04-03 stsp .Ar path
584 f2ea84fa 2019-07-27 stsp is specified, update the entire work tree.
585 f2ea84fa 2019-07-27 stsp Otherwise, restrict the update operation to files at or within the
586 f2ea84fa 2019-07-27 stsp specified paths.
587 f2ea84fa 2019-07-27 stsp Each path is required to exist in the update operation's target commit.
588 f2ea84fa 2019-07-27 stsp Files in the work tree outside specified paths will remain unchanged and
589 f2ea84fa 2019-07-27 stsp will retain their previously recorded base commit.
590 f2cf8fbb 2019-04-04 stsp Some
591 f2cf8fbb 2019-04-04 stsp .Nm
592 f2cf8fbb 2019-04-04 stsp commands may refuse to run while the work tree contains files from
593 c4cdcb68 2019-04-03 stsp multiple base commits.
594 f2cf8fbb 2019-04-04 stsp The base commit of such a work tree can be made consistent by running
595 47ec7be7 2019-05-12 stsp .Cm got update
596 47ec7be7 2019-05-12 stsp across the entire work tree.
597 024e9686 2019-05-14 stsp Specifying a
598 024e9686 2019-05-14 stsp .Ar path
599 024e9686 2019-05-14 stsp is incompatible with the
600 024e9686 2019-05-14 stsp .Fl b
601 024e9686 2019-05-14 stsp option.
602 7f838b36 2019-02-08 stsp .Pp
603 4ed9f614 2019-08-04 stsp .Cm got update
604 4ed9f614 2019-08-04 stsp cannot update paths with staged changes.
605 4ed9f614 2019-08-04 stsp If changes have been staged with
606 4ed9f614 2019-08-04 stsp .Cm got stage ,
607 bc3056e3 2019-08-18 stsp these changes must first be committed with
608 4ed9f614 2019-08-04 stsp .Cm got commit
609 4ed9f614 2019-08-04 stsp or unstaged with
610 4ed9f614 2019-08-04 stsp .Cm got unstage .
611 4ed9f614 2019-08-04 stsp .Pp
612 507dc3bb 2018-12-29 stsp The options for
613 507dc3bb 2018-12-29 stsp .Cm got update
614 507dc3bb 2018-12-29 stsp are as follows:
615 507dc3bb 2018-12-29 stsp .Bl -tag -width Ds
616 024e9686 2019-05-14 stsp .It Fl b Ar branch
617 024e9686 2019-05-14 stsp Switch the work tree's branch reference to the specified
618 024e9686 2019-05-14 stsp .Ar branch
619 024e9686 2019-05-14 stsp before updating the work tree.
620 024e9686 2019-05-14 stsp This option requires that all paths in the work tree are updated.
621 4f331d3a 2020-04-01 stsp .Pp
622 4f331d3a 2020-04-01 stsp As usual, any local changes in the work tree will be preserved.
623 4f331d3a 2020-04-01 stsp This can be useful when switching to a newly created branch in order
624 4f331d3a 2020-04-01 stsp to commit existing local changes to this branch.
625 4f331d3a 2020-04-01 stsp .Pp
626 4f331d3a 2020-04-01 stsp Any local changes must be dealt with separately in order to obtain a
627 4f331d3a 2020-04-01 stsp work tree with pristine file contents corresponding exactly to the specified
628 4f331d3a 2020-04-01 stsp .Ar branch .
629 4f331d3a 2020-04-01 stsp Such changes could first be committed to a different branch with
630 4f331d3a 2020-04-01 stsp .Cm got commit ,
631 4f331d3a 2020-04-01 stsp or could be discarded with
632 4f331d3a 2020-04-01 stsp .Cm got revert .
633 507dc3bb 2018-12-29 stsp .It Fl c Ar commit
634 507dc3bb 2018-12-29 stsp Update the work tree to the specified
635 507dc3bb 2018-12-29 stsp .Ar commit .
636 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
637 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
638 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
639 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
640 024e9686 2019-05-14 stsp If this option is not specified, the most recent commit on the work tree's
641 024e9686 2019-05-14 stsp branch will be used.
642 4ad4a1ec 2021-09-13 tracey .It Fl q
643 4ad4a1ec 2021-09-13 tracey Silence progress output.
644 507dc3bb 2018-12-29 stsp .El
645 e8aa341a 2021-10-08 thomas .Tg st
646 ac372b60 2021-09-15 stsp .It Cm status Oo Fl I Oc Oo Fl s Ar status-codes Oc Oo Fl S Ar status-codes Oc Op Ar path ...
647 d912d125 2021-11-04 thomas .Dl Pq alias: Cm st
648 6cd959e6 2019-03-26 stsp Show the current modification status of files in a work tree,
649 6bad629b 2019-02-04 stsp using the following status codes:
650 6bad629b 2019-02-04 stsp .Bl -column YXZ description
651 6bad629b 2019-02-04 stsp .It M Ta modified file
652 079890a9 2019-03-26 stsp .It A Ta file scheduled for addition in next commit
653 079890a9 2019-03-26 stsp .It D Ta file scheduled for deletion in next commit
654 7154f6ce 2019-03-27 stsp .It C Ta modified or added file which contains merge conflicts
655 6bad629b 2019-02-04 stsp .It ! Ta versioned file was expected on disk but is missing
656 1dd86744 2019-08-12 anthony .It \(a~ Ta versioned file is obstructed by a non-regular file
657 6bad629b 2019-02-04 stsp .It ? Ta unversioned item not tracked by
658 6bad629b 2019-02-04 stsp .Nm
659 1ebedb77 2019-10-19 stsp .It m Ta modified file modes (executable bit only)
660 2a06fe5f 2019-08-24 stsp .It N Ta non-existent
661 2a06fe5f 2019-08-24 stsp .Ar path
662 2a06fe5f 2019-08-24 stsp specified on the command line
663 6bad629b 2019-02-04 stsp .El
664 6bad629b 2019-02-04 stsp .Pp
665 72ea6654 2019-07-27 stsp If no
666 927df6b7 2019-02-10 stsp .Ar path
667 72ea6654 2019-07-27 stsp is specified, show modifications in the entire work tree.
668 72ea6654 2019-07-27 stsp Otherwise, show modifications at or within the specified paths.
669 4ed9f614 2019-08-04 stsp .Pp
670 4ed9f614 2019-08-04 stsp If changes have been staged with
671 4ed9f614 2019-08-04 stsp .Cm got stage ,
672 4ed9f614 2019-08-04 stsp staged changes are shown in the second output column, using the following
673 4ed9f614 2019-08-04 stsp status codes:
674 4ed9f614 2019-08-04 stsp .Bl -column YXZ description
675 4ed9f614 2019-08-04 stsp .It M Ta file modification is staged
676 4ed9f614 2019-08-04 stsp .It A Ta file addition is staged
677 4ed9f614 2019-08-04 stsp .It D Ta file deletion is staged
678 4ed9f614 2019-08-04 stsp .El
679 4ed9f614 2019-08-04 stsp .Pp
680 95ac67f0 2019-08-08 stsp Changes created on top of staged changes are indicated in the first column:
681 4ed9f614 2019-08-04 stsp .Bl -column YXZ description
682 95ac67f0 2019-08-08 stsp .It MM Ta file was modified after earlier changes have been staged
683 95ac67f0 2019-08-08 stsp .It MA Ta file was modified after having been staged for addition
684 4ed9f614 2019-08-04 stsp .El
685 6841da00 2019-08-08 stsp .Pp
686 081470ac 2020-08-13 stsp The options for
687 081470ac 2020-08-13 stsp .Cm got status
688 081470ac 2020-08-13 stsp are as follows:
689 081470ac 2020-08-13 stsp .Bl -tag -width Ds
690 f6343036 2021-06-22 stsp .It Fl I
691 f6343036 2021-06-22 stsp Show unversioned files even if they match an ignore pattern.
692 081470ac 2020-08-13 stsp .It Fl s Ar status-codes
693 081470ac 2020-08-13 stsp Only show files with a modification status matching any of the
694 00357e4d 2021-09-14 tracey single-character status codes contained in the
695 00357e4d 2021-09-14 tracey .Ar status-codes
696 00357e4d 2021-09-14 tracey argument.
697 00357e4d 2021-09-14 tracey Any combination of codes from the above list of possible status codes
698 00357e4d 2021-09-14 tracey may be specified.
699 00357e4d 2021-09-14 tracey For staged files, status codes displayed in either column will be matched.
700 b043307b 2021-09-14 stsp Cannot be used together with the
701 b043307b 2021-09-14 stsp .Fl S
702 b043307b 2021-09-14 stsp option.
703 00357e4d 2021-09-14 tracey .It Fl S Ar status-codes
704 00357e4d 2021-09-14 tracey Suppress the output of files with a modification status matching any of the
705 081470ac 2020-08-13 stsp single-character status codes contained in the
706 081470ac 2020-08-13 stsp .Ar status-codes
707 081470ac 2020-08-13 stsp argument.
708 081470ac 2020-08-13 stsp Any combination of codes from the above list of possible status codes
709 081470ac 2020-08-13 stsp may be specified.
710 081470ac 2020-08-13 stsp For staged files, status codes displayed in either column will be matched.
711 b043307b 2021-09-14 stsp Cannot be used together with the
712 b043307b 2021-09-14 stsp .Fl s
713 b043307b 2021-09-14 stsp option.
714 081470ac 2020-08-13 stsp .El
715 081470ac 2020-08-13 stsp .Pp
716 6841da00 2019-08-08 stsp For compatibility with
717 bd8de430 2019-10-04 stsp .Xr cvs 1
718 bd8de430 2019-10-04 stsp and
719 bd8de430 2019-10-04 stsp .Xr git 1 ,
720 6841da00 2019-08-08 stsp .Cm got status
721 bd8de430 2019-10-04 stsp reads
722 bd8de430 2019-10-04 stsp .Xr glob 7
723 bd8de430 2019-10-04 stsp patterns from
724 6841da00 2019-08-08 stsp .Pa .cvsignore
725 bd8de430 2019-10-04 stsp and
726 bd8de430 2019-10-04 stsp .Pa .gitignore
727 6841da00 2019-08-08 stsp files in each traversed directory and will not display unversioned files
728 bd8de430 2019-10-04 stsp which match these patterns.
729 bd8de430 2019-10-04 stsp As an extension to
730 6841da00 2019-08-08 stsp .Xr glob 7
731 bd8de430 2019-10-04 stsp matching rules,
732 bd8de430 2019-10-04 stsp .Cm got status
733 bd8de430 2019-10-04 stsp supports consecutive asterisks,
734 bd8de430 2019-10-04 stsp .Dq ** ,
735 bd8de430 2019-10-04 stsp which will match an arbitrary amount of directories.
736 6841da00 2019-08-08 stsp Unlike
737 6841da00 2019-08-08 stsp .Xr cvs 1 ,
738 6841da00 2019-08-08 stsp .Cm got status
739 6841da00 2019-08-08 stsp only supports a single ignore pattern per line.
740 bd8de430 2019-10-04 stsp Unlike
741 bd8de430 2019-10-04 stsp .Xr git 1 ,
742 bd8de430 2019-10-04 stsp .Cm got status
743 bd8de430 2019-10-04 stsp does not support negated ignore patterns prefixed with
744 bd8de430 2019-10-04 stsp .Dq \&! ,
745 bd8de430 2019-10-04 stsp and gives no special significance to the location of path component separators,
746 bd8de430 2019-10-04 stsp .Dq / ,
747 bd8de430 2019-10-04 stsp in a pattern.
748 2f7ada20 2022-06-13 thomas .It Cm log Oo Fl b Oc Oo Fl c Ar commit Oc Oo Fl C Ar number Oc Oo Fl l Ar N Oc Oo Fl p Oc Oo Fl P Oc Oo Fl s Oc Oo Fl S Ar search-pattern Oc Oo Fl r Ar repository-path Oc Oo Fl R Oc Oo Fl x Ar commit Oc Op Ar path
749 38e11793 2018-06-13 stsp Display history of a repository.
750 04ca23f4 2018-07-16 stsp If a
751 04ca23f4 2018-07-16 stsp .Ar path
752 04ca23f4 2018-07-16 stsp is specified, show only commits which modified this path.
753 dc990cbf 2020-02-22 stsp If invoked in a work tree, the
754 dc990cbf 2020-02-22 stsp .Ar path
755 dc990cbf 2020-02-22 stsp is interpreted relative to the current working directory,
756 dc990cbf 2020-02-22 stsp and the work tree's path prefix is implicitly prepended.
757 dc990cbf 2020-02-22 stsp Otherwise, the path is interpreted relative to the repository root.
758 38e11793 2018-06-13 stsp .Pp
759 38e11793 2018-06-13 stsp The options for
760 38e11793 2018-06-13 stsp .Cm got log
761 38e11793 2018-06-13 stsp are as follows:
762 38e11793 2018-06-13 stsp .Bl -tag -width Ds
763 48c8c60d 2020-01-27 stsp .It Fl b
764 1137e0ae 2020-01-27 stsp Display individual commits which were merged into the current branch
765 1137e0ae 2020-01-27 stsp from other branches.
766 48c8c60d 2020-01-27 stsp By default,
767 48c8c60d 2020-01-27 stsp .Cm got log
768 48c8c60d 2020-01-27 stsp shows the linear history of the current branch only.
769 38e11793 2018-06-13 stsp .It Fl c Ar commit
770 38e11793 2018-06-13 stsp Start traversing history at the specified
771 38e11793 2018-06-13 stsp .Ar commit .
772 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
773 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
774 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
775 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
776 1cc14b9f 2019-05-14 stsp If this option is not specified, default to the work tree's current branch
777 1cc14b9f 2019-05-14 stsp if invoked in a work tree, or to the repository's HEAD reference.
778 c0cc5c62 2018-10-18 stsp .It Fl C Ar number
779 c0cc5c62 2018-10-18 stsp Set the number of context lines shown in diffs with
780 c0cc5c62 2018-10-18 stsp .Fl p .
781 c0cc5c62 2018-10-18 stsp By default, 3 lines of context are shown.
782 6238ee32 2018-06-13 stsp .It Fl l Ar N
783 6238ee32 2018-06-13 stsp Limit history traversal to a given number of commits.
784 b1ebc001 2019-08-13 stsp If this option is not specified, a default limit value of zero is used,
785 b1ebc001 2019-08-13 stsp which is treated as an unbounded limit.
786 b1ebc001 2019-08-13 stsp The
787 b1ebc001 2019-08-13 stsp .Ev GOT_LOG_DEFAULT_LIMIT
788 b1ebc001 2019-08-13 stsp environment variable may be set to change this default value.
789 6238ee32 2018-06-13 stsp .It Fl p
790 6238ee32 2018-06-13 stsp Display the patch of modifications made in each commit.
791 44392932 2019-08-25 stsp If a
792 44392932 2019-08-25 stsp .Ar path
793 44392932 2019-08-25 stsp is specified, only show the patch of modifications at or within this path.
794 2f7ada20 2022-06-13 thomas Cannot be used with the
795 2f7ada20 2022-06-13 thomas .Fl s
796 2f7ada20 2022-06-13 thomas option.
797 0208f208 2020-05-05 stsp .It Fl P
798 0208f208 2020-05-05 stsp Display the list of file paths changed in each commit, using the following
799 0208f208 2020-05-05 stsp status codes:
800 0208f208 2020-05-05 stsp .Bl -column YXZ description
801 0208f208 2020-05-05 stsp .It M Ta modified file
802 0208f208 2020-05-05 stsp .It D Ta file was deleted
803 0208f208 2020-05-05 stsp .It A Ta new file was added
804 0208f208 2020-05-05 stsp .It m Ta modified file modes (executable bit only)
805 0208f208 2020-05-05 stsp .El
806 e2f45bc4 2022-06-13 thomas .Pp
807 2f7ada20 2022-06-13 thomas Cannot be used with the
808 2f7ada20 2022-06-13 thomas .Fl s
809 2f7ada20 2022-06-13 thomas option.
810 2f7ada20 2022-06-13 thomas .It Fl s
811 2f7ada20 2022-06-13 thomas Display a short one-line summary of each commit, instead of the default
812 2f7ada20 2022-06-13 thomas history format.
813 2f7ada20 2022-06-13 thomas Cannot be used together with the
814 2f7ada20 2022-06-13 thomas .Fl p
815 2f7ada20 2022-06-13 thomas or
816 2f7ada20 2022-06-13 thomas .Fl P
817 2f7ada20 2022-06-13 thomas option.
818 2f7ada20 2022-06-13 thomas .It Fl S Ar search-pattern
819 4fe9456b 2022-06-13 thomas If specified, show only commits with a log message, author name,
820 4fe9456b 2022-06-13 thomas committer name, or ID SHA1 hash matched by the extended regular
821 4fe9456b 2022-06-13 thomas expression
822 6841bf13 2019-11-29 kn .Ar search-pattern .
823 314444e4 2022-06-13 thomas Lines in committed patches will be matched if
824 314444e4 2022-06-13 thomas .Fl p
825 314444e4 2022-06-13 thomas is specified.
826 314444e4 2022-06-13 thomas File paths changed by a commit will be matched if
827 314444e4 2022-06-13 thomas .Fl P
828 314444e4 2022-06-13 thomas is specified.
829 6841bf13 2019-11-29 kn Regular expression syntax is documented in
830 6841bf13 2019-11-29 kn .Xr re_format 7 .
831 04ca23f4 2018-07-16 stsp .It Fl r Ar repository-path
832 04ca23f4 2018-07-16 stsp Use the repository at the specified path.
833 04ca23f4 2018-07-16 stsp If not specified, assume the repository is located at or above the current
834 04ca23f4 2018-07-16 stsp working directory.
835 e9cf2e30 2019-02-05 stsp If this directory is a
836 e9cf2e30 2019-02-05 stsp .Nm
837 e9cf2e30 2019-02-05 stsp work tree, use the repository path associated with this work tree.
838 dbec59df 2020-04-18 stsp .It Fl R
839 dbec59df 2020-04-18 stsp Determine a set of commits to display as usual, but display these commits
840 dbec59df 2020-04-18 stsp in reverse order.
841 d1fe46f9 2020-04-18 stsp .It Fl x Ar commit
842 4e20a648 2021-03-21 jrick Stop traversing commit history immediately after the specified
843 d1fe46f9 2020-04-18 stsp .Ar commit
844 52ab7958 2020-04-18 stsp has been traversed.
845 d1fe46f9 2020-04-18 stsp This option has no effect if the specified
846 d1fe46f9 2020-04-18 stsp .Ar commit
847 d1fe46f9 2020-04-18 stsp is never traversed.
848 38e11793 2018-06-13 stsp .El
849 e8aa341a 2021-10-08 thomas .Tg di
850 cc8021af 2021-10-12 thomas .It Cm diff Oo Fl a Oc Oo Fl c Ar commit Oc Oo Fl C Ar number Oc Oo Fl r Ar repository-path Oc Oo Fl s Oc Oo Fl P Oc Oo Fl w Oc Op Ar object1 Ar object2 | Ar path ...
851 d912d125 2021-11-04 thomas .Dl Pq alias: Cm di
852 30f6c0c6 2021-10-08 thomas When invoked within a work tree without any arguments, display all
853 bd81cfb7 2020-04-19 stsp local changes in the work tree.
854 30f6c0c6 2021-10-08 thomas If one or more
855 927df6b7 2019-02-10 stsp .Ar path
856 30f6c0c6 2021-10-08 thomas arguments are specified, only show changes within the specified paths.
857 927df6b7 2019-02-10 stsp .Pp
858 d24820bf 2019-08-11 stsp If two arguments are provided, treat each argument as a reference, a tag
859 d24820bf 2019-08-11 stsp name, or an object ID SHA1 hash, and display differences between the
860 d24820bf 2019-08-11 stsp corresponding objects.
861 3f8b7d6a 2018-04-01 stsp Both objects must be of the same type (blobs, trees, or commits).
862 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
863 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
864 30f6c0c6 2021-10-08 thomas If none of these interpretations produce a valid result or if the
865 30f6c0c6 2021-10-08 thomas .Fl P
866 30f6c0c6 2021-10-08 thomas option is used,
867 30f6c0c6 2021-10-08 thomas and if
868 30f6c0c6 2021-10-08 thomas .Cm got diff
869 30f6c0c6 2021-10-08 thomas is running in a work tree, attempt to interpret the two arguments as paths.
870 c0cc5c62 2018-10-18 stsp .Pp
871 c0cc5c62 2018-10-18 stsp The options for
872 c0cc5c62 2018-10-18 stsp .Cm got diff
873 c0cc5c62 2018-10-18 stsp are as follows:
874 c0cc5c62 2018-10-18 stsp .Bl -tag -width Ds
875 64453f7e 2020-11-21 stsp .It Fl a
876 64453f7e 2020-11-21 stsp Treat file contents as ASCII text even if binary data is detected.
877 cc8021af 2021-10-12 thomas .It Fl c Ar commit
878 cc8021af 2021-10-12 thomas Show differences between commits in the repository.
879 cc8021af 2021-10-12 thomas This options may be used up to two times.
880 cc8021af 2021-10-12 thomas When used only once, show differences between the specified
881 cc8021af 2021-10-12 thomas .Ar commit
882 cc8021af 2021-10-12 thomas and its first parent commit.
883 cc8021af 2021-10-12 thomas When used twice, show differences between the two specified commits.
884 cc8021af 2021-10-12 thomas .Pp
885 cc8021af 2021-10-12 thomas The expected argument is a commit ID SHA1 hash or an existing reference
886 cc8021af 2021-10-12 thomas or tag name which will be resolved to a commit ID.
887 cc8021af 2021-10-12 thomas An abbreviated hash argument will be expanded to a full SHA1 hash
888 cc8021af 2021-10-12 thomas automatically, provided the abbreviation is unique.
889 cc8021af 2021-10-12 thomas .Pp
890 cc8021af 2021-10-12 thomas If the
891 cc8021af 2021-10-12 thomas .Fl c
892 cc8021af 2021-10-12 thomas option is used, all non-option arguments will be interpreted as paths.
893 cc8021af 2021-10-12 thomas If one or more such
894 cc8021af 2021-10-12 thomas .Ar path
895 cc8021af 2021-10-12 thomas arguments are provided, only show differences for the specified paths.
896 cc8021af 2021-10-12 thomas .Pp
897 cc8021af 2021-10-12 thomas Cannot be used together with the
898 cc8021af 2021-10-12 thomas .Fl P
899 cc8021af 2021-10-12 thomas option.
900 c0cc5c62 2018-10-18 stsp .It Fl C Ar number
901 c0cc5c62 2018-10-18 stsp Set the number of context lines shown in the diff.
902 c0cc5c62 2018-10-18 stsp By default, 3 lines of context are shown.
903 b72f483a 2019-02-05 stsp .It Fl r Ar repository-path
904 b72f483a 2019-02-05 stsp Use the repository at the specified path.
905 b72f483a 2019-02-05 stsp If not specified, assume the repository is located at or above the current
906 b72f483a 2019-02-05 stsp working directory.
907 b72f483a 2019-02-05 stsp If this directory is a
908 b72f483a 2019-02-05 stsp .Nm
909 b72f483a 2019-02-05 stsp work tree, use the repository path associated with this work tree.
910 4ed9f614 2019-08-04 stsp .It Fl s
911 4ed9f614 2019-08-04 stsp Show changes staged with
912 4ed9f614 2019-08-04 stsp .Cm got stage
913 bd81cfb7 2020-04-19 stsp instead of showing local changes in the work tree.
914 30f6c0c6 2021-10-08 thomas This option is only valid when
915 30f6c0c6 2021-10-08 thomas .Cm got diff
916 30f6c0c6 2021-10-08 thomas is invoked in a work tree.
917 30f6c0c6 2021-10-08 thomas .It Fl P
918 30f6c0c6 2021-10-08 thomas Interpret all arguments as paths only.
919 30f6c0c6 2021-10-08 thomas This option can be used to resolve ambiguity in cases where paths
920 30f6c0c6 2021-10-08 thomas look like tag names, reference names, or object IDs.
921 4ed9f614 2019-08-04 stsp This option is only valid when
922 4ed9f614 2019-08-04 stsp .Cm got diff
923 4ed9f614 2019-08-04 stsp is invoked in a work tree.
924 63035f9f 2019-10-06 stsp .It Fl w
925 63035f9f 2019-10-06 stsp Ignore whitespace-only changes.
926 c0cc5c62 2018-10-18 stsp .El
927 e8aa341a 2021-10-08 thomas .Tg bl
928 dfc23429 2019-08-11 stsp .It Cm blame Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Ar path
929 d912d125 2021-11-04 thomas .Dl Pq alias: Cm bl
930 1ff8e573 2018-08-02 stsp Display line-by-line history of a file at the specified path.
931 1ff8e573 2018-08-02 stsp .Pp
932 1ff8e573 2018-08-02 stsp The options for
933 1ff8e573 2018-08-02 stsp .Cm got blame
934 1ff8e573 2018-08-02 stsp are as follows:
935 1ff8e573 2018-08-02 stsp .Bl -tag -width Ds
936 1ff8e573 2018-08-02 stsp .It Fl c Ar commit
937 1ff8e573 2018-08-02 stsp Start traversing history at the specified
938 1ff8e573 2018-08-02 stsp .Ar commit .
939 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
940 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
941 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
942 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
943 1ff8e573 2018-08-02 stsp .It Fl r Ar repository-path
944 1ff8e573 2018-08-02 stsp Use the repository at the specified path.
945 1ff8e573 2018-08-02 stsp If not specified, assume the repository is located at or above the current
946 1ff8e573 2018-08-02 stsp working directory.
947 0c06baac 2019-02-05 stsp If this directory is a
948 0c06baac 2019-02-05 stsp .Nm
949 0c06baac 2019-02-05 stsp work tree, use the repository path associated with this work tree.
950 5c860e29 2018-03-12 stsp .El
951 e8aa341a 2021-10-08 thomas .Tg tr
952 dfc23429 2019-08-11 stsp .It Cm tree Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Oo Fl i Oc Oo Fl R Oc Op Ar path
953 d912d125 2021-11-04 thomas .Dl Pq alias: Cm tr
954 5de5890b 2018-10-18 stsp Display a listing of files and directories at the specified
955 5de5890b 2018-10-18 stsp directory path in the repository.
956 db0c2996 2019-02-10 stsp Entries shown in this listing may carry one of the following trailing
957 db0c2996 2019-02-10 stsp annotations:
958 db0c2996 2019-02-10 stsp .Bl -column YXZ description
959 848d6979 2019-08-12 stsp .It @ Ta entry is a symbolic link
960 db0c2996 2019-02-10 stsp .It / Ta entry is a directory
961 db0c2996 2019-02-10 stsp .It * Ta entry is an executable file
962 63c5ca5d 2019-08-24 stsp .It $ Ta entry is a Git submodule
963 db0c2996 2019-02-10 stsp .El
964 0d6c6ee3 2020-05-20 stsp .Pp
965 0d6c6ee3 2020-05-20 stsp Symbolic link entries are also annotated with the target path of the link.
966 db0c2996 2019-02-10 stsp .Pp
967 0c849583 2019-02-05 stsp If no
968 0c849583 2019-02-05 stsp .Ar path
969 0c849583 2019-02-05 stsp is specified, list the repository path corresponding to the current
970 0c849583 2019-02-05 stsp directory of the work tree, or the root directory of the repository
971 0c849583 2019-02-05 stsp if there is no work tree.
972 5de5890b 2018-10-18 stsp .Pp
973 5de5890b 2018-10-18 stsp The options for
974 5de5890b 2018-10-18 stsp .Cm got tree
975 5de5890b 2018-10-18 stsp are as follows:
976 5de5890b 2018-10-18 stsp .Bl -tag -width Ds
977 5de5890b 2018-10-18 stsp .It Fl c Ar commit
978 5de5890b 2018-10-18 stsp List files and directories as they appear in the specified
979 5de5890b 2018-10-18 stsp .Ar commit .
980 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
981 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
982 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
983 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
984 5de5890b 2018-10-18 stsp .It Fl r Ar repository-path
985 5de5890b 2018-10-18 stsp Use the repository at the specified path.
986 5de5890b 2018-10-18 stsp If not specified, assume the repository is located at or above the current
987 5de5890b 2018-10-18 stsp working directory.
988 0c849583 2019-02-05 stsp If this directory is a
989 0c849583 2019-02-05 stsp .Nm
990 0c849583 2019-02-05 stsp work tree, use the repository path associated with this work tree.
991 5de5890b 2018-10-18 stsp .It Fl i
992 5de5890b 2018-10-18 stsp Show object IDs of files (blob objects) and directories (tree objects).
993 c1669e2e 2019-01-09 stsp .It Fl R
994 0c849583 2019-02-05 stsp Recurse into sub-directories in the repository.
995 d0eebce4 2019-03-11 stsp .El
996 2bf0fa54 2021-11-20 thomas .It Cm ref Oo Fl r Ar repository-path Oc Oo Fl l Oc Oo Fl t Oc Oo Fl c Ar object Oc Oo Fl s Ar reference Oc Oo Fl d Oc Op Ar name
997 d0eebce4 2019-03-11 stsp Manage references in a repository.
998 d0eebce4 2019-03-11 stsp .Pp
999 e31abbf2 2020-03-22 stsp References may be listed, created, deleted, and changed.
1000 e31abbf2 2020-03-22 stsp When creating, deleting, or changing a reference the specified
1001 e31abbf2 2020-03-22 stsp .Ar name
1002 e31abbf2 2020-03-22 stsp must be an absolute reference name, i.e. it must begin with
1003 f16e4044 2019-10-09 stsp .Dq refs/ .
1004 e31abbf2 2020-03-22 stsp .Pp
1005 d0eebce4 2019-03-11 stsp The options for
1006 d0eebce4 2019-03-11 stsp .Cm got ref
1007 d0eebce4 2019-03-11 stsp are as follows:
1008 d0eebce4 2019-03-11 stsp .Bl -tag -width Ds
1009 d0eebce4 2019-03-11 stsp .It Fl r Ar repository-path
1010 d0eebce4 2019-03-11 stsp Use the repository at the specified path.
1011 d0eebce4 2019-03-11 stsp If not specified, assume the repository is located at or above the current
1012 d0eebce4 2019-03-11 stsp working directory.
1013 d0eebce4 2019-03-11 stsp If this directory is a
1014 d0eebce4 2019-03-11 stsp .Nm
1015 d0eebce4 2019-03-11 stsp work tree, use the repository path associated with this work tree.
1016 d0eebce4 2019-03-11 stsp .It Fl l
1017 b2070a3f 2020-03-22 stsp List references in the repository.
1018 b2070a3f 2020-03-22 stsp If no
1019 b2070a3f 2020-03-22 stsp .Ar name
1020 b2070a3f 2020-03-22 stsp is specified, list all existing references in the repository.
1021 b2070a3f 2020-03-22 stsp If
1022 b2070a3f 2020-03-22 stsp .Ar name
1023 b2070a3f 2020-03-22 stsp is a reference namespace, list all references in this namespace.
1024 b2070a3f 2020-03-22 stsp Otherwise, show only the reference with the given
1025 b2070a3f 2020-03-22 stsp .Ar name .
1026 e31abbf2 2020-03-22 stsp Cannot be used together with any other options except
1027 2bf0fa54 2021-11-20 thomas .Fl r
1028 2bf0fa54 2021-11-20 thomas and
1029 2bf0fa54 2021-11-20 thomas .Fl t .
1030 2bf0fa54 2021-11-20 thomas .It Fl t
1031 2bf0fa54 2021-11-20 thomas Sort listed references by modification time (most recently modified first)
1032 2bf0fa54 2021-11-20 thomas instead of sorting by lexicographical order.
1033 2bf0fa54 2021-11-20 thomas Use of this option requires the
1034 2bf0fa54 2021-11-20 thomas .Fl l
1035 2bf0fa54 2021-11-20 thomas option to be used as well.
1036 e31abbf2 2020-03-22 stsp .It Fl c Ar object
1037 e31abbf2 2020-03-22 stsp Create a reference or change an existing reference.
1038 e31abbf2 2020-03-22 stsp The reference with the specified
1039 e31abbf2 2020-03-22 stsp .Ar name
1040 e31abbf2 2020-03-22 stsp will point at the specified
1041 1795b260 2021-04-02 kn .Ar object .
1042 e31abbf2 2020-03-22 stsp The expected
1043 e31abbf2 2020-03-22 stsp .Ar object
1044 e31abbf2 2020-03-22 stsp argument is a ID SHA1 hash or an existing reference or tag name which will
1045 e31abbf2 2020-03-22 stsp be resolved to the ID of a corresponding commit, tree, tag, or blob object.
1046 e31abbf2 2020-03-22 stsp Cannot be used together with any other options except
1047 e31abbf2 2020-03-22 stsp .Fl r .
1048 e31abbf2 2020-03-22 stsp .It Fl s Ar reference
1049 e31abbf2 2020-03-22 stsp Create a symbolic reference, or change an existing symbolic reference.
1050 e31abbf2 2020-03-22 stsp The symbolic reference with the specified
1051 e31abbf2 2020-03-22 stsp .Ar name
1052 e31abbf2 2020-03-22 stsp will point at the specified
1053 e31abbf2 2020-03-22 stsp .Ar reference
1054 e31abbf2 2020-03-22 stsp which must already exist in the repository.
1055 d1c1ae5f 2019-08-12 stsp Care should be taken not to create loops between references when
1056 d1c1ae5f 2019-08-12 stsp this option is used.
1057 e31abbf2 2020-03-22 stsp Cannot be used together with any other options except
1058 e31abbf2 2020-03-22 stsp .Fl r .
1059 e31abbf2 2020-03-22 stsp .It Fl d
1060 e31abbf2 2020-03-22 stsp Delete the reference with the specified
1061 e31abbf2 2020-03-22 stsp .Ar name
1062 e31abbf2 2020-03-22 stsp from the repository.
1063 601aba22 2021-03-21 stsp Any commit, tree, tag, and blob objects belonging to deleted references
1064 601aba22 2021-03-21 stsp remain in the repository and may be removed separately with
1065 e6786710 2021-07-03 stsp Git's garbage collector or
1066 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
1067 e31abbf2 2020-03-22 stsp Cannot be used together with any other options except
1068 e31abbf2 2020-03-22 stsp .Fl r .
1069 4e759de4 2019-06-26 stsp .El
1070 e8aa341a 2021-10-08 thomas .Tg br
1071 053ccfc1 2022-01-12 thomas .It Cm branch Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Oo Fl l Oc Oo Fl t Oc Oo Fl d Ar name Oc Oo Fl n Oc Op Ar name
1072 d912d125 2021-11-04 thomas .Dl Pq alias: Cm br
1073 da76fce2 2020-02-24 stsp Create, list, or delete branches.
1074 4e759de4 2019-06-26 stsp .Pp
1075 34d4e04c 2021-02-08 stsp Local branches are managed via references which live in the
1076 4e759de4 2019-06-26 stsp .Dq refs/heads/
1077 4e759de4 2019-06-26 stsp reference namespace.
1078 4e759de4 2019-06-26 stsp The
1079 4e759de4 2019-06-26 stsp .Cm got branch
1080 2f1457c6 2021-08-27 stsp command creates references in this namespace only.
1081 2f1457c6 2021-08-27 stsp .Pp
1082 4b06140e 2022-03-22 thomas When deleting branches, the specified
1083 2f1457c6 2021-08-27 stsp .Ar name
1084 2f1457c6 2021-08-27 stsp is searched in the
1085 2f1457c6 2021-08-27 stsp .Dq refs/heads
1086 2f1457c6 2021-08-27 stsp reference namespace first.
1087 4b06140e 2022-03-22 thomas If no corresponding branch is found, the
1088 2f1457c6 2021-08-27 stsp .Dq refs/remotes
1089 2f1457c6 2021-08-27 stsp namespace will be searched next.
1090 4e759de4 2019-06-26 stsp .Pp
1091 ad89fa31 2019-10-04 stsp If invoked in a work tree without any arguments, print the name of the
1092 ad89fa31 2019-10-04 stsp work tree's current branch.
1093 da76fce2 2020-02-24 stsp .Pp
1094 a74f7e83 2019-11-10 stsp If a
1095 a74f7e83 2019-11-10 stsp .Ar name
1096 a74f7e83 2019-11-10 stsp argument is passed, attempt to create a branch reference with the given name.
1097 a74f7e83 2019-11-10 stsp By default the new branch reference will point at the latest commit on the
1098 a74f7e83 2019-11-10 stsp work tree's current branch if invoked in a work tree, and otherwise to a commit
1099 a74f7e83 2019-11-10 stsp resolved via the repository's HEAD reference.
1100 4e759de4 2019-06-26 stsp .Pp
1101 da76fce2 2020-02-24 stsp If invoked in a work tree, once the branch was created successfully
1102 da76fce2 2020-02-24 stsp switch the work tree's head reference to the newly created branch and
1103 da76fce2 2020-02-24 stsp update files across the entire work tree, just like
1104 da76fce2 2020-02-24 stsp .Cm got update -b Ar name
1105 da76fce2 2020-02-24 stsp would do.
1106 da76fce2 2020-02-24 stsp Show the status of each affected file, using the following status codes:
1107 da76fce2 2020-02-24 stsp .Bl -column YXZ description
1108 da76fce2 2020-02-24 stsp .It U Ta file was updated and contained no local changes
1109 da76fce2 2020-02-24 stsp .It G Ta file was updated and local changes were merged cleanly
1110 da76fce2 2020-02-24 stsp .It C Ta file was updated and conflicts occurred during merge
1111 da76fce2 2020-02-24 stsp .It D Ta file was deleted
1112 da76fce2 2020-02-24 stsp .It A Ta new file was added
1113 da76fce2 2020-02-24 stsp .It \(a~ Ta versioned file is obstructed by a non-regular file
1114 da76fce2 2020-02-24 stsp .It ! Ta a missing versioned file was restored
1115 da76fce2 2020-02-24 stsp .El
1116 da76fce2 2020-02-24 stsp .Pp
1117 4e759de4 2019-06-26 stsp The options for
1118 4e759de4 2019-06-26 stsp .Cm got branch
1119 4e759de4 2019-06-26 stsp are as follows:
1120 4e759de4 2019-06-26 stsp .Bl -tag -width Ds
1121 a74f7e83 2019-11-10 stsp .It Fl c Ar commit
1122 a74f7e83 2019-11-10 stsp Make a newly created branch reference point at the specified
1123 a74f7e83 2019-11-10 stsp .Ar commit .
1124 a74f7e83 2019-11-10 stsp The expected
1125 a74f7e83 2019-11-10 stsp .Ar commit
1126 a74f7e83 2019-11-10 stsp argument is a commit ID SHA1 hash or an existing reference
1127 a74f7e83 2019-11-10 stsp or tag name which will be resolved to a commit ID.
1128 4e759de4 2019-06-26 stsp .It Fl r Ar repository-path
1129 4e759de4 2019-06-26 stsp Use the repository at the specified path.
1130 4e759de4 2019-06-26 stsp If not specified, assume the repository is located at or above the current
1131 4e759de4 2019-06-26 stsp working directory.
1132 4e759de4 2019-06-26 stsp If this directory is a
1133 4e759de4 2019-06-26 stsp .Nm
1134 4e759de4 2019-06-26 stsp work tree, use the repository path associated with this work tree.
1135 4e759de4 2019-06-26 stsp .It Fl l
1136 34d4e04c 2021-02-08 stsp List all existing branches in the repository, including copies of remote
1137 34d4e04c 2021-02-08 stsp repositories' branches in the
1138 34d4e04c 2021-02-08 stsp .Dq refs/remotes/
1139 34d4e04c 2021-02-08 stsp reference namespace.
1140 34d4e04c 2021-02-08 stsp .Pp
1141 ba882ee3 2019-07-11 stsp If invoked in a work tree, the work tree's current branch is shown
1142 ba882ee3 2019-07-11 stsp with one the following annotations:
1143 ba882ee3 2019-07-11 stsp .Bl -column YXZ description
1144 ba882ee3 2019-07-11 stsp .It * Ta work tree's base commit matches the branch tip
1145 1dd86744 2019-08-12 anthony .It \(a~ Ta work tree's base commit is out-of-date
1146 ba882ee3 2019-07-11 stsp .El
1147 a0b48eaf 2021-11-20 thomas .It Fl t
1148 a0b48eaf 2021-11-20 thomas Sort listed branches by modification time (most recently modified first)
1149 a0b48eaf 2021-11-20 thomas instead of sorting by lexicographical order.
1150 a0b48eaf 2021-11-20 thomas Branches in the
1151 a0b48eaf 2021-11-20 thomas .Dq refs/heads/
1152 a0b48eaf 2021-11-20 thomas reference namespace are listed before branches in
1153 a0b48eaf 2021-11-20 thomas .Dq refs/remotes/
1154 a0b48eaf 2021-11-20 thomas regardless.
1155 a0b48eaf 2021-11-20 thomas Use of this option requires the
1156 a0b48eaf 2021-11-20 thomas .Fl l
1157 a0b48eaf 2021-11-20 thomas option to be used as well.
1158 4e759de4 2019-06-26 stsp .It Fl d Ar name
1159 2f1457c6 2021-08-27 stsp Delete the branch with the specified
1160 2f1457c6 2021-08-27 stsp .Ar name
1161 2f1457c6 2021-08-27 stsp from the
1162 2f1457c6 2021-08-27 stsp .Dq refs/heads
1163 2f1457c6 2021-08-27 stsp or
1164 2f1457c6 2021-08-27 stsp .Dq refs/remotes
1165 2f1457c6 2021-08-27 stsp reference namespace.
1166 2f1457c6 2021-08-27 stsp .Pp
1167 7acfb25b 2019-07-11 stsp Only the branch reference is deleted.
1168 7acfb25b 2019-07-11 stsp Any commit, tree, and blob objects belonging to the branch
1169 74d012d1 2019-07-11 stsp remain in the repository and may be removed separately with
1170 e6786710 2021-07-03 stsp Git's garbage collector or
1171 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
1172 da76fce2 2020-02-24 stsp .It Fl n
1173 da76fce2 2020-02-24 stsp Do not switch and update the work tree after creating a new branch.
1174 5de5890b 2018-10-18 stsp .El
1175 839dd04f 2022-07-04 thomas .It Cm tag Oo Fl c Ar commit Oc Oo Fl m Ar message Oc Oo Fl r Ar repository-path Oc Oo Fl l Oc Oo Fl s Ar signer-id Oc Oo Fl v Oc Oo Fl V Oc Ar name
1176 8e7bd50a 2019-08-22 stsp Manage tags in a repository.
1177 8e7bd50a 2019-08-22 stsp .Pp
1178 8e7bd50a 2019-08-22 stsp Tags are managed via references which live in the
1179 8e7bd50a 2019-08-22 stsp .Dq refs/tags/
1180 8e7bd50a 2019-08-22 stsp reference namespace.
1181 8e7bd50a 2019-08-22 stsp The
1182 8e7bd50a 2019-08-22 stsp .Cm got tag
1183 8e7bd50a 2019-08-22 stsp command operates on references in this namespace only.
1184 b3cd068e 2019-08-22 stsp References in this namespace point at tag objects which contain a pointer
1185 b3cd068e 2019-08-22 stsp to another object, a tag message, as well as author and timestamp information.
1186 8e7bd50a 2019-08-22 stsp .Pp
1187 80106605 2020-02-24 stsp Attempt to create a tag with the given
1188 8e7bd50a 2019-08-22 stsp .Ar name ,
1189 8e7bd50a 2019-08-22 stsp and make this tag point at the given
1190 8e7bd50a 2019-08-22 stsp .Ar commit .
1191 8e7bd50a 2019-08-22 stsp If no commit is specified, default to the latest commit on the work tree's
1192 8e7bd50a 2019-08-22 stsp current branch if invoked in a work tree, and to a commit resolved via
1193 8e7bd50a 2019-08-22 stsp the repository's HEAD reference otherwise.
1194 8e7bd50a 2019-08-22 stsp .Pp
1195 8e7bd50a 2019-08-22 stsp The options for
1196 8e7bd50a 2019-08-22 stsp .Cm got tag
1197 8e7bd50a 2019-08-22 stsp are as follows:
1198 8e7bd50a 2019-08-22 stsp .Bl -tag -width Ds
1199 80106605 2020-02-24 stsp .It Fl c Ar commit
1200 80106605 2020-02-24 stsp Make the newly created tag reference point at the specified
1201 80106605 2020-02-24 stsp .Ar commit .
1202 80106605 2020-02-24 stsp The expected
1203 80106605 2020-02-24 stsp .Ar commit
1204 80106605 2020-02-24 stsp argument is a commit ID SHA1 hash or an existing reference or tag name which
1205 80106605 2020-02-24 stsp will be resolved to a commit ID.
1206 80106605 2020-02-24 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1207 80106605 2020-02-24 stsp automatically, provided the abbreviation is unique.
1208 8e7bd50a 2019-08-22 stsp .It Fl m Ar message
1209 80106605 2020-02-24 stsp Use the specified tag message when creating the new tag.
1210 8e7bd50a 2019-08-22 stsp Without the
1211 8e7bd50a 2019-08-22 stsp .Fl m
1212 8e7bd50a 2019-08-22 stsp option,
1213 3a62228f 2019-11-08 stsp .Cm got tag
1214 8e7bd50a 2019-08-22 stsp opens a temporary file in an editor where a tag message can be written.
1215 8e7bd50a 2019-08-22 stsp .It Fl r Ar repository-path
1216 8e7bd50a 2019-08-22 stsp Use the repository at the specified path.
1217 8e7bd50a 2019-08-22 stsp If not specified, assume the repository is located at or above the current
1218 8e7bd50a 2019-08-22 stsp working directory.
1219 8e7bd50a 2019-08-22 stsp If this directory is a
1220 8e7bd50a 2019-08-22 stsp .Nm
1221 8e7bd50a 2019-08-22 stsp work tree, use the repository path associated with this work tree.
1222 8e7bd50a 2019-08-22 stsp .It Fl l
1223 8e7bd50a 2019-08-22 stsp List all existing tags in the repository instead of creating a new tag.
1224 68e8cedb 2022-07-01 thomas If a
1225 68e8cedb 2022-07-01 thomas .Ar name
1226 68e8cedb 2022-07-01 thomas argument is passed, show only the tag with the given
1227 68e8cedb 2022-07-01 thomas .Ar name .
1228 839dd04f 2022-07-04 thomas .It Fl s Ar signer-id
1229 839dd04f 2022-07-04 thomas While creating a new tag, sign this tag with the identity given in
1230 839dd04f 2022-07-04 thomas .Ar signer-id .
1231 839dd04f 2022-07-04 thomas .Pp
1232 839dd04f 2022-07-04 thomas For SSH-based signatures,
1233 839dd04f 2022-07-04 thomas .Ar signer-id
1234 839dd04f 2022-07-04 thomas is the path to a file which may refer to either a private SSH key,
1235 839dd04f 2022-07-04 thomas or a public SSH key with the private half available via
1236 839dd04f 2022-07-04 thomas .Xr ssh-agent 1 .
1237 839dd04f 2022-07-04 thomas .Cm got tag
1238 839dd04f 2022-07-04 thomas will sign the tag object by invoking
1239 839dd04f 2022-07-04 thomas .Xr ssh-keygen 1
1240 839dd04f 2022-07-04 thomas with the
1241 839dd04f 2022-07-04 thomas .Fl Y Ar sign
1242 839dd04f 2022-07-04 thomas command, using the signature namespace
1243 839dd04f 2022-07-04 thomas .Dq git
1244 839dd04f 2022-07-04 thomas for compatibility with
1245 839dd04f 2022-07-04 thomas .Xr git 1 .
1246 839dd04f 2022-07-04 thomas .It Fl v
1247 839dd04f 2022-07-04 thomas Verbose mode.
1248 839dd04f 2022-07-04 thomas During SSH signature creation and verification this option will be passed to
1249 839dd04f 2022-07-04 thomas .Xr ssh-keygen 1 .
1250 839dd04f 2022-07-04 thomas Multiple -v options increase the verbosity.
1251 839dd04f 2022-07-04 thomas The maximum is 3.
1252 839dd04f 2022-07-04 thomas .It Fl V
1253 839dd04f 2022-07-04 thomas Verify tag object signatures.
1254 839dd04f 2022-07-04 thomas If a
1255 839dd04f 2022-07-04 thomas .Ar name
1256 839dd04f 2022-07-04 thomas is specified, show and verify the tag object with the provided name.
1257 839dd04f 2022-07-04 thomas Otherwise, list all tag objects and verify signatures where present.
1258 839dd04f 2022-07-04 thomas .Pp
1259 839dd04f 2022-07-04 thomas .Cm got tag
1260 839dd04f 2022-07-04 thomas verifies SSH-based signatures by invoking
1261 839dd04f 2022-07-04 thomas .Xr ssh-keygen 1
1262 839dd04f 2022-07-04 thomas with the options
1263 839dd04f 2022-07-04 thomas .Fl Y Ar verify Fl f Ar allowed_signers .
1264 839dd04f 2022-07-04 thomas A path to the
1265 839dd04f 2022-07-04 thomas .Ar allowed_signers
1266 839dd04f 2022-07-04 thomas file must be set in
1267 839dd04f 2022-07-04 thomas .Xr got.conf 5 ,
1268 839dd04f 2022-07-04 thomas otherwise verification is impossible.
1269 8e7bd50a 2019-08-22 stsp .El
1270 8e7bd50a 2019-08-22 stsp .Pp
1271 8e7bd50a 2019-08-22 stsp By design, the
1272 8e7bd50a 2019-08-22 stsp .Cm got tag
1273 8e7bd50a 2019-08-22 stsp command will not delete tags or change existing tags.
1274 8e7bd50a 2019-08-22 stsp If a tag must be deleted, the
1275 8e7bd50a 2019-08-22 stsp .Cm got ref
1276 8e7bd50a 2019-08-22 stsp command may be used to delete a tag's reference.
1277 8e7bd50a 2019-08-22 stsp This should only be done if the tag has not already been copied to
1278 8e7bd50a 2019-08-22 stsp another repository.
1279 022fae89 2019-12-06 tracey .It Cm add Oo Fl R Oc Oo Fl I Oc Ar path ...
1280 8125ddca 2019-05-11 stsp Schedule unversioned files in a work tree for addition to the
1281 d00136be 2019-03-26 stsp repository in the next commit.
1282 ff56836b 2021-07-08 stsp By default, files which match a
1283 ff56836b 2021-07-08 stsp .Cm got status
1284 ff56836b 2021-07-08 stsp ignore pattern will not be added.
1285 4e68cba3 2019-11-23 stsp .Pp
1286 4e68cba3 2019-11-23 stsp The options for
1287 4e68cba3 2019-11-23 stsp .Cm got add
1288 4e68cba3 2019-11-23 stsp are as follows:
1289 4e68cba3 2019-11-23 stsp .Bl -tag -width Ds
1290 4e68cba3 2019-11-23 stsp .It Fl R
1291 4e68cba3 2019-11-23 stsp Permit recursion into directories.
1292 4e68cba3 2019-11-23 stsp If this option is not specified,
1293 4e68cba3 2019-11-23 stsp .Cm got add
1294 4e68cba3 2019-11-23 stsp will refuse to run if a specified
1295 4e68cba3 2019-11-23 stsp .Ar path
1296 4e68cba3 2019-11-23 stsp is a directory.
1297 022fae89 2019-12-06 tracey .It Fl I
1298 ff56836b 2021-07-08 stsp Add files even if they match a
1299 022fae89 2019-12-06 tracey .Cm got status
1300 022fae89 2019-12-06 tracey ignore pattern.
1301 4e68cba3 2019-11-23 stsp .El
1302 e8aa341a 2021-10-08 thomas .Tg rm
1303 766841c2 2020-08-13 stsp .It Cm remove Oo Fl f Oc Oo Fl k Oc Oo Fl R Oc Oo Fl s Ar status-codes Oc Ar path ...
1304 d912d125 2021-11-04 thomas .Dl Pq alias: Cm rm
1305 17ed4618 2019-06-02 stsp Remove versioned files from a work tree and schedule them for deletion
1306 2ec1f75b 2019-03-26 stsp from the repository in the next commit.
1307 2ec1f75b 2019-03-26 stsp .Pp
1308 2ec1f75b 2019-03-26 stsp The options for
1309 86d25a1b 2019-07-11 stsp .Cm got remove
1310 2ec1f75b 2019-03-26 stsp are as follows:
1311 2ec1f75b 2019-03-26 stsp .Bl -tag -width Ds
1312 2ec1f75b 2019-03-26 stsp .It Fl f
1313 d64cc78a 2022-01-25 thomas Perform the operation even if a file contains local modifications,
1314 d64cc78a 2022-01-25 thomas and do not raise an error if a specified
1315 d64cc78a 2022-01-25 thomas .Ar path
1316 d64cc78a 2022-01-25 thomas does not exist on disk.
1317 70e3e7f5 2019-12-13 tracey .It Fl k
1318 70e3e7f5 2019-12-13 tracey Keep affected files on disk.
1319 f2a9dc41 2019-12-13 tracey .It Fl R
1320 f2a9dc41 2019-12-13 tracey Permit recursion into directories.
1321 f2a9dc41 2019-12-13 tracey If this option is not specified,
1322 f2a9dc41 2019-12-13 tracey .Cm got remove
1323 f2a9dc41 2019-12-13 tracey will refuse to run if a specified
1324 f2a9dc41 2019-12-13 tracey .Ar path
1325 f2a9dc41 2019-12-13 tracey is a directory.
1326 766841c2 2020-08-13 stsp .It Fl s Ar status-codes
1327 766841c2 2020-08-13 stsp Only delete files with a modification status matching one of the
1328 766841c2 2020-08-13 stsp single-character status codes contained in the
1329 766841c2 2020-08-13 stsp .Ar status-codes
1330 766841c2 2020-08-13 stsp argument.
1331 766841c2 2020-08-13 stsp The following status codes may be specified:
1332 766841c2 2020-08-13 stsp .Bl -column YXZ description
1333 766841c2 2020-08-13 stsp .It M Ta modified file (this implies the
1334 766841c2 2020-08-13 stsp .Fl f
1335 766841c2 2020-08-13 stsp option)
1336 766841c2 2020-08-13 stsp .It ! Ta versioned file expected on disk but missing
1337 766841c2 2020-08-13 stsp .El
1338 d0eebce4 2019-03-11 stsp .El
1339 069bbb86 2022-03-07 thomas .Tg pa
1340 7d8bcb99 2022-07-28 thomas .It Cm patch Oo Fl c Ar commit Oc Oo Fl n Oc Oo Fl p Ar strip-count Oc Oo Fl R Oc Op Ar patchfile
1341 069bbb86 2022-03-07 thomas .Dl Pq alias: Cm pa
1342 069bbb86 2022-03-07 thomas Apply changes from
1343 069bbb86 2022-03-07 thomas .Ar patchfile
1344 07f74738 2022-03-13 thomas to files in a work tree.
1345 443c08c9 2022-03-13 thomas Files added or removed by a patch will be scheduled for addition or removal in
1346 443c08c9 2022-03-13 thomas the work tree.
1347 07f74738 2022-03-13 thomas .Pp
1348 07f74738 2022-03-13 thomas The patch must be in the unified diff format as produced by
1349 07f74738 2022-03-13 thomas .Cm got diff ,
1350 99e34129 2022-03-22 thomas .Xr git-diff 1 ,
1351 4929098b 2022-03-13 thomas or by
1352 07f74738 2022-03-13 thomas .Xr diff 1
1353 3eb4f629 2022-03-22 thomas and
1354 3eb4f629 2022-03-22 thomas .Xr cvs 1
1355 6f7394ad 2022-03-22 thomas diff when invoked with their
1356 07f74738 2022-03-13 thomas .Fl u
1357 6f7394ad 2022-03-22 thomas options.
1358 07f74738 2022-03-13 thomas If no
1359 069bbb86 2022-03-07 thomas .Ar patchfile
1360 07f74738 2022-03-13 thomas argument is provided, read unified diff data from standard input instead.
1361 07f74738 2022-03-13 thomas .Pp
1362 07f74738 2022-03-13 thomas If the
1363 07f74738 2022-03-13 thomas .Ar patchfile
1364 4b06140e 2022-03-22 thomas contains multiple patches, then attempt to apply each of them in sequence.
1365 069bbb86 2022-03-07 thomas .Pp
1366 4929098b 2022-03-13 thomas Show the status of each affected file, using the following status codes:
1367 069bbb86 2022-03-07 thomas .Bl -column XYZ description
1368 07f74738 2022-03-13 thomas .It M Ta file was modified
1369 762b8e82 2022-06-23 thomas .It G Ta file was merged using a merge-base found in the repository
1370 762b8e82 2022-06-23 thomas .It C Ta file was merged and conflicts occurred during merge
1371 07f74738 2022-03-13 thomas .It D Ta file was deleted
1372 07f74738 2022-03-13 thomas .It A Ta file was added
1373 49114f01 2022-03-22 thomas .It # Ta failed to patch the file
1374 069bbb86 2022-03-07 thomas .El
1375 069bbb86 2022-03-07 thomas .Pp
1376 07f74738 2022-03-13 thomas If a change does not match at its exact line number, attempt to
1377 4929098b 2022-03-13 thomas apply it somewhere else in the file if a good spot can be found.
1378 4929098b 2022-03-13 thomas Otherwise, the patch will fail to apply.
1379 2cfc25ac 2022-03-13 thomas .Pp
1380 2cfc25ac 2022-03-13 thomas .Nm
1381 2cfc25ac 2022-03-13 thomas .Cm patch
1382 2cfc25ac 2022-03-13 thomas will refuse to apply a patch if certain preconditions are not met.
1383 4929098b 2022-03-13 thomas Files to be deleted must already be under version control, and must
1384 4929098b 2022-03-13 thomas not have been scheduled for deletion already.
1385 4929098b 2022-03-13 thomas Files to be added must not yet be under version control and must not
1386 4929098b 2022-03-13 thomas already be present on disk.
1387 4929098b 2022-03-13 thomas Files to be modified must already be under version control and may not
1388 4929098b 2022-03-13 thomas contain conflict markers.
1389 2cfc25ac 2022-03-13 thomas .Pp
1390 2cfc25ac 2022-03-13 thomas If an error occurs, the
1391 2cfc25ac 2022-03-13 thomas .Cm patch
1392 2cfc25ac 2022-03-13 thomas operation will be aborted.
1393 2cfc25ac 2022-03-13 thomas Any changes made to the work tree up to this point will be left behind.
1394 07f74738 2022-03-13 thomas Such changes can be viewed with
1395 2cfc25ac 2022-03-13 thomas .Cm got diff
1396 2cfc25ac 2022-03-13 thomas and can be reverted with
1397 2cfc25ac 2022-03-13 thomas .Cm got revert
1398 2cfc25ac 2022-03-13 thomas if needed.
1399 bfc91212 2022-03-13 thomas .Pp
1400 bfc91212 2022-03-13 thomas The options for
1401 bfc91212 2022-03-13 thomas .Cm got patch
1402 bfc91212 2022-03-13 thomas are as follows:
1403 bfc91212 2022-03-13 thomas .Bl -tag -width Ds
1404 7d8bcb99 2022-07-28 thomas .It Fl c Ar commit
1405 7d8bcb99 2022-07-28 thomas Use files found in in the specified
1406 7d8bcb99 2022-07-28 thomas .Ar commit
1407 7d8bcb99 2022-07-28 thomas as a merge base for 3-way merges, overriding the meta-data in
1408 7d8bcb99 2022-07-28 thomas .Ar patchfile
1409 7d8bcb99 2022-07-28 thomas .Pq if any .
1410 7d8bcb99 2022-07-28 thomas In case no merge-base is available for a file
1411 7d8bcb99 2022-07-28 thomas .Cm got patch
1412 7d8bcb99 2022-07-28 thomas will attempt to apply the changes without doing a 3-way merge.
1413 bfc91212 2022-03-13 thomas .It Fl n
1414 bfc91212 2022-03-13 thomas Do not make any modifications to the work tree.
1415 bfc91212 2022-03-13 thomas This can be used to check whether a patch would apply without issues.
1416 bfc91212 2022-03-13 thomas If the
1417 bfc91212 2022-03-13 thomas .Ar patchfile
1418 4b06140e 2022-03-22 thomas contains diffs that affect the same file multiple times, the results
1419 bfc91212 2022-03-13 thomas displayed may be incorrect.
1420 d9db2ff9 2022-04-16 thomas .It Fl p Ar strip-count
1421 d9db2ff9 2022-04-16 thomas Specify the number of leading path components to strip from paths
1422 d9db2ff9 2022-04-16 thomas parsed from
1423 d9db2ff9 2022-04-16 thomas .Ar patchfile .
1424 d9db2ff9 2022-04-16 thomas If the
1425 d9db2ff9 2022-04-16 thomas .Fl p
1426 d9db2ff9 2022-04-16 thomas option is not used,
1427 d9db2ff9 2022-04-16 thomas .Sq a/
1428 d9db2ff9 2022-04-16 thomas and
1429 d9db2ff9 2022-04-16 thomas .Sq b/
1430 d9db2ff9 2022-04-16 thomas path prefixes generated by
1431 d9db2ff9 2022-04-16 thomas .Xr git-diff 1
1432 d9db2ff9 2022-04-16 thomas will be recognized and stripped automatically.
1433 eaef698f 2022-04-23 thomas .It Fl R
1434 eaef698f 2022-04-23 thomas Reverse the patch before applying it.
1435 bfc91212 2022-03-13 thomas .El
1436 e8aa341a 2021-10-08 thomas .Tg rv
1437 dfc23429 2019-08-11 stsp .It Cm revert Oo Fl p Oc Oo Fl F Ar response-script Oc Oo Fl R Oc Ar path ...
1438 d912d125 2021-11-04 thomas .Dl Pq alias: Cm rv
1439 bd81cfb7 2020-04-19 stsp Revert any local changes in files at the specified paths in a work tree.
1440 a129376b 2019-03-28 stsp File contents will be overwritten with those contained in the
1441 1dd86744 2019-08-12 anthony work tree's base commit.
1442 1dd86744 2019-08-12 anthony There is no way to bring discarded changes back after
1443 a129376b 2019-03-28 stsp .Cm got revert !
1444 a129376b 2019-03-28 stsp .Pp
1445 e20a8b6f 2019-06-04 stsp If a file was added with
1446 4b06140e 2022-03-22 thomas .Cm got add ,
1447 a129376b 2019-03-28 stsp it will become an unversioned file again.
1448 e20a8b6f 2019-06-04 stsp If a file was deleted with
1449 4b06140e 2022-03-22 thomas .Cm got remove ,
1450 a129376b 2019-03-28 stsp it will be restored.
1451 0f6d7415 2019-08-08 stsp .Pp
1452 0f6d7415 2019-08-08 stsp The options for
1453 0f6d7415 2019-08-08 stsp .Cm got revert
1454 0f6d7415 2019-08-08 stsp are as follows:
1455 0f6d7415 2019-08-08 stsp .Bl -tag -width Ds
1456 33aa809d 2019-08-08 stsp .It Fl p
1457 33aa809d 2019-08-08 stsp Instead of reverting all changes in files, interactively select or reject
1458 33aa809d 2019-08-08 stsp changes to revert based on
1459 33aa809d 2019-08-08 stsp .Dq y
1460 33aa809d 2019-08-08 stsp (revert change),
1461 33aa809d 2019-08-08 stsp .Dq n
1462 33aa809d 2019-08-08 stsp (keep change), and
1463 33aa809d 2019-08-08 stsp .Dq q
1464 33aa809d 2019-08-08 stsp (quit reverting this file) responses.
1465 33aa809d 2019-08-08 stsp If a file is in modified status, individual patches derived from the
1466 33aa809d 2019-08-08 stsp modified file content can be reverted.
1467 33aa809d 2019-08-08 stsp Files in added or deleted status may only be reverted in their entirety.
1468 33aa809d 2019-08-08 stsp .It Fl F Ar response-script
1469 33aa809d 2019-08-08 stsp With the
1470 33aa809d 2019-08-08 stsp .Fl p
1471 33aa809d 2019-08-08 stsp option, read
1472 33aa809d 2019-08-08 stsp .Dq y ,
1473 33aa809d 2019-08-08 stsp .Dq n ,
1474 33aa809d 2019-08-08 stsp and
1475 33aa809d 2019-08-08 stsp .Dq q
1476 33aa809d 2019-08-08 stsp responses line-by-line from the specified
1477 33aa809d 2019-08-08 stsp .Ar response-script
1478 33aa809d 2019-08-08 stsp file instead of prompting interactively.
1479 0f6d7415 2019-08-08 stsp .It Fl R
1480 0f6d7415 2019-08-08 stsp Permit recursion into directories.
1481 0f6d7415 2019-08-08 stsp If this option is not specified,
1482 0f6d7415 2019-08-08 stsp .Cm got revert
1483 0f6d7415 2019-08-08 stsp will refuse to run if a specified
1484 0f6d7415 2019-08-08 stsp .Ar path
1485 0f6d7415 2019-08-08 stsp is a directory.
1486 0f6d7415 2019-08-08 stsp .El
1487 e8aa341a 2021-10-08 thomas .Tg ci
1488 18d1acad 2022-07-20 thomas .It Cm commit Oo Fl A Ar author Oc Oo Fl F Ar path Oc Oo Fl m Ar message Oc Oo Fl N Oc Oo Fl S Oc Op Ar path ...
1489 d912d125 2021-11-04 thomas .Dl Pq alias: Cm ci
1490 4ed9f614 2019-08-04 stsp Create a new commit in the repository from changes in a work tree
1491 15cd91f7 2019-05-12 stsp and use this commit as the new base commit for the work tree.
1492 5c1e53bc 2019-07-28 stsp If no
1493 90e8619e 2019-07-25 stsp .Ar path
1494 4ed9f614 2019-08-04 stsp is specified, commit all changes in the work tree.
1495 4ed9f614 2019-08-04 stsp Otherwise, commit changes at or within the specified paths.
1496 15cd91f7 2019-05-12 stsp .Pp
1497 4ed9f614 2019-08-04 stsp If changes have been explicitly staged for commit with
1498 1dd86744 2019-08-12 anthony .Cm got stage ,
1499 4ed9f614 2019-08-04 stsp only commit staged changes and reject any specified paths which
1500 4ed9f614 2019-08-04 stsp have not been staged.
1501 4ed9f614 2019-08-04 stsp .Pp
1502 28cf319f 2021-01-28 stsp .Cm got commit
1503 28cf319f 2021-01-28 stsp opens a temporary file in an editor where a log message can be written
1504 28cf319f 2021-01-28 stsp unless the
1505 28cf319f 2021-01-28 stsp .Fl m
1506 28cf319f 2021-01-28 stsp option is used
1507 28cf319f 2021-01-28 stsp or the
1508 28cf319f 2021-01-28 stsp .Fl F
1509 28cf319f 2021-01-28 stsp and
1510 28cf319f 2021-01-28 stsp .Fl N
1511 28cf319f 2021-01-28 stsp options are used together.
1512 28cf319f 2021-01-28 stsp .Pp
1513 15cd91f7 2019-05-12 stsp Show the status of each affected file, using the following status codes:
1514 15cd91f7 2019-05-12 stsp .Bl -column YXZ description
1515 15cd91f7 2019-05-12 stsp .It M Ta modified file
1516 15cd91f7 2019-05-12 stsp .It D Ta file was deleted
1517 15cd91f7 2019-05-12 stsp .It A Ta new file was added
1518 1ebedb77 2019-10-19 stsp .It m Ta modified file modes (executable bit only)
1519 15cd91f7 2019-05-12 stsp .El
1520 15cd91f7 2019-05-12 stsp .Pp
1521 996d5ccd 2019-08-05 stsp Files which are not part of the new commit will retain their previously
1522 996d5ccd 2019-08-05 stsp recorded base commit.
1523 15cd91f7 2019-05-12 stsp Some
1524 15cd91f7 2019-05-12 stsp .Nm
1525 15cd91f7 2019-05-12 stsp commands may refuse to run while the work tree contains files from
1526 15cd91f7 2019-05-12 stsp multiple base commits.
1527 15cd91f7 2019-05-12 stsp The base commit of such a work tree can be made consistent by running
1528 47ec7be7 2019-05-12 stsp .Cm got update
1529 47ec7be7 2019-05-12 stsp across the entire work tree.
1530 15cd91f7 2019-05-12 stsp .Pp
1531 15cd91f7 2019-05-12 stsp The
1532 15cd91f7 2019-05-12 stsp .Cm got commit
1533 15cd91f7 2019-05-12 stsp command requires the
1534 74416c47 2019-05-09 stsp .Ev GOT_AUTHOR
1535 aba9c984 2019-09-08 stsp environment variable to be set,
1536 257add31 2020-09-09 stsp unless an author has been configured in
1537 257add31 2020-09-09 stsp .Xr got.conf 5
1538 257add31 2020-09-09 stsp or Git's
1539 aba9c984 2019-09-08 stsp .Dv user.name
1540 aba9c984 2019-09-08 stsp and
1541 709ae9eb 2019-09-08 stsp .Dv user.email
1542 709ae9eb 2019-09-08 stsp configuration settings can be
1543 aba9c984 2019-09-08 stsp obtained from the repository's
1544 aba9c984 2019-09-08 stsp .Pa .git/config
1545 c9956ddf 2019-09-08 stsp file or from Git's global
1546 c9956ddf 2019-09-08 stsp .Pa ~/.gitconfig
1547 c9956ddf 2019-09-08 stsp configuration file.
1548 74416c47 2019-05-09 stsp .Pp
1549 74416c47 2019-05-09 stsp The options for
1550 74416c47 2019-05-09 stsp .Cm got commit
1551 74416c47 2019-05-09 stsp are as follows:
1552 74416c47 2019-05-09 stsp .Bl -tag -width Ds
1553 18d1acad 2022-07-20 thomas .It Fl A Ar author
1554 18d1acad 2022-07-20 thomas Set author information in the newly created commit to
1555 18d1acad 2022-07-20 thomas .Ar author .
1556 18d1acad 2022-07-20 thomas This is useful when committing changes which were written by someone
1557 18d1acad 2022-07-20 thomas else.
1558 18d1acad 2022-07-20 thomas The
1559 18d1acad 2022-07-20 thomas .Ar author
1560 18d1acad 2022-07-20 thomas argument must use the same format as the
1561 18d1acad 2022-07-20 thomas .Ev GOT_AUTHOR
1562 18d1acad 2022-07-20 thomas environment variable.
1563 18d1acad 2022-07-20 thomas .Pp
1564 18d1acad 2022-07-20 thomas In addition to storing author information, the newly created commit
1565 18d1acad 2022-07-20 thomas object will retain
1566 18d1acad 2022-07-20 thomas .Dq committer
1567 18d1acad 2022-07-20 thomas information which is obtained, as usual, from the
1568 18d1acad 2022-07-20 thomas .Ev GOT_AUTHOR
1569 18d1acad 2022-07-20 thomas environment variable, or
1570 18d1acad 2022-07-20 thomas .Xr got.conf 5 ,
1571 18d1acad 2022-07-20 thomas or Git configuration settings.
1572 28cf319f 2021-01-28 stsp .It Fl F Ar path
1573 28cf319f 2021-01-28 stsp Use the prepared log message stored in the file found at
1574 28cf319f 2021-01-28 stsp .Ar path
1575 28cf319f 2021-01-28 stsp when creating the new commit.
1576 28cf319f 2021-01-28 stsp .Cm got commit
1577 28cf319f 2021-01-28 stsp opens a temporary file in an editor where the prepared log message can be
1578 28cf319f 2021-01-28 stsp reviewed and edited further if needed.
1579 28cf319f 2021-01-28 stsp Cannot be used together with the
1580 23594da9 2019-05-13 stsp .Fl m
1581 28cf319f 2021-01-28 stsp option.
1582 28cf319f 2021-01-28 stsp .It Fl m Ar message
1583 28cf319f 2021-01-28 stsp Use the specified log message when creating the new commit.
1584 28cf319f 2021-01-28 stsp Cannot be used together with the
1585 28cf319f 2021-01-28 stsp .Fl F
1586 28cf319f 2021-01-28 stsp option.
1587 28cf319f 2021-01-28 stsp .It Fl N
1588 28cf319f 2021-01-28 stsp This option prevents
1589 23594da9 2019-05-13 stsp .Cm got commit
1590 28cf319f 2021-01-28 stsp from opening the commit message in an editor.
1591 28cf319f 2021-01-28 stsp It has no effect unless it is used together with the
1592 28cf319f 2021-01-28 stsp .Fl F
1593 28cf319f 2021-01-28 stsp option and is intended for non-interactive use such as scripting.
1594 35213c7c 2020-07-23 stsp .It Fl S
1595 af358f55 2020-07-23 stsp Allow the addition of symbolic links which point outside of the path space
1596 af358f55 2020-07-23 stsp that is under version control.
1597 af358f55 2020-07-23 stsp By default,
1598 af358f55 2020-07-23 stsp .Cm got commit
1599 af358f55 2020-07-23 stsp will reject such symbolic links due to safety concerns.
1600 35213c7c 2020-07-23 stsp As a precaution,
1601 35213c7c 2020-07-23 stsp .Nm
1602 af358f55 2020-07-23 stsp may decide to represent such a symbolic link as a regular file which contains
1603 af358f55 2020-07-23 stsp the link's target path, rather than creating an actual symbolic link which
1604 af358f55 2020-07-23 stsp points outside of the work tree.
1605 af358f55 2020-07-23 stsp Use of this option is discouraged because external mechanisms such as
1606 af358f55 2020-07-23 stsp .Dq make obj
1607 af358f55 2020-07-23 stsp are better suited for managing symbolic links to paths not under
1608 af358f55 2020-07-23 stsp version control.
1609 2ec1f75b 2019-03-26 stsp .El
1610 cfce0458 2019-07-28 stsp .Pp
1611 cfce0458 2019-07-28 stsp .Cm got commit
1612 cfce0458 2019-07-28 stsp will refuse to run if certain preconditions are not met.
1613 916f288c 2019-07-30 stsp If the work tree's current branch is not in the
1614 916f288c 2019-07-30 stsp .Dq refs/heads/
1615 916f288c 2019-07-30 stsp reference namespace, new commits may not be created on this branch.
1616 cfce0458 2019-07-28 stsp Local changes may only be committed if they are based on file content
1617 cfce0458 2019-07-28 stsp found in the most recent commit on the work tree's branch.
1618 cfce0458 2019-07-28 stsp If a path is found to be out of date,
1619 cfce0458 2019-07-28 stsp .Cm got update
1620 cfce0458 2019-07-28 stsp must be used first in order to merge local changes with changes made
1621 cfce0458 2019-07-28 stsp in the repository.
1622 e8aa341a 2021-10-08 thomas .Tg se
1623 f8a36e22 2021-08-26 stsp .It Cm send Oo Fl a Oc Oo Fl b Ar branch Oc Oo Fl d Ar branch Oc Oo Fl f Oc Oo Fl r Ar repository-path Oc Oo Fl t Ar tag Oc Oo Fl T Oc Oo Fl q Oc Oo Fl v Oc Op Ar remote-repository
1624 d912d125 2021-11-04 thomas .Dl Pq alias: Cm se
1625 f8a36e22 2021-08-26 stsp Send new changes to a remote repository.
1626 f8a36e22 2021-08-26 stsp If no
1627 f8a36e22 2021-08-26 stsp .Ar remote-repository
1628 f8a36e22 2021-08-26 stsp is specified,
1629 f8a36e22 2021-08-26 stsp .Dq origin
1630 f8a36e22 2021-08-26 stsp will be used.
1631 f8a36e22 2021-08-26 stsp The remote repository's URL is obtained from the corresponding entry in
1632 f8a36e22 2021-08-26 stsp .Xr got.conf 5
1633 f8a36e22 2021-08-26 stsp or Git's
1634 f8a36e22 2021-08-26 stsp .Pa config
1635 f8a36e22 2021-08-26 stsp file of the local repository, as created by
1636 f8a36e22 2021-08-26 stsp .Cm got clone .
1637 f8a36e22 2021-08-26 stsp .Pp
1638 f8a36e22 2021-08-26 stsp All objects corresponding to new changes will be written to a temporary
1639 f8a36e22 2021-08-26 stsp pack file which is then uploaded to the server.
1640 f8a36e22 2021-08-26 stsp Upon success, references in the
1641 f8a36e22 2021-08-26 stsp .Dq refs/remotes/
1642 f8a36e22 2021-08-26 stsp reference namespace of the local repository will be updated to point at
1643 f8a36e22 2021-08-26 stsp the commits which have been sent.
1644 f8a36e22 2021-08-26 stsp .Pp
1645 f8a36e22 2021-08-26 stsp By default, changes will only be sent if they are based on up-to-date
1646 f8a36e22 2021-08-26 stsp copies of relevant branches in the remote repository.
1647 fd44090b 2021-08-26 stsp If any changes to be sent are based on out-of-date copies or would
1648 fd44090b 2021-08-26 stsp otherwise break linear history of existing branches, new changes must
1649 fd44090b 2021-08-26 stsp be fetched from the server with
1650 f8a36e22 2021-08-26 stsp .Cm got fetch
1651 f8a36e22 2021-08-26 stsp and local branches must be rebased with
1652 f8a36e22 2021-08-26 stsp .Cm got rebase
1653 f8a36e22 2021-08-26 stsp before
1654 f8a36e22 2021-08-26 stsp .Cm got send
1655 f8a36e22 2021-08-26 stsp can succeed.
1656 fd44090b 2021-08-26 stsp The
1657 fd44090b 2021-08-26 stsp .Fl f
1658 fd44090b 2021-08-26 stsp option can be used to make exceptions to these requirements.
1659 f8a36e22 2021-08-26 stsp .Pp
1660 f8a36e22 2021-08-26 stsp The options for
1661 f8a36e22 2021-08-26 stsp .Cm got send
1662 f8a36e22 2021-08-26 stsp are as follows:
1663 f8a36e22 2021-08-26 stsp .Bl -tag -width Ds
1664 f8a36e22 2021-08-26 stsp .It Fl a
1665 f8a36e22 2021-08-26 stsp Send all branches from the local repository's
1666 f8a36e22 2021-08-26 stsp .Dq refs/heads/
1667 f8a36e22 2021-08-26 stsp reference namespace.
1668 f8a36e22 2021-08-26 stsp The
1669 f8a36e22 2021-08-26 stsp .Fl a
1670 f8a36e22 2021-08-26 stsp option is equivalent to listing all branches with multiple
1671 f8a36e22 2021-08-26 stsp .Fl b
1672 f8a36e22 2021-08-26 stsp options.
1673 f8a36e22 2021-08-26 stsp Cannot be used together with the
1674 f8a36e22 2021-08-26 stsp .Fl b
1675 f8a36e22 2021-08-26 stsp option.
1676 f8a36e22 2021-08-26 stsp .It Fl b Ar branch
1677 f8a36e22 2021-08-26 stsp Send the specified
1678 f8a36e22 2021-08-26 stsp .Ar branch
1679 f8a36e22 2021-08-26 stsp from the local repository's
1680 f8a36e22 2021-08-26 stsp .Dq refs/heads/
1681 f8a36e22 2021-08-26 stsp reference namespace.
1682 f8a36e22 2021-08-26 stsp This option may be specified multiple times to build a list of branches
1683 f8a36e22 2021-08-26 stsp to send.
1684 f8a36e22 2021-08-26 stsp If this option is not specified, default to the work tree's current branch
1685 f8a36e22 2021-08-26 stsp if invoked in a work tree, or to the repository's HEAD reference.
1686 f8a36e22 2021-08-26 stsp Cannot be used together with the
1687 f8a36e22 2021-08-26 stsp .Fl a
1688 f8a36e22 2021-08-26 stsp option.
1689 f8a36e22 2021-08-26 stsp .It Fl d Ar branch
1690 f8a36e22 2021-08-26 stsp Delete the specified
1691 f8a36e22 2021-08-26 stsp .Ar branch
1692 f8a36e22 2021-08-26 stsp from the remote repository's
1693 f8a36e22 2021-08-26 stsp .Dq refs/heads/
1694 f8a36e22 2021-08-26 stsp reference namespace.
1695 f8a36e22 2021-08-26 stsp This option may be specified multiple times to build a list of branches
1696 f8a36e22 2021-08-26 stsp to delete.
1697 f8a36e22 2021-08-26 stsp .Pp
1698 f8a36e22 2021-08-26 stsp Only references are deleted.
1699 f8a36e22 2021-08-26 stsp Any commit, tree, tag, and blob objects belonging to deleted branches
1700 f8a36e22 2021-08-26 stsp may become subject to deletion by Git's garbage collector running on
1701 f8a36e22 2021-08-26 stsp the server.
1702 f8a36e22 2021-08-26 stsp .Pp
1703 f8a36e22 2021-08-26 stsp Requesting deletion of branches results in an error if the server
1704 fd44090b 2021-08-26 stsp does not support this feature or disallows the deletion of branches
1705 fd44090b 2021-08-26 stsp based on its configuration.
1706 f8a36e22 2021-08-26 stsp .It Fl f
1707 fd44090b 2021-08-26 stsp Attempt to force the server to overwrite existing branches or tags
1708 fd44090b 2021-08-26 stsp in the remote repository, even when
1709 fd44090b 2021-08-26 stsp .Cm got fetch
1710 fd44090b 2021-08-26 stsp and
1711 fd44090b 2021-08-26 stsp .Cm got rebase
1712 fd44090b 2021-08-26 stsp would usually be required before changes can be sent.
1713 f8a36e22 2021-08-26 stsp The server may reject forced requests regardless, depending on its
1714 f8a36e22 2021-08-26 stsp configuration.
1715 f8a36e22 2021-08-26 stsp .Pp
1716 f8a36e22 2021-08-26 stsp Any commit, tree, tag, and blob objects belonging to overwritten branches
1717 f8a36e22 2021-08-26 stsp or tags may become subject to deletion by Git's garbage collector running
1718 f8a36e22 2021-08-26 stsp on the server.
1719 f8a36e22 2021-08-26 stsp .Pp
1720 f8a36e22 2021-08-26 stsp The
1721 f8a36e22 2021-08-26 stsp .Dq refs/tags
1722 f8a36e22 2021-08-26 stsp reference namespace is globally shared between all repositories.
1723 f8a36e22 2021-08-26 stsp Use of the
1724 f8a36e22 2021-08-26 stsp .Fl f
1725 f8a36e22 2021-08-26 stsp option to overwrite tags is discouraged because it can lead to
1726 f8a36e22 2021-08-26 stsp inconsistencies between the tags present in different repositories.
1727 f8a36e22 2021-08-26 stsp In general, creating a new tag with a different name is recommended
1728 f8a36e22 2021-08-26 stsp instead of overwriting an existing tag.
1729 f8a36e22 2021-08-26 stsp .Pp
1730 f8a36e22 2021-08-26 stsp Use of the
1731 f8a36e22 2021-08-26 stsp .Fl f
1732 f8a36e22 2021-08-26 stsp option is particularly discouraged if changes being sent are based
1733 f8a36e22 2021-08-26 stsp on an out-of-date copy of a branch in the remote repository.
1734 f8a36e22 2021-08-26 stsp Instead of using the
1735 f8a36e22 2021-08-26 stsp .Fl f
1736 f8a36e22 2021-08-26 stsp option, new changes should
1737 f8a36e22 2021-08-26 stsp be fetched with
1738 f8a36e22 2021-08-26 stsp .Cm got fetch
1739 f8a36e22 2021-08-26 stsp and local branches should be rebased with
1740 f8a36e22 2021-08-26 stsp .Cm got rebase ,
1741 f8a36e22 2021-08-26 stsp followed by another attempt to send the changes.
1742 f8a36e22 2021-08-26 stsp .Pp
1743 f8a36e22 2021-08-26 stsp The
1744 f8a36e22 2021-08-26 stsp .Fl f
1745 f8a36e22 2021-08-26 stsp option should only be needed in situations where the remote repository's
1746 f8a36e22 2021-08-26 stsp copy of a branch or tag is known to be out-of-date and is considered
1747 f8a36e22 2021-08-26 stsp disposable.
1748 f8a36e22 2021-08-26 stsp The risks of creating inconsistencies between different repositories
1749 f8a36e22 2021-08-26 stsp should also be taken into account.
1750 f8a36e22 2021-08-26 stsp .It Fl r Ar repository-path
1751 f8a36e22 2021-08-26 stsp Use the repository at the specified path.
1752 f8a36e22 2021-08-26 stsp If not specified, assume the repository is located at or above the current
1753 f8a36e22 2021-08-26 stsp working directory.
1754 f8a36e22 2021-08-26 stsp If this directory is a
1755 f8a36e22 2021-08-26 stsp .Nm
1756 f8a36e22 2021-08-26 stsp work tree, use the repository path associated with this work tree.
1757 f8a36e22 2021-08-26 stsp .It Fl t Ar tag
1758 f8a36e22 2021-08-26 stsp Send the specified
1759 f8a36e22 2021-08-26 stsp .Ar tag
1760 f8a36e22 2021-08-26 stsp from the local repository's
1761 f8a36e22 2021-08-26 stsp .Dq refs/tags/
1762 f8a36e22 2021-08-26 stsp reference namespace, in addition to any branches that are being sent.
1763 f8a36e22 2021-08-26 stsp The
1764 f8a36e22 2021-08-26 stsp .Fl t
1765 f8a36e22 2021-08-26 stsp option may be specified multiple times to build a list of tags to send.
1766 f8a36e22 2021-08-26 stsp No tags will be sent if the
1767 f8a36e22 2021-08-26 stsp .Fl t
1768 f8a36e22 2021-08-26 stsp option is not used.
1769 f8a36e22 2021-08-26 stsp .Pp
1770 f8a36e22 2021-08-26 stsp Raise an error if the specified
1771 f8a36e22 2021-08-26 stsp .Ar tag
1772 f8a36e22 2021-08-26 stsp already exists in the remote repository, unless the
1773 f8a36e22 2021-08-26 stsp .Fl f
1774 93a300b2 2021-08-26 stsp option is used to overwrite the server's copy of the tag.
1775 f8a36e22 2021-08-26 stsp In general, creating a new tag with a different name is recommended
1776 f8a36e22 2021-08-26 stsp instead of overwriting an existing tag.
1777 f8a36e22 2021-08-26 stsp .Pp
1778 f8a36e22 2021-08-26 stsp Cannot be used together with the
1779 f8a36e22 2021-08-26 stsp .Fl T
1780 f8a36e22 2021-08-26 stsp option.
1781 f8a36e22 2021-08-26 stsp .It Fl T
1782 f8a36e22 2021-08-26 stsp Attempt to send all tags from the local repository's
1783 f8a36e22 2021-08-26 stsp .Dq refs/tags/
1784 f8a36e22 2021-08-26 stsp reference namespace.
1785 f8a36e22 2021-08-26 stsp The
1786 f8a36e22 2021-08-26 stsp .Fl T
1787 f8a36e22 2021-08-26 stsp option is equivalent to listing all tags with multiple
1788 f8a36e22 2021-08-26 stsp .Fl t
1789 f8a36e22 2021-08-26 stsp options.
1790 f8a36e22 2021-08-26 stsp Cannot be used together with the
1791 f8a36e22 2021-08-26 stsp .Fl t
1792 f8a36e22 2021-08-26 stsp option.
1793 f8a36e22 2021-08-26 stsp .It Fl q
1794 f8a36e22 2021-08-26 stsp Suppress progress reporting output.
1795 f8a36e22 2021-08-26 stsp The same option will be passed to
1796 f8a36e22 2021-08-26 stsp .Xr ssh 1
1797 f8a36e22 2021-08-26 stsp if applicable.
1798 f8a36e22 2021-08-26 stsp .It Fl v
1799 f8a36e22 2021-08-26 stsp Verbose mode.
1800 f8a36e22 2021-08-26 stsp Causes
1801 f8a36e22 2021-08-26 stsp .Cm got send
1802 f8a36e22 2021-08-26 stsp to print debugging messages to standard error output.
1803 f8a36e22 2021-08-26 stsp The same option will be passed to
1804 f8a36e22 2021-08-26 stsp .Xr ssh 1
1805 f8a36e22 2021-08-26 stsp if applicable.
1806 f8a36e22 2021-08-26 stsp Multiple -v options increase the verbosity.
1807 f8a36e22 2021-08-26 stsp The maximum is 3.
1808 f8a36e22 2021-08-26 stsp .El
1809 e8aa341a 2021-10-08 thomas .Tg cy
1810 234035bc 2019-06-01 stsp .It Cm cherrypick Ar commit
1811 d912d125 2021-11-04 thomas .Dl Pq alias: Cm cy
1812 234035bc 2019-06-01 stsp Merge changes from a single
1813 234035bc 2019-06-01 stsp .Ar commit
1814 234035bc 2019-06-01 stsp into the work tree.
1815 234035bc 2019-06-01 stsp The specified
1816 234035bc 2019-06-01 stsp .Ar commit
1817 a16d97bd 2021-09-02 stsp should be on a different branch than the work tree's base commit.
1818 a54b6686 2019-06-28 stsp The expected argument is a reference or a commit ID SHA1 hash.
1819 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1820 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
1821 234035bc 2019-06-01 stsp .Pp
1822 234035bc 2019-06-01 stsp Show the status of each affected file, using the following status codes:
1823 234035bc 2019-06-01 stsp .Bl -column YXZ description
1824 234035bc 2019-06-01 stsp .It G Ta file was merged
1825 234035bc 2019-06-01 stsp .It C Ta file was merged and conflicts occurred during merge
1826 234035bc 2019-06-01 stsp .It ! Ta changes destined for a missing file were not merged
1827 234035bc 2019-06-01 stsp .It D Ta file was deleted
1828 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
1829 234035bc 2019-06-01 stsp .It A Ta new file was added
1830 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1831 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
1832 74416c47 2019-05-09 stsp .El
1833 234035bc 2019-06-01 stsp .Pp
1834 234035bc 2019-06-01 stsp The merged changes will appear as local changes in the work tree, which
1835 234035bc 2019-06-01 stsp may be viewed with
1836 234035bc 2019-06-01 stsp .Cm got diff ,
1837 234035bc 2019-06-01 stsp amended manually or with further
1838 234035bc 2019-06-01 stsp .Cm got cherrypick
1839 bc3056e3 2019-08-18 stsp commands,
1840 234035bc 2019-06-01 stsp committed with
1841 234035bc 2019-06-01 stsp .Cm got commit ,
1842 234035bc 2019-06-01 stsp or discarded again with
1843 234035bc 2019-06-01 stsp .Cm got revert .
1844 234035bc 2019-06-01 stsp .Pp
1845 234035bc 2019-06-01 stsp .Cm got cherrypick
1846 234035bc 2019-06-01 stsp will refuse to run if certain preconditions are not met.
1847 4b06140e 2022-03-22 thomas If the work tree contains multiple base commits, it must first be updated
1848 234035bc 2019-06-01 stsp to a single base commit with
1849 234035bc 2019-06-01 stsp .Cm got update .
1850 69de9dd4 2021-09-03 stsp If any relevant files already contain merge conflicts, these
1851 234035bc 2019-06-01 stsp conflicts must be resolved first.
1852 e8aa341a 2021-10-08 thomas .Tg bo
1853 5ef14e63 2019-06-02 stsp .It Cm backout Ar commit
1854 d912d125 2021-11-04 thomas .Dl Pq alias: Cm bo
1855 5ef14e63 2019-06-02 stsp Reverse-merge changes from a single
1856 5ef14e63 2019-06-02 stsp .Ar commit
1857 5ef14e63 2019-06-02 stsp into the work tree.
1858 5ef14e63 2019-06-02 stsp The specified
1859 5ef14e63 2019-06-02 stsp .Ar commit
1860 a16d97bd 2021-09-02 stsp should be on the same branch as the work tree's base commit.
1861 a54b6686 2019-06-28 stsp The expected argument is a reference or a commit ID SHA1 hash.
1862 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1863 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
1864 5ef14e63 2019-06-02 stsp .Pp
1865 5ef14e63 2019-06-02 stsp Show the status of each affected file, using the following status codes:
1866 5ef14e63 2019-06-02 stsp .Bl -column YXZ description
1867 5ef14e63 2019-06-02 stsp .It G Ta file was merged
1868 5ef14e63 2019-06-02 stsp .It C Ta file was merged and conflicts occurred during merge
1869 5ef14e63 2019-06-02 stsp .It ! Ta changes destined for a missing file were not merged
1870 5ef14e63 2019-06-02 stsp .It D Ta file was deleted
1871 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
1872 5ef14e63 2019-06-02 stsp .It A Ta new file was added
1873 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1874 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
1875 234035bc 2019-06-01 stsp .El
1876 5ef14e63 2019-06-02 stsp .Pp
1877 5ef14e63 2019-06-02 stsp The reverse-merged changes will appear as local changes in the work tree,
1878 5ef14e63 2019-06-02 stsp which may be viewed with
1879 5ef14e63 2019-06-02 stsp .Cm got diff ,
1880 5ef14e63 2019-06-02 stsp amended manually or with further
1881 778a73c2 2019-07-12 stsp .Cm got backout
1882 bc3056e3 2019-08-18 stsp commands,
1883 5ef14e63 2019-06-02 stsp committed with
1884 5ef14e63 2019-06-02 stsp .Cm got commit ,
1885 5ef14e63 2019-06-02 stsp or discarded again with
1886 5ef14e63 2019-06-02 stsp .Cm got revert .
1887 5ef14e63 2019-06-02 stsp .Pp
1888 92228c38 2019-06-02 stsp .Cm got backout
1889 92228c38 2019-06-02 stsp will refuse to run if certain preconditions are not met.
1890 4b06140e 2022-03-22 thomas If the work tree contains multiple base commits, it must first be updated
1891 92228c38 2019-06-02 stsp to a single base commit with
1892 92228c38 2019-06-02 stsp .Cm got update .
1893 69de9dd4 2021-09-03 stsp If any relevant files already contain merge conflicts, these
1894 92228c38 2019-06-02 stsp conflicts must be resolved first.
1895 e8aa341a 2021-10-08 thomas .Tg rb
1896 643b85bc 2021-07-16 stsp .It Cm rebase Oo Fl a Oc Oo Fl c Oc Oo Fl l Oc Oo Fl X Oc Op Ar branch
1897 d912d125 2021-11-04 thomas .Dl Pq alias: Cm rb
1898 818c7501 2019-07-11 stsp Rebase commits on the specified
1899 818c7501 2019-07-11 stsp .Ar branch
1900 818c7501 2019-07-11 stsp onto the tip of the current branch of the work tree.
1901 818c7501 2019-07-11 stsp The
1902 818c7501 2019-07-11 stsp .Ar branch
1903 818c7501 2019-07-11 stsp must share common ancestry with the work tree's current branch.
1904 bc3056e3 2019-08-18 stsp Rebasing begins with the first descendant commit of the youngest
1905 f09e2405 2019-07-11 stsp common ancestor commit shared by the specified
1906 818c7501 2019-07-11 stsp .Ar branch
1907 818c7501 2019-07-11 stsp and the work tree's current branch, and stops once the tip commit
1908 f09e2405 2019-07-11 stsp of the specified
1909 818c7501 2019-07-11 stsp .Ar branch
1910 f09e2405 2019-07-11 stsp has been rebased.
1911 818c7501 2019-07-11 stsp .Pp
1912 2b6826ba 2020-02-24 stsp When
1913 2b6826ba 2020-02-24 stsp .Cm got rebase
1914 2b6826ba 2020-02-24 stsp is used as intended, the specified
1915 2b6826ba 2020-02-24 stsp .Ar branch
1916 c10890ce 2020-02-25 stsp represents a local commit history and may already contain changes
1917 c10890ce 2020-02-25 stsp that are not yet visible in any other repositories.
1918 2b6826ba 2020-02-24 stsp The work tree's current branch, which must be set with
1919 2b6826ba 2020-02-24 stsp .Cm got update -b
1920 2b6826ba 2020-02-24 stsp before starting the
1921 2b6826ba 2020-02-24 stsp .Cm rebase
1922 2b6826ba 2020-02-24 stsp operation, represents a branch from a remote repository which shares
1923 2b6826ba 2020-02-24 stsp a common history with the specified
1924 2b6826ba 2020-02-24 stsp .Ar branch
1925 c10890ce 2020-02-25 stsp but has progressed, and perhaps diverged, due to commits added to the
1926 c10890ce 2020-02-25 stsp remote repository.
1927 2b6826ba 2020-02-24 stsp .Pp
1928 c6b4581b 2019-07-28 stsp Rebased commits are accumulated on a temporary branch which the work tree
1929 c6b4581b 2019-07-28 stsp will remain switched to throughout the entire rebase operation.
1930 c6b4581b 2019-07-28 stsp Commits on this branch represent the same changes with the same log
1931 c6b4581b 2019-07-28 stsp messages as their counterparts on the original
1932 818c7501 2019-07-11 stsp .Ar branch ,
1933 818c7501 2019-07-11 stsp but with different commit IDs.
1934 818c7501 2019-07-11 stsp Once rebasing has completed successfully, the temporary branch becomes
1935 f09e2405 2019-07-11 stsp the new version of the specified
1936 818c7501 2019-07-11 stsp .Ar branch
1937 818c7501 2019-07-11 stsp and the work tree is automatically switched to it.
1938 d4dddcbf 2022-07-22 thomas If author information is available via the
1939 d4dddcbf 2022-07-22 thomas .Ev GOT_AUTHOR
1940 d4dddcbf 2022-07-22 thomas environment variable,
1941 d4dddcbf 2022-07-22 thomas .Xr got.conf 5
1942 d4dddcbf 2022-07-22 thomas or Git's
1943 d4dddcbf 2022-07-22 thomas .Dv user.name
1944 d4dddcbf 2022-07-22 thomas and
1945 d4dddcbf 2022-07-22 thomas .Dv user.email
1946 d4dddcbf 2022-07-22 thomas configuration settings, this author information will be used to identify
1947 d4dddcbf 2022-07-22 thomas the
1948 d4dddcbf 2022-07-22 thomas .Dq committer
1949 d4dddcbf 2022-07-22 thomas of rebased commits.
1950 e600f124 2021-03-21 stsp .Pp
1951 1795b260 2021-04-02 kn Old commits in their pre-rebase state are automatically backed up in the
1952 e600f124 2021-03-21 stsp .Dq refs/got/backup/rebase
1953 e600f124 2021-03-21 stsp reference namespace.
1954 e600f124 2021-03-21 stsp As long as these references are not removed older versions of rebased
1955 e600f124 2021-03-21 stsp commits will remain in the repository and can be viewed with the
1956 e600f124 2021-03-21 stsp .Cm got rebase -l
1957 e600f124 2021-03-21 stsp command.
1958 e600f124 2021-03-21 stsp Removal of these references makes objects which become unreachable via
1959 e6786710 2021-07-03 stsp any reference subject to removal by Git's garbage collector or
1960 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
1961 818c7501 2019-07-11 stsp .Pp
1962 818c7501 2019-07-11 stsp While rebasing commits, show the status of each affected file,
1963 818c7501 2019-07-11 stsp using the following status codes:
1964 818c7501 2019-07-11 stsp .Bl -column YXZ description
1965 818c7501 2019-07-11 stsp .It G Ta file was merged
1966 818c7501 2019-07-11 stsp .It C Ta file was merged and conflicts occurred during merge
1967 818c7501 2019-07-11 stsp .It ! Ta changes destined for a missing file were not merged
1968 818c7501 2019-07-11 stsp .It D Ta file was deleted
1969 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
1970 818c7501 2019-07-11 stsp .It A Ta new file was added
1971 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1972 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
1973 5ef14e63 2019-06-02 stsp .El
1974 818c7501 2019-07-11 stsp .Pp
1975 4b06140e 2022-03-22 thomas If merge conflicts occur, the rebase operation is interrupted and may
1976 f09e2405 2019-07-11 stsp be continued once conflicts have been resolved.
1977 bb494413 2021-09-28 thomas If any files with destined changes are found to be missing or unversioned,
1978 bb494413 2021-09-28 thomas or if files could not be deleted due to differences in deleted content,
1979 bb494413 2021-09-28 thomas the rebase operation will be interrupted to prevent potentially incomplete
1980 bb494413 2021-09-28 thomas changes from being committed to the repository without user intervention.
1981 bb494413 2021-09-28 thomas The work tree may be modified as desired and the rebase operation can be
1982 bb494413 2021-09-28 thomas continued once the changes present in the work tree are considered complete.
1983 818c7501 2019-07-11 stsp Alternatively, the rebase operation may be aborted which will leave
1984 818c7501 2019-07-11 stsp .Ar branch
1985 818c7501 2019-07-11 stsp unmodified and the work tree switched back to its original branch.
1986 818c7501 2019-07-11 stsp .Pp
1987 ff0d2220 2019-07-11 stsp If a merge conflict is resolved in a way which renders the merged
1988 f09e2405 2019-07-11 stsp change into a no-op change, the corresponding commit will be elided
1989 f09e2405 2019-07-11 stsp when the rebase operation continues.
1990 ff0d2220 2019-07-11 stsp .Pp
1991 818c7501 2019-07-11 stsp .Cm got rebase
1992 818c7501 2019-07-11 stsp will refuse to run if certain preconditions are not met.
1993 a85446b2 2020-01-04 stsp If the work tree is not yet fully updated to the tip commit of its
1994 4b06140e 2022-03-22 thomas branch, then the work tree must first be updated with
1995 818c7501 2019-07-11 stsp .Cm got update .
1996 4ed9f614 2019-08-04 stsp If changes have been staged with
1997 4ed9f614 2019-08-04 stsp .Cm got stage ,
1998 bc3056e3 2019-08-18 stsp these changes must first be committed with
1999 4ed9f614 2019-08-04 stsp .Cm got commit
2000 4ed9f614 2019-08-04 stsp or unstaged with
2001 4ed9f614 2019-08-04 stsp .Cm got unstage .
2002 f09e2405 2019-07-11 stsp If the work tree contains local changes, these changes must first be
2003 f09e2405 2019-07-11 stsp committed with
2004 f09e2405 2019-07-11 stsp .Cm got commit
2005 f09e2405 2019-07-11 stsp or reverted with
2006 f09e2405 2019-07-11 stsp .Cm got revert .
2007 64c6d990 2019-07-11 stsp If the
2008 64c6d990 2019-07-11 stsp .Ar branch
2009 64c6d990 2019-07-11 stsp contains changes to files outside of the work tree's path prefix,
2010 64c6d990 2019-07-11 stsp the work tree cannot be used to rebase this branch.
2011 818c7501 2019-07-11 stsp .Pp
2012 7d5807f4 2019-07-11 stsp The
2013 7d5807f4 2019-07-11 stsp .Cm got update
2014 7d5807f4 2019-07-11 stsp and
2015 7d5807f4 2019-07-11 stsp .Cm got commit
2016 7d5807f4 2019-07-11 stsp commands will refuse to run while a rebase operation is in progress.
2017 7d5807f4 2019-07-11 stsp Other commands which manipulate the work tree may be used for
2018 7d5807f4 2019-07-11 stsp conflict resolution purposes.
2019 818c7501 2019-07-11 stsp .Pp
2020 d10218e7 2021-11-04 thomas If the specified
2021 d10218e7 2021-11-04 thomas .Ar branch
2022 4b06140e 2022-03-22 thomas is already based on the work tree's current branch, then no commits
2023 d10218e7 2021-11-04 thomas need to be rebased and
2024 d10218e7 2021-11-04 thomas .Cm got rebase
2025 d10218e7 2021-11-04 thomas will simply switch the work tree to the specified
2026 d10218e7 2021-11-04 thomas .Ar branch
2027 d10218e7 2021-11-04 thomas and update files in the work tree accordingly.
2028 d10218e7 2021-11-04 thomas .Pp
2029 818c7501 2019-07-11 stsp The options for
2030 818c7501 2019-07-11 stsp .Cm got rebase
2031 818c7501 2019-07-11 stsp are as follows:
2032 818c7501 2019-07-11 stsp .Bl -tag -width Ds
2033 818c7501 2019-07-11 stsp .It Fl a
2034 818c7501 2019-07-11 stsp Abort an interrupted rebase operation.
2035 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
2036 818c7501 2019-07-11 stsp .It Fl c
2037 06067b48 2019-07-11 stsp Continue an interrupted rebase operation.
2038 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
2039 e600f124 2021-03-21 stsp .It Fl l
2040 e600f124 2021-03-21 stsp Show a list of past rebase operations, represented by references in the
2041 e600f124 2021-03-21 stsp .Dq refs/got/backup/rebase
2042 e600f124 2021-03-21 stsp reference namespace.
2043 e600f124 2021-03-21 stsp .Pp
2044 e600f124 2021-03-21 stsp Display the author, date, and log message of each backed up commit,
2045 e600f124 2021-03-21 stsp the object ID of the corresponding post-rebase commit, and
2046 e600f124 2021-03-21 stsp the object ID of their common ancestor commit.
2047 e600f124 2021-03-21 stsp Given these object IDs,
2048 e600f124 2021-03-21 stsp the
2049 e600f124 2021-03-21 stsp .Cm got log
2050 e600f124 2021-03-21 stsp command with the
2051 e600f124 2021-03-21 stsp .Fl c
2052 e600f124 2021-03-21 stsp and
2053 e600f124 2021-03-21 stsp .Fl x
2054 e600f124 2021-03-21 stsp options can be used to examine the history of either version of the branch,
2055 e600f124 2021-03-21 stsp and the
2056 e600f124 2021-03-21 stsp .Cm got branch
2057 e600f124 2021-03-21 stsp command with the
2058 e600f124 2021-03-21 stsp .Fl c
2059 e600f124 2021-03-21 stsp option can be used to create a new branch from a pre-rebase state if desired.
2060 e600f124 2021-03-21 stsp .Pp
2061 e600f124 2021-03-21 stsp If a
2062 e600f124 2021-03-21 stsp .Ar branch
2063 e600f124 2021-03-21 stsp is specified, only show commits which at some point in time represented this
2064 e600f124 2021-03-21 stsp branch.
2065 e600f124 2021-03-21 stsp Otherwise, list all backed up commits for any branches.
2066 e600f124 2021-03-21 stsp .Pp
2067 e600f124 2021-03-21 stsp If this option is used,
2068 e600f124 2021-03-21 stsp .Cm got rebase
2069 e600f124 2021-03-21 stsp does not require a work tree.
2070 e600f124 2021-03-21 stsp None of the other options can be used together with
2071 e600f124 2021-03-21 stsp .Fl l .
2072 643b85bc 2021-07-16 stsp .It Fl X
2073 643b85bc 2021-07-16 stsp Delete backups created by past rebase operations, represented by references
2074 643b85bc 2021-07-16 stsp in the
2075 643b85bc 2021-07-16 stsp .Dq refs/got/backup/rebase
2076 643b85bc 2021-07-16 stsp reference namespace.
2077 643b85bc 2021-07-16 stsp .Pp
2078 643b85bc 2021-07-16 stsp If a
2079 643b85bc 2021-07-16 stsp .Ar branch
2080 643b85bc 2021-07-16 stsp is specified, only delete backups which at some point in time represented
2081 643b85bc 2021-07-16 stsp this branch.
2082 643b85bc 2021-07-16 stsp Otherwise, delete all references found within
2083 643b85bc 2021-07-16 stsp .Dq refs/got/backup/rebase .
2084 643b85bc 2021-07-16 stsp .Pp
2085 643b85bc 2021-07-16 stsp Any commit, tree, tag, and blob objects belonging to deleted backups
2086 643b85bc 2021-07-16 stsp remain in the repository and may be removed separately with
2087 643b85bc 2021-07-16 stsp Git's garbage collector or
2088 643b85bc 2021-07-16 stsp .Cm gotadmin cleanup .
2089 643b85bc 2021-07-16 stsp .Pp
2090 643b85bc 2021-07-16 stsp If this option is used,
2091 643b85bc 2021-07-16 stsp .Cm got rebase
2092 643b85bc 2021-07-16 stsp does not require a work tree.
2093 643b85bc 2021-07-16 stsp None of the other options can be used together with
2094 643b85bc 2021-07-16 stsp .Fl X .
2095 818c7501 2019-07-11 stsp .El
2096 e8aa341a 2021-10-08 thomas .Tg he
2097 c50a7455 2021-10-04 thomas .It Cm histedit Oo Fl a Oc Oo Fl c Oc Oo Fl e Oc Oo Fl f Oc Oo Fl F Ar histedit-script Oc Oo Fl m Oc Oo Fl l Oc Oo Fl X Oc Op Ar branch
2098 d912d125 2021-11-04 thomas .Dl Pq alias: Cm he
2099 0ebf8283 2019-07-24 stsp Edit commit history between the work tree's current base commit and
2100 0ebf8283 2019-07-24 stsp the tip commit of the work tree's current branch.
2101 d4dddcbf 2022-07-22 thomas .Pp
2102 d4dddcbf 2022-07-22 thomas The
2103 d4dddcbf 2022-07-22 thomas .Cm got histedit
2104 d4dddcbf 2022-07-22 thomas command requires the
2105 d4dddcbf 2022-07-22 thomas .Ev GOT_AUTHOR
2106 d4dddcbf 2022-07-22 thomas environment variable to be set,
2107 d4dddcbf 2022-07-22 thomas unless an author has been configured in
2108 d4dddcbf 2022-07-22 thomas .Xr got.conf 5
2109 d4dddcbf 2022-07-22 thomas or Git's
2110 d4dddcbf 2022-07-22 thomas .Dv user.name
2111 d4dddcbf 2022-07-22 thomas and
2112 d4dddcbf 2022-07-22 thomas .Dv user.email
2113 d4dddcbf 2022-07-22 thomas configuration settings can be obtained from the repository's
2114 d4dddcbf 2022-07-22 thomas .Pa .git/config
2115 d4dddcbf 2022-07-22 thomas file or from Git's global
2116 d4dddcbf 2022-07-22 thomas .Pa ~/.gitconfig
2117 d4dddcbf 2022-07-22 thomas configuration file.
2118 6e54d307 2020-02-24 stsp .Pp
2119 6e54d307 2020-02-24 stsp Before starting a
2120 6e54d307 2020-02-24 stsp .Cm histedit
2121 4b06140e 2022-03-22 thomas operation, the work tree's current branch must be set with
2122 6e54d307 2020-02-24 stsp .Cm got update -b
2123 6e54d307 2020-02-24 stsp to the branch which should be edited, unless this branch is already the
2124 6e54d307 2020-02-24 stsp current branch of the work tree.
2125 6e54d307 2020-02-24 stsp The tip of this branch represents the upper bound (inclusive) of commits
2126 6e54d307 2020-02-24 stsp touched by the
2127 6e54d307 2020-02-24 stsp .Cm histedit
2128 6e54d307 2020-02-24 stsp operation.
2129 0ebf8283 2019-07-24 stsp .Pp
2130 6e54d307 2020-02-24 stsp Furthermore, the work tree's base commit
2131 6e54d307 2020-02-24 stsp must be set with
2132 6e54d307 2020-02-24 stsp .Cm got update -c
2133 6e54d307 2020-02-24 stsp to a point in this branch's commit history where editing should begin.
2134 6e54d307 2020-02-24 stsp This commit represents the lower bound (non-inclusive) of commits touched
2135 6e54d307 2020-02-24 stsp by the
2136 6e54d307 2020-02-24 stsp .Cm histedit
2137 6e54d307 2020-02-24 stsp operation.
2138 6e54d307 2020-02-24 stsp .Pp
2139 0ebf8283 2019-07-24 stsp Editing of commit history is controlled via a
2140 0ebf8283 2019-07-24 stsp .Ar histedit script
2141 46fa4c83 2020-02-24 stsp which can be written in an editor based on a template, passed on the
2142 46fa4c83 2020-02-24 stsp command line, or generated with the
2143 466785b9 2020-12-10 jrick .Fl f
2144 466785b9 2020-12-10 jrick or
2145 083957f4 2020-02-24 stsp .Fl m
2146 466785b9 2020-12-10 jrick options.
2147 083957f4 2020-02-24 stsp .Pp
2148 0ebf8283 2019-07-24 stsp The format of the histedit script is line-based.
2149 0ebf8283 2019-07-24 stsp Each line in the script begins with a command name, followed by
2150 0ebf8283 2019-07-24 stsp whitespace and an argument.
2151 0ebf8283 2019-07-24 stsp For most commands, the expected argument is a commit ID SHA1 hash.
2152 0ebf8283 2019-07-24 stsp Any remaining text on the line is ignored.
2153 0ebf8283 2019-07-24 stsp Lines which begin with the
2154 0ebf8283 2019-07-24 stsp .Sq #
2155 0ebf8283 2019-07-24 stsp character are ignored entirely.
2156 0ebf8283 2019-07-24 stsp .Pp
2157 f3a5718a 2022-07-12 thomas The available histedit script commands are as follows:
2158 0ebf8283 2019-07-24 stsp .Bl -column YXZ pick-commit
2159 f3a5718a 2022-07-12 thomas .It Cm pick Ar commit Ta Use the specified commit as it is.
2160 f3a5718a 2022-07-12 thomas .It Cm edit Ar commit Ta Use the specified commit but once changes have been
2161 0ebf8283 2019-07-24 stsp merged into the work tree interrupt the histedit operation for amending.
2162 f3a5718a 2022-07-12 thomas .It Cm fold Ar commit Ta Combine the specified commit with the next commit
2163 0ebf8283 2019-07-24 stsp listed further below that will be used.
2164 f3a5718a 2022-07-12 thomas .It Cm drop Ar commit Ta Remove this commit from the edited history.
2165 f3a5718a 2022-07-12 thomas .It Cm mesg Oo Ar log-message Oc Ta Create a new log message for the commit of
2166 f3a5718a 2022-07-12 thomas a preceding
2167 f3a5718a 2022-07-12 thomas .Cm pick
2168 f3a5718a 2022-07-12 thomas or
2169 f3a5718a 2022-07-12 thomas .Cm edit
2170 f3a5718a 2022-07-12 thomas command on the previous line of the histedit script.
2171 eefbc049 2022-07-12 thomas The optional
2172 eefbc049 2022-07-12 thomas .Ar log-message
2173 eefbc049 2022-07-12 thomas argument provides a new single-line log message to use.
2174 eefbc049 2022-07-12 thomas If the
2175 eefbc049 2022-07-12 thomas .Ar log-message
2176 eefbc049 2022-07-12 thomas argument is omitted, open an editor where a new log message can be written.
2177 0ebf8283 2019-07-24 stsp .El
2178 0ebf8283 2019-07-24 stsp .Pp
2179 ba67992e 2019-07-25 stsp Every commit in the history being edited must be mentioned in the script.
2180 0ebf8283 2019-07-24 stsp Lines may be re-ordered to change the order of commits in the edited history.
2181 5b87815e 2020-03-05 stsp No commit may be listed more than once.
2182 0ebf8283 2019-07-24 stsp .Pp
2183 c6b4581b 2019-07-28 stsp Edited commits are accumulated on a temporary branch which the work tree
2184 c6b4581b 2019-07-28 stsp will remain switched to throughout the entire histedit operation.
2185 0ebf8283 2019-07-24 stsp Once history editing has completed successfully, the temporary branch becomes
2186 498a90b7 2019-07-25 stsp the new version of the work tree's branch and the work tree is automatically
2187 498a90b7 2019-07-25 stsp switched to it.
2188 0ebf8283 2019-07-24 stsp .Pp
2189 1795b260 2021-04-02 kn Old commits in their pre-histedit state are automatically backed up in the
2190 e600f124 2021-03-21 stsp .Dq refs/got/backup/histedit
2191 e600f124 2021-03-21 stsp reference namespace.
2192 e600f124 2021-03-21 stsp As long as these references are not removed older versions of edited
2193 e600f124 2021-03-21 stsp commits will remain in the repository and can be viewed with the
2194 e600f124 2021-03-21 stsp .Cm got histedit -l
2195 e600f124 2021-03-21 stsp command.
2196 e600f124 2021-03-21 stsp Removal of these references makes objects which become unreachable via
2197 e6786710 2021-07-03 stsp any reference subject to removal by Git's garbage collector or
2198 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
2199 e600f124 2021-03-21 stsp .Pp
2200 0ebf8283 2019-07-24 stsp While merging commits, show the status of each affected file,
2201 0ebf8283 2019-07-24 stsp using the following status codes:
2202 0ebf8283 2019-07-24 stsp .Bl -column YXZ description
2203 0ebf8283 2019-07-24 stsp .It G Ta file was merged
2204 0ebf8283 2019-07-24 stsp .It C Ta file was merged and conflicts occurred during merge
2205 0ebf8283 2019-07-24 stsp .It ! Ta changes destined for a missing file were not merged
2206 0ebf8283 2019-07-24 stsp .It D Ta file was deleted
2207 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
2208 0ebf8283 2019-07-24 stsp .It A Ta new file was added
2209 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
2210 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
2211 0ebf8283 2019-07-24 stsp .El
2212 0ebf8283 2019-07-24 stsp .Pp
2213 4b06140e 2022-03-22 thomas If merge conflicts occur, the histedit operation is interrupted and may
2214 0ebf8283 2019-07-24 stsp be continued once conflicts have been resolved.
2215 dddbe150 2021-09-28 thomas If any files with destined changes are found to be missing or unversioned,
2216 dddbe150 2021-09-28 thomas or if files could not be deleted due to differences in deleted content,
2217 dddbe150 2021-09-28 thomas the histedit operation will be interrupted to prevent potentially incomplete
2218 dddbe150 2021-09-28 thomas changes from being committed to the repository without user intervention.
2219 dddbe150 2021-09-28 thomas The work tree may be modified as desired and the histedit operation can be
2220 dddbe150 2021-09-28 thomas continued once the changes present in the work tree are considered complete.
2221 0ebf8283 2019-07-24 stsp Alternatively, the histedit operation may be aborted which will leave
2222 0ebf8283 2019-07-24 stsp the work tree switched back to its original branch.
2223 0ebf8283 2019-07-24 stsp .Pp
2224 0ebf8283 2019-07-24 stsp If a merge conflict is resolved in a way which renders the merged
2225 0ebf8283 2019-07-24 stsp change into a no-op change, the corresponding commit will be elided
2226 0ebf8283 2019-07-24 stsp when the histedit operation continues.
2227 0ebf8283 2019-07-24 stsp .Pp
2228 0ebf8283 2019-07-24 stsp .Cm got histedit
2229 0ebf8283 2019-07-24 stsp will refuse to run if certain preconditions are not met.
2230 c7d20a3f 2019-07-30 stsp If the work tree's current branch is not in the
2231 c7d20a3f 2019-07-30 stsp .Dq refs/heads/
2232 c7d20a3f 2019-07-30 stsp reference namespace, the history of the branch may not be edited.
2233 4b06140e 2022-03-22 thomas If the work tree contains multiple base commits, it must first be updated
2234 0ebf8283 2019-07-24 stsp to a single base commit with
2235 0ebf8283 2019-07-24 stsp .Cm got update .
2236 4ed9f614 2019-08-04 stsp If changes have been staged with
2237 4ed9f614 2019-08-04 stsp .Cm got stage ,
2238 bc3056e3 2019-08-18 stsp these changes must first be committed with
2239 4ed9f614 2019-08-04 stsp .Cm got commit
2240 4ed9f614 2019-08-04 stsp or unstaged with
2241 4ed9f614 2019-08-04 stsp .Cm got unstage .
2242 0ebf8283 2019-07-24 stsp If the work tree contains local changes, these changes must first be
2243 0ebf8283 2019-07-24 stsp committed with
2244 0ebf8283 2019-07-24 stsp .Cm got commit
2245 0ebf8283 2019-07-24 stsp or reverted with
2246 0ebf8283 2019-07-24 stsp .Cm got revert .
2247 0ebf8283 2019-07-24 stsp If the edited history contains changes to files outside of the work tree's
2248 0ebf8283 2019-07-24 stsp path prefix, the work tree cannot be used to edit the history of this branch.
2249 0ebf8283 2019-07-24 stsp .Pp
2250 0ebf8283 2019-07-24 stsp The
2251 7ef62c4e 2020-02-24 stsp .Cm got update ,
2252 7ef62c4e 2020-02-24 stsp .Cm got rebase ,
2253 65db4ffb 2020-02-24 stsp and
2254 65db4ffb 2020-02-24 stsp .Cm got integrate
2255 65db4ffb 2020-02-24 stsp commands will refuse to run while a histedit operation is in progress.
2256 a698f62e 2019-07-25 stsp Other commands which manipulate the work tree may be used, and the
2257 0ebf8283 2019-07-24 stsp .Cm got commit
2258 a698f62e 2019-07-25 stsp command may be used to commit arbitrary changes to the temporary branch
2259 a698f62e 2019-07-25 stsp while the histedit operation is interrupted.
2260 0ebf8283 2019-07-24 stsp .Pp
2261 0ebf8283 2019-07-24 stsp The options for
2262 0ebf8283 2019-07-24 stsp .Cm got histedit
2263 0ebf8283 2019-07-24 stsp are as follows:
2264 0ebf8283 2019-07-24 stsp .Bl -tag -width Ds
2265 0ebf8283 2019-07-24 stsp .It Fl a
2266 0ebf8283 2019-07-24 stsp Abort an interrupted histedit operation.
2267 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
2268 0ebf8283 2019-07-24 stsp .It Fl c
2269 0ebf8283 2019-07-24 stsp Continue an interrupted histedit operation.
2270 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
2271 c50a7455 2021-10-04 thomas .It Fl e
2272 c50a7455 2021-10-04 thomas Interrupt the histedit operation for editing after merging each commit.
2273 c50a7455 2021-10-04 thomas This option is a quick equivalent to a histedit script which uses the
2274 c50a7455 2021-10-04 thomas .Cm edit
2275 c50a7455 2021-10-04 thomas command for all commits.
2276 c50a7455 2021-10-04 thomas The
2277 c50a7455 2021-10-04 thomas .Fl e
2278 c50a7455 2021-10-04 thomas option can only be used when starting a new histedit operation.
2279 c50a7455 2021-10-04 thomas If this option is used, no other command-line arguments are allowed.
2280 466785b9 2020-12-10 jrick .It Fl f
2281 466785b9 2020-12-10 jrick Fold all commits into a single commit.
2282 466785b9 2020-12-10 jrick This option is a quick equivalent to a histedit script which folds all
2283 466785b9 2020-12-10 jrick commits, combining them all into one commit.
2284 2a78779e 2020-12-11 stsp The
2285 2a78779e 2020-12-11 stsp .Fl f
2286 2a78779e 2020-12-11 stsp option can only be used when starting a new histedit operation.
2287 466785b9 2020-12-10 jrick If this option is used, no other command-line arguments are allowed.
2288 ddbfac99 2020-02-24 stsp .It Fl F Ar histedit-script
2289 ddbfac99 2020-02-24 stsp Use the specified
2290 ddbfac99 2020-02-24 stsp .Ar histedit-script
2291 ddbfac99 2020-02-24 stsp instead of opening a temporary file in an editor where a histedit script
2292 ddbfac99 2020-02-24 stsp can be written.
2293 083957f4 2020-02-24 stsp .It Fl m
2294 083957f4 2020-02-24 stsp Edit log messages only.
2295 083957f4 2020-02-24 stsp This option is a quick equivalent to a histedit script which edits
2296 2bdefe56 2020-02-24 tracey only log messages but otherwise leaves every picked commit as-is.
2297 083957f4 2020-02-24 stsp The
2298 083957f4 2020-02-24 stsp .Fl m
2299 083957f4 2020-02-24 stsp option can only be used when starting a new histedit operation.
2300 083957f4 2020-02-24 stsp If this option is used, no other command-line arguments are allowed.
2301 e600f124 2021-03-21 stsp .It Fl l
2302 e600f124 2021-03-21 stsp Show a list of past histedit operations, represented by references in the
2303 e600f124 2021-03-21 stsp .Dq refs/got/backup/histedit
2304 e600f124 2021-03-21 stsp reference namespace.
2305 e600f124 2021-03-21 stsp .Pp
2306 e600f124 2021-03-21 stsp Display the author, date, and log message of each backed up commit,
2307 e600f124 2021-03-21 stsp the object ID of the corresponding post-histedit commit, and
2308 e600f124 2021-03-21 stsp the object ID of their common ancestor commit.
2309 e600f124 2021-03-21 stsp Given these object IDs,
2310 e600f124 2021-03-21 stsp the
2311 e600f124 2021-03-21 stsp .Cm got log
2312 e600f124 2021-03-21 stsp command with the
2313 e600f124 2021-03-21 stsp .Fl c
2314 e600f124 2021-03-21 stsp and
2315 e600f124 2021-03-21 stsp .Fl x
2316 e600f124 2021-03-21 stsp options can be used to examine the history of either version of the branch,
2317 e600f124 2021-03-21 stsp and the
2318 e600f124 2021-03-21 stsp .Cm got branch
2319 e600f124 2021-03-21 stsp command with the
2320 e600f124 2021-03-21 stsp .Fl c
2321 e600f124 2021-03-21 stsp option can be used to create a new branch from a pre-histedit state if desired.
2322 e600f124 2021-03-21 stsp .Pp
2323 e600f124 2021-03-21 stsp If a
2324 e600f124 2021-03-21 stsp .Ar branch
2325 e600f124 2021-03-21 stsp is specified, only show commits which at some point in time represented this
2326 e600f124 2021-03-21 stsp branch.
2327 e600f124 2021-03-21 stsp Otherwise, list all backed up commits for any branches.
2328 e600f124 2021-03-21 stsp .Pp
2329 e600f124 2021-03-21 stsp If this option is used,
2330 e600f124 2021-03-21 stsp .Cm got histedit
2331 e600f124 2021-03-21 stsp does not require a work tree.
2332 e600f124 2021-03-21 stsp None of the other options can be used together with
2333 e600f124 2021-03-21 stsp .Fl l .
2334 643b85bc 2021-07-16 stsp .It Fl X
2335 643b85bc 2021-07-16 stsp Delete backups created by past histedit operations, represented by references
2336 643b85bc 2021-07-16 stsp in the
2337 643b85bc 2021-07-16 stsp .Dq refs/got/backup/histedit
2338 643b85bc 2021-07-16 stsp reference namespace.
2339 643b85bc 2021-07-16 stsp .Pp
2340 643b85bc 2021-07-16 stsp If a
2341 643b85bc 2021-07-16 stsp .Ar branch
2342 643b85bc 2021-07-16 stsp is specified, only delete backups which at some point in time represented
2343 643b85bc 2021-07-16 stsp this branch.
2344 643b85bc 2021-07-16 stsp Otherwise, delete all references found within
2345 643b85bc 2021-07-16 stsp .Dq refs/got/backup/histedit .
2346 643b85bc 2021-07-16 stsp .Pp
2347 643b85bc 2021-07-16 stsp Any commit, tree, tag, and blob objects belonging to deleted backups
2348 643b85bc 2021-07-16 stsp remain in the repository and may be removed separately with
2349 643b85bc 2021-07-16 stsp Git's garbage collector or
2350 643b85bc 2021-07-16 stsp .Cm gotadmin cleanup .
2351 643b85bc 2021-07-16 stsp .Pp
2352 643b85bc 2021-07-16 stsp If this option is used,
2353 643b85bc 2021-07-16 stsp .Cm got histedit
2354 643b85bc 2021-07-16 stsp does not require a work tree.
2355 643b85bc 2021-07-16 stsp None of the other options can be used together with
2356 643b85bc 2021-07-16 stsp .Fl X .
2357 818c7501 2019-07-11 stsp .El
2358 e8aa341a 2021-10-08 thomas .Tg ig
2359 2822a352 2019-10-15 stsp .It Cm integrate Ar branch
2360 d912d125 2021-11-04 thomas .Dl Pq alias: Cm ig
2361 2822a352 2019-10-15 stsp Integrate the specified
2362 2822a352 2019-10-15 stsp .Ar branch
2363 2822a352 2019-10-15 stsp into the work tree's current branch.
2364 2822a352 2019-10-15 stsp Files in the work tree are updated to match the contents on the integrated
2365 2822a352 2019-10-15 stsp .Ar branch ,
2366 2822a352 2019-10-15 stsp and the reference of the work tree's branch is changed to point at the
2367 2822a352 2019-10-15 stsp head commit of the integrated
2368 2822a352 2019-10-15 stsp .Ar branch .
2369 2822a352 2019-10-15 stsp .Pp
2370 2822a352 2019-10-15 stsp Both branches can be considered equivalent after integration since they
2371 2822a352 2019-10-15 stsp will be pointing at the same commit.
2372 2822a352 2019-10-15 stsp Both branches remain available for future work, if desired.
2373 2822a352 2019-10-15 stsp In case the integrated
2374 2822a352 2019-10-15 stsp .Ar branch
2375 2822a352 2019-10-15 stsp is no longer needed it may be deleted with
2376 2822a352 2019-10-15 stsp .Cm got branch -d .
2377 2822a352 2019-10-15 stsp .Pp
2378 2822a352 2019-10-15 stsp Show the status of each affected file, using the following status codes:
2379 2822a352 2019-10-15 stsp .Bl -column YXZ description
2380 2822a352 2019-10-15 stsp .It U Ta file was updated
2381 2822a352 2019-10-15 stsp .It D Ta file was deleted
2382 2822a352 2019-10-15 stsp .It A Ta new file was added
2383 2822a352 2019-10-15 stsp .It \(a~ Ta versioned file is obstructed by a non-regular file
2384 2822a352 2019-10-15 stsp .It ! Ta a missing versioned file was restored
2385 2822a352 2019-10-15 stsp .El
2386 2822a352 2019-10-15 stsp .Pp
2387 2822a352 2019-10-15 stsp .Cm got integrate
2388 2822a352 2019-10-15 stsp will refuse to run if certain preconditions are not met.
2389 2822a352 2019-10-15 stsp Most importantly, the
2390 2822a352 2019-10-15 stsp .Ar branch
2391 2822a352 2019-10-15 stsp must have been rebased onto the work tree's current branch with
2392 2822a352 2019-10-15 stsp .Cm got rebase
2393 2822a352 2019-10-15 stsp before it can be integrated, in order to linearize commit history and
2394 2822a352 2019-10-15 stsp resolve merge conflicts.
2395 4b06140e 2022-03-22 thomas If the work tree contains multiple base commits, it must first be updated
2396 2822a352 2019-10-15 stsp to a single base commit with
2397 2822a352 2019-10-15 stsp .Cm got update .
2398 2822a352 2019-10-15 stsp If changes have been staged with
2399 2822a352 2019-10-15 stsp .Cm got stage ,
2400 2822a352 2019-10-15 stsp these changes must first be committed with
2401 2822a352 2019-10-15 stsp .Cm got commit
2402 2822a352 2019-10-15 stsp or unstaged with
2403 2822a352 2019-10-15 stsp .Cm got unstage .
2404 2822a352 2019-10-15 stsp If the work tree contains local changes, these changes must first be
2405 2822a352 2019-10-15 stsp committed with
2406 2822a352 2019-10-15 stsp .Cm got commit
2407 2822a352 2019-10-15 stsp or reverted with
2408 2822a352 2019-10-15 stsp .Cm got revert .
2409 bea5ae74 2021-10-10 thomas .Tg mg
2410 ba34626b 2021-09-27 thomas .It Cm merge Oo Fl a Oc Oo Fl c Oc Oo Fl n Oc Op Ar branch
2411 d912d125 2021-11-04 thomas .Dl Pq alias: Cm mg
2412 10604dce 2021-09-24 thomas Create a merge commit based on the current branch of the work tree and
2413 10604dce 2021-09-24 thomas the specified
2414 10604dce 2021-09-24 thomas .Ar branch .
2415 10604dce 2021-09-24 thomas If a linear project history is desired, then use of
2416 10604dce 2021-09-24 thomas .Cm got rebase
2417 10604dce 2021-09-24 thomas should be preferred over
2418 10604dce 2021-09-24 thomas .Cm got merge .
2419 10604dce 2021-09-24 thomas However, even strictly linear projects may require merge commits in order
2420 768705e3 2021-09-27 thomas to merge in new versions of third-party code stored on vendor branches
2421 768705e3 2021-09-27 thomas created with
2422 768705e3 2021-09-27 thomas .Cm got import .
2423 10604dce 2021-09-24 thomas .Pp
2424 10604dce 2021-09-24 thomas Merge commits are commits based on multiple parent commits.
2425 10604dce 2021-09-24 thomas The tip commit of the work tree's current branch, which must be set with
2426 10604dce 2021-09-24 thomas .Cm got update -b
2427 10604dce 2021-09-24 thomas before starting the
2428 10604dce 2021-09-24 thomas .Cm merge
2429 10604dce 2021-09-24 thomas operation, will be used as the first parent.
2430 10604dce 2021-09-24 thomas The tip commit of the specified
2431 10604dce 2021-09-24 thomas .Ar branch
2432 10604dce 2021-09-24 thomas will be used as the second parent.
2433 10604dce 2021-09-24 thomas .Pp
2434 768705e3 2021-09-27 thomas No ancestral relationship between the two branches is required.
2435 768705e3 2021-09-27 thomas If the two branches have already been merged previously, only new changes
2436 768705e3 2021-09-27 thomas will be merged.
2437 768705e3 2021-09-27 thomas .Pp
2438 10604dce 2021-09-24 thomas It is not possible to create merge commits with more than two parents.
2439 10604dce 2021-09-24 thomas If more than one branch needs to be merged, then multiple merge commits
2440 10604dce 2021-09-24 thomas with two parents each can be created in sequence.
2441 10604dce 2021-09-24 thomas .Pp
2442 10604dce 2021-09-24 thomas While merging changes found on the
2443 10604dce 2021-09-24 thomas .Ar branch
2444 10604dce 2021-09-24 thomas into the work tree, show the status of each affected file,
2445 10604dce 2021-09-24 thomas using the following status codes:
2446 10604dce 2021-09-24 thomas .Bl -column YXZ description
2447 10604dce 2021-09-24 thomas .It G Ta file was merged
2448 10604dce 2021-09-24 thomas .It C Ta file was merged and conflicts occurred during merge
2449 10604dce 2021-09-24 thomas .It ! Ta changes destined for a missing file were not merged
2450 10604dce 2021-09-24 thomas .It D Ta file was deleted
2451 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
2452 10604dce 2021-09-24 thomas .It A Ta new file was added
2453 10604dce 2021-09-24 thomas .It \(a~ Ta changes destined for a non-regular file were not merged
2454 10604dce 2021-09-24 thomas .It ? Ta changes destined for an unversioned file were not merged
2455 10604dce 2021-09-24 thomas .El
2456 10604dce 2021-09-24 thomas .Pp
2457 10604dce 2021-09-24 thomas If merge conflicts occur, the merge operation is interrupted and conflicts
2458 10604dce 2021-09-24 thomas must be resolved before the merge operation can continue.
2459 8cf2970b 2021-09-28 thomas If any files with destined changes are found to be missing or unversioned,
2460 8cf2970b 2021-09-28 thomas or if files could not be deleted due to differences in deleted content,
2461 10604dce 2021-09-24 thomas the merge operation will be interrupted to prevent potentially incomplete
2462 10604dce 2021-09-24 thomas changes from being committed to the repository without user intervention.
2463 10604dce 2021-09-24 thomas The work tree may be modified as desired and the merge can be continued
2464 10604dce 2021-09-24 thomas once the changes present in the work tree are considered complete.
2465 10604dce 2021-09-24 thomas Alternatively, the merge operation may be aborted which will leave
2466 10604dce 2021-09-24 thomas the work tree's current branch unmodified.
2467 10604dce 2021-09-24 thomas .Pp
2468 10604dce 2021-09-24 thomas If a merge conflict is resolved in a way which renders all merged
2469 10604dce 2021-09-24 thomas changes into no-op changes, the merge operation cannot continue
2470 10604dce 2021-09-24 thomas and must be aborted.
2471 10604dce 2021-09-24 thomas .Pp
2472 10604dce 2021-09-24 thomas .Cm got merge
2473 10604dce 2021-09-24 thomas will refuse to run if certain preconditions are not met.
2474 10604dce 2021-09-24 thomas If history of the
2475 10604dce 2021-09-24 thomas .Ar branch
2476 10604dce 2021-09-24 thomas is based on the work tree's current branch, then no merge commit can
2477 10604dce 2021-09-24 thomas be created and
2478 10604dce 2021-09-24 thomas .Cm got integrate
2479 10604dce 2021-09-24 thomas may be used to integrate the
2480 10604dce 2021-09-24 thomas .Ar branch
2481 10604dce 2021-09-24 thomas instead.
2482 10604dce 2021-09-24 thomas If the work tree is not yet fully updated to the tip commit of its
2483 10604dce 2021-09-24 thomas branch, then the work tree must first be updated with
2484 10604dce 2021-09-24 thomas .Cm got update .
2485 4b06140e 2022-03-22 thomas If the work tree contains multiple base commits, it must first be updated
2486 10604dce 2021-09-24 thomas to a single base commit with
2487 10604dce 2021-09-24 thomas .Cm got update .
2488 10604dce 2021-09-24 thomas If changes have been staged with
2489 10604dce 2021-09-24 thomas .Cm got stage ,
2490 10604dce 2021-09-24 thomas these changes must first be committed with
2491 10604dce 2021-09-24 thomas .Cm got commit
2492 10604dce 2021-09-24 thomas or unstaged with
2493 10604dce 2021-09-24 thomas .Cm got unstage .
2494 10604dce 2021-09-24 thomas If the work tree contains local changes, these changes must first be
2495 10604dce 2021-09-24 thomas committed with
2496 10604dce 2021-09-24 thomas .Cm got commit
2497 10604dce 2021-09-24 thomas or reverted with
2498 10604dce 2021-09-24 thomas .Cm got revert .
2499 10604dce 2021-09-24 thomas If the
2500 10604dce 2021-09-24 thomas .Ar branch
2501 10604dce 2021-09-24 thomas contains changes to files outside of the work tree's path prefix,
2502 10604dce 2021-09-24 thomas the work tree cannot be used to merge this branch.
2503 10604dce 2021-09-24 thomas .Pp
2504 10604dce 2021-09-24 thomas The
2505 10604dce 2021-09-24 thomas .Cm got update ,
2506 10604dce 2021-09-24 thomas .Cm got commit ,
2507 10604dce 2021-09-24 thomas .Cm got rebase ,
2508 ac93b2c5 2021-10-08 thomas .Cm got histedit ,
2509 10604dce 2021-09-24 thomas .Cm got integrate ,
2510 10604dce 2021-09-24 thomas and
2511 10604dce 2021-09-24 thomas .Cm got stage
2512 10604dce 2021-09-24 thomas commands will refuse to run while a merge operation is in progress.
2513 10604dce 2021-09-24 thomas Other commands which manipulate the work tree may be used for
2514 10604dce 2021-09-24 thomas conflict resolution purposes.
2515 10604dce 2021-09-24 thomas .Pp
2516 10604dce 2021-09-24 thomas The options for
2517 10604dce 2021-09-24 thomas .Cm got merge
2518 10604dce 2021-09-24 thomas are as follows:
2519 10604dce 2021-09-24 thomas .Bl -tag -width Ds
2520 10604dce 2021-09-24 thomas .It Fl a
2521 10604dce 2021-09-24 thomas Abort an interrupted merge operation.
2522 10604dce 2021-09-24 thomas If this option is used, no other command-line arguments are allowed.
2523 10604dce 2021-09-24 thomas .It Fl c
2524 10604dce 2021-09-24 thomas Continue an interrupted merge operation.
2525 10604dce 2021-09-24 thomas If this option is used, no other command-line arguments are allowed.
2526 ba34626b 2021-09-27 thomas .It Fl n
2527 ba34626b 2021-09-27 thomas Merge changes into the work tree as usual but do not create a merge
2528 ba34626b 2021-09-27 thomas commit immediately.
2529 ba34626b 2021-09-27 thomas The merge result can be adjusted as desired before a merge commit is
2530 ba34626b 2021-09-27 thomas created with
2531 ba34626b 2021-09-27 thomas .Cm got merge -c .
2532 ba34626b 2021-09-27 thomas Alternatively, the merge may be aborted with
2533 ba34626b 2021-09-27 thomas .Cm got merge -a .
2534 10604dce 2021-09-24 thomas .El
2535 e8aa341a 2021-10-08 thomas .Tg sg
2536 35213c7c 2020-07-23 stsp .It Cm stage Oo Fl l Oc Oo Fl p Oc Oo Fl F Ar response-script Oc Oo Fl S Oc Op Ar path ...
2537 d912d125 2021-11-04 thomas .Dl Pq alias: Cm sg
2538 2db2652d 2019-08-07 stsp Stage local changes for inclusion in the next commit.
2539 2db2652d 2019-08-07 stsp If no
2540 2db2652d 2019-08-07 stsp .Ar path
2541 2db2652d 2019-08-07 stsp is specified, stage all changes in the work tree.
2542 2db2652d 2019-08-07 stsp Otherwise, stage changes at or within the specified paths.
2543 4ed9f614 2019-08-04 stsp Paths may be staged if they are added, modified, or deleted according to
2544 4ed9f614 2019-08-04 stsp .Cm got status .
2545 4ed9f614 2019-08-04 stsp .Pp
2546 9d8b19a4 2019-08-04 stsp Show the status of each affected file, using the following status codes:
2547 9d8b19a4 2019-08-04 stsp .Bl -column YXZ description
2548 9d8b19a4 2019-08-04 stsp .It A Ta file addition has been staged
2549 9d8b19a4 2019-08-04 stsp .It M Ta file modification has been staged
2550 9d8b19a4 2019-08-04 stsp .It D Ta file deletion has been staged
2551 9d8b19a4 2019-08-04 stsp .El
2552 9d8b19a4 2019-08-04 stsp .Pp
2553 9d8b19a4 2019-08-04 stsp Staged file contents are saved in newly created blob objects in the repository.
2554 52c8d4ac 2019-08-04 stsp These blobs will be referred to by tree objects once staged changes have been
2555 9d8b19a4 2019-08-04 stsp committed.
2556 9d8b19a4 2019-08-04 stsp .Pp
2557 890ea719 2019-08-04 stsp Staged changes affect the behaviour of
2558 4ed9f614 2019-08-04 stsp .Cm got commit ,
2559 4ed9f614 2019-08-04 stsp .Cm got status ,
2560 4ed9f614 2019-08-04 stsp and
2561 4ed9f614 2019-08-04 stsp .Cm got diff .
2562 4ed9f614 2019-08-04 stsp While paths with staged changes exist, the
2563 4ed9f614 2019-08-04 stsp .Cm got commit
2564 4ed9f614 2019-08-04 stsp command will refuse to commit any paths which do not have staged changes.
2565 4ed9f614 2019-08-04 stsp Local changes created on top of staged changes can only be committed if
2566 4ed9f614 2019-08-04 stsp the path is staged again, or if the staged changes are committed first.
2567 4ed9f614 2019-08-04 stsp The
2568 4ed9f614 2019-08-04 stsp .Cm got status
2569 4ed9f614 2019-08-04 stsp command will show both local changes and staged changes.
2570 4ed9f614 2019-08-04 stsp The
2571 4ed9f614 2019-08-04 stsp .Cm got diff
2572 ecf14362 2019-08-04 stsp command is able to display local changes relative to staged changes,
2573 ecf14362 2019-08-04 stsp and to display staged changes relative to the repository.
2574 4ed9f614 2019-08-04 stsp The
2575 4ed9f614 2019-08-04 stsp .Cm got revert
2576 4ed9f614 2019-08-04 stsp command cannot revert staged changes but may be used to revert
2577 4f2494e6 2019-08-08 stsp local changes created on top of staged changes.
2578 4ed9f614 2019-08-04 stsp .Pp
2579 4ed9f614 2019-08-04 stsp The options for
2580 4ed9f614 2019-08-04 stsp .Cm got stage
2581 4ed9f614 2019-08-04 stsp are as follows:
2582 4ed9f614 2019-08-04 stsp .Bl -tag -width Ds
2583 4ed9f614 2019-08-04 stsp .It Fl l
2584 4ed9f614 2019-08-04 stsp Instead of staging new changes, list paths which are already staged,
2585 9d8b19a4 2019-08-04 stsp along with the IDs of staged blob objects and stage status codes.
2586 4b06140e 2022-03-22 thomas If paths were provided on the command line, show the staged paths
2587 1dd86744 2019-08-12 anthony among the specified paths.
2588 1dd86744 2019-08-12 anthony Otherwise, show all staged paths.
2589 dc424a06 2019-08-07 stsp .It Fl p
2590 dc424a06 2019-08-07 stsp Instead of staging the entire content of a changed file, interactively
2591 dc424a06 2019-08-07 stsp select or reject changes for staging based on
2592 dc424a06 2019-08-07 stsp .Dq y
2593 6d23ec10 2019-08-08 stsp (stage change),
2594 dc424a06 2019-08-07 stsp .Dq n
2595 6d23ec10 2019-08-08 stsp (reject change), and
2596 b353a198 2019-08-07 stsp .Dq q
2597 6d23ec10 2019-08-08 stsp (quit staging this file) responses.
2598 dc424a06 2019-08-07 stsp If a file is in modified status, individual patches derived from the
2599 dc424a06 2019-08-07 stsp modified file content can be staged.
2600 6d23ec10 2019-08-08 stsp Files in added or deleted status may only be staged or rejected in
2601 6d23ec10 2019-08-08 stsp their entirety.
2602 3a070a2b 2019-08-07 stsp .It Fl F Ar response-script
2603 dc424a06 2019-08-07 stsp With the
2604 dc424a06 2019-08-07 stsp .Fl p
2605 3a070a2b 2019-08-07 stsp option, read
2606 3a070a2b 2019-08-07 stsp .Dq y ,
2607 3a070a2b 2019-08-07 stsp .Dq n ,
2608 3a070a2b 2019-08-07 stsp and
2609 3a070a2b 2019-08-07 stsp .Dq q
2610 0e2f5884 2019-08-07 stsp responses line-by-line from the specified
2611 0e2f5884 2019-08-07 stsp .Ar response-script
2612 0e2f5884 2019-08-07 stsp file instead of prompting interactively.
2613 35213c7c 2020-07-23 stsp .It Fl S
2614 af358f55 2020-07-23 stsp Allow staging of symbolic links which point outside of the path space
2615 af358f55 2020-07-23 stsp that is under version control.
2616 af358f55 2020-07-23 stsp By default,
2617 af358f55 2020-07-23 stsp .Cm got stage
2618 af358f55 2020-07-23 stsp will reject such symbolic links due to safety concerns.
2619 35213c7c 2020-07-23 stsp As a precaution,
2620 35213c7c 2020-07-23 stsp .Nm
2621 af358f55 2020-07-23 stsp may decide to represent such a symbolic link as a regular file which contains
2622 af358f55 2020-07-23 stsp the link's target path, rather than creating an actual symbolic link which
2623 af358f55 2020-07-23 stsp points outside of the work tree.
2624 af358f55 2020-07-23 stsp Use of this option is discouraged because external mechanisms such as
2625 af358f55 2020-07-23 stsp .Dq make obj
2626 af358f55 2020-07-23 stsp are better suited for managing symbolic links to paths not under
2627 af358f55 2020-07-23 stsp version control.
2628 4ed9f614 2019-08-04 stsp .El
2629 4ed9f614 2019-08-04 stsp .Pp
2630 4ed9f614 2019-08-04 stsp .Cm got stage
2631 4ed9f614 2019-08-04 stsp will refuse to run if certain preconditions are not met.
2632 4ed9f614 2019-08-04 stsp If a file contains merge conflicts, these conflicts must be resolved first.
2633 4ed9f614 2019-08-04 stsp If a file is found to be out of date relative to the head commit on the
2634 4ed9f614 2019-08-04 stsp work tree's current branch, the file must be updated with
2635 4ed9f614 2019-08-04 stsp .Cm got update
2636 4ed9f614 2019-08-04 stsp before it can be staged (however, this does not prevent the file from
2637 4ed9f614 2019-08-04 stsp becoming out-of-date at some point after having been staged).
2638 4ed9f614 2019-08-04 stsp .Pp
2639 4ed9f614 2019-08-04 stsp The
2640 4ed9f614 2019-08-04 stsp .Cm got update ,
2641 4ed9f614 2019-08-04 stsp .Cm got rebase ,
2642 4ed9f614 2019-08-04 stsp and
2643 4ed9f614 2019-08-04 stsp .Cm got histedit
2644 4ed9f614 2019-08-04 stsp commands will refuse to run while staged changes exist.
2645 4ed9f614 2019-08-04 stsp If staged changes cannot be committed because a staged path
2646 4ed9f614 2019-08-04 stsp is out of date, the path must be unstaged with
2647 4ed9f614 2019-08-04 stsp .Cm got unstage
2648 4ed9f614 2019-08-04 stsp before it can be updated with
2649 4ed9f614 2019-08-04 stsp .Cm got update ,
2650 4ed9f614 2019-08-04 stsp and may then be staged again if necessary.
2651 e8aa341a 2021-10-08 thomas .Tg ug
2652 dfc23429 2019-08-11 stsp .It Cm unstage Oo Fl p Oc Oo Fl F Ar response-script Oc Op Ar path ...
2653 d912d125 2021-11-04 thomas .Dl Pq alias: Cm ug
2654 4ed9f614 2019-08-04 stsp Merge staged changes back into the work tree and put affected paths
2655 4ed9f614 2019-08-04 stsp back into non-staged status.
2656 4ed9f614 2019-08-04 stsp If no
2657 4ed9f614 2019-08-04 stsp .Ar path
2658 4ed9f614 2019-08-04 stsp is specified, unstage all staged changes across the entire work tree.
2659 2db2652d 2019-08-07 stsp Otherwise, unstage changes at or within the specified paths.
2660 4ed9f614 2019-08-04 stsp .Pp
2661 4ed9f614 2019-08-04 stsp Show the status of each affected file, using the following status codes:
2662 4ed9f614 2019-08-04 stsp .Bl -column YXZ description
2663 4ed9f614 2019-08-04 stsp .It G Ta file was unstaged
2664 4ed9f614 2019-08-04 stsp .It C Ta file was unstaged and conflicts occurred during merge
2665 4ed9f614 2019-08-04 stsp .It ! Ta changes destined for a missing file were not merged
2666 4ed9f614 2019-08-04 stsp .It D Ta file was staged as deleted and still is deleted
2667 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
2668 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
2669 4ed9f614 2019-08-04 stsp .El
2670 2e1f37b0 2019-08-08 stsp .Pp
2671 2e1f37b0 2019-08-08 stsp The options for
2672 2e1f37b0 2019-08-08 stsp .Cm got unstage
2673 2e1f37b0 2019-08-08 stsp are as follows:
2674 2e1f37b0 2019-08-08 stsp .Bl -tag -width Ds
2675 2e1f37b0 2019-08-08 stsp .It Fl p
2676 2e1f37b0 2019-08-08 stsp Instead of unstaging the entire content of a changed file, interactively
2677 2e1f37b0 2019-08-08 stsp select or reject changes for unstaging based on
2678 2e1f37b0 2019-08-08 stsp .Dq y
2679 2e1f37b0 2019-08-08 stsp (unstage change),
2680 2e1f37b0 2019-08-08 stsp .Dq n
2681 2e1f37b0 2019-08-08 stsp (keep change staged), and
2682 2e1f37b0 2019-08-08 stsp .Dq q
2683 2e1f37b0 2019-08-08 stsp (quit unstaging this file) responses.
2684 2e1f37b0 2019-08-08 stsp If a file is staged in modified status, individual patches derived from the
2685 2e1f37b0 2019-08-08 stsp staged file content can be unstaged.
2686 2e1f37b0 2019-08-08 stsp Files staged in added or deleted status may only be unstaged in their entirety.
2687 2e1f37b0 2019-08-08 stsp .It Fl F Ar response-script
2688 2e1f37b0 2019-08-08 stsp With the
2689 2e1f37b0 2019-08-08 stsp .Fl p
2690 2e1f37b0 2019-08-08 stsp option, read
2691 2e1f37b0 2019-08-08 stsp .Dq y ,
2692 2e1f37b0 2019-08-08 stsp .Dq n ,
2693 2e1f37b0 2019-08-08 stsp and
2694 2e1f37b0 2019-08-08 stsp .Dq q
2695 2e1f37b0 2019-08-08 stsp responses line-by-line from the specified
2696 2e1f37b0 2019-08-08 stsp .Ar response-script
2697 2e1f37b0 2019-08-08 stsp file instead of prompting interactively.
2698 2e1f37b0 2019-08-08 stsp .El
2699 5be72254 2019-08-26 stsp .It Cm cat Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Oo Fl P Oc Ar arg ...
2700 896e9b6f 2019-08-26 stsp Parse and print contents of objects to standard output in a line-based
2701 896e9b6f 2019-08-26 stsp text format.
2702 896e9b6f 2019-08-26 stsp Content of commit, tree, and tag objects is printed in a way similar
2703 896e9b6f 2019-08-26 stsp to the actual content stored in such objects.
2704 896e9b6f 2019-08-26 stsp Blob object contents are printed as they would appear in files on disk.
2705 896e9b6f 2019-08-26 stsp .Pp
2706 896e9b6f 2019-08-26 stsp Attempt to interpret each argument as a reference, a tag name, or
2707 896e9b6f 2019-08-26 stsp an object ID SHA1 hash.
2708 01073a5d 2019-08-22 stsp References will be resolved to an object ID.
2709 01073a5d 2019-08-22 stsp Tag names will resolved to a tag object.
2710 01073a5d 2019-08-22 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
2711 01073a5d 2019-08-22 stsp automatically, provided the abbreviation is unique.
2712 01073a5d 2019-08-22 stsp .Pp
2713 896e9b6f 2019-08-26 stsp If none of the above interpretations produce a valid result, or if the
2714 896e9b6f 2019-08-26 stsp .Fl P
2715 896e9b6f 2019-08-26 stsp option is used, attempt to interpret the argument as a path which will
2716 896e9b6f 2019-08-26 stsp be resolved to the ID of an object found at this path in the repository.
2717 896e9b6f 2019-08-26 stsp .Pp
2718 01073a5d 2019-08-22 stsp The options for
2719 01073a5d 2019-08-22 stsp .Cm got cat
2720 01073a5d 2019-08-22 stsp are as follows:
2721 01073a5d 2019-08-22 stsp .Bl -tag -width Ds
2722 896e9b6f 2019-08-26 stsp .It Fl c Ar commit
2723 896e9b6f 2019-08-26 stsp Look up paths in the specified
2724 896e9b6f 2019-08-26 stsp .Ar commit .
2725 896e9b6f 2019-08-26 stsp If this option is not used, paths are looked up in the commit resolved
2726 896e9b6f 2019-08-26 stsp via the repository's HEAD reference.
2727 896e9b6f 2019-08-26 stsp The expected argument is a commit ID SHA1 hash or an existing reference
2728 896e9b6f 2019-08-26 stsp or tag name which will be resolved to a commit ID.
2729 896e9b6f 2019-08-26 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
2730 896e9b6f 2019-08-26 stsp automatically, provided the abbreviation is unique.
2731 01073a5d 2019-08-22 stsp .It Fl r Ar repository-path
2732 01073a5d 2019-08-22 stsp Use the repository at the specified path.
2733 01073a5d 2019-08-22 stsp If not specified, assume the repository is located at or above the current
2734 01073a5d 2019-08-22 stsp working directory.
2735 01073a5d 2019-08-22 stsp If this directory is a
2736 01073a5d 2019-08-22 stsp .Nm
2737 01073a5d 2019-08-22 stsp work tree, use the repository path associated with this work tree.
2738 896e9b6f 2019-08-26 stsp .It Fl P
2739 896e9b6f 2019-08-26 stsp Interpret all arguments as paths only.
2740 896e9b6f 2019-08-26 stsp This option can be used to resolve ambiguity in cases where paths
2741 896e9b6f 2019-08-26 stsp look like tag names, reference names, or object IDs.
2742 4ed9f614 2019-08-04 stsp .El
2743 b2118c49 2020-07-28 stsp .It Cm info Op Ar path ...
2744 b2118c49 2020-07-28 stsp Display meta-data stored in a work tree.
2745 b2118c49 2020-07-28 stsp See
2746 b2118c49 2020-07-28 stsp .Xr got-worktree 5
2747 b2118c49 2020-07-28 stsp for details.
2748 b2118c49 2020-07-28 stsp .Pp
2749 b2118c49 2020-07-28 stsp The work tree to use is resolved implicitly by walking upwards from the
2750 b2118c49 2020-07-28 stsp current working directory.
2751 b2118c49 2020-07-28 stsp .Pp
2752 b2118c49 2020-07-28 stsp If one or more
2753 b2118c49 2020-07-28 stsp .Ar path
2754 b2118c49 2020-07-28 stsp arguments are specified, show additional per-file information for tracked
2755 b2118c49 2020-07-28 stsp files located at or within these paths.
2756 b2118c49 2020-07-28 stsp If a
2757 b2118c49 2020-07-28 stsp .Ar path
2758 b2118c49 2020-07-28 stsp argument corresponds to the work tree's root directory, display information
2759 b2118c49 2020-07-28 stsp for all tracked files.
2760 01073a5d 2019-08-22 stsp .El
2761 74416c47 2019-05-09 stsp .Sh ENVIRONMENT
2762 5daf5c53 2022-07-23 thomas .Bl -tag -width GOT_IGNORE_GITCONFIG
2763 74416c47 2019-05-09 stsp .It Ev GOT_AUTHOR
2764 d4dddcbf 2022-07-22 thomas The author's name and email address, such as
2765 aba9c984 2019-09-08 stsp .Dq An Flan Hacker Aq Mt flan_hacker@openbsd.org .
2766 d4dddcbf 2022-07-22 thomas Used by the
2767 d4dddcbf 2022-07-22 thomas .Cm got commit ,
2768 d4dddcbf 2022-07-22 thomas .Cm got import ,
2769 d4dddcbf 2022-07-22 thomas .Cm got rebase ,
2770 d4dddcbf 2022-07-22 thomas and
2771 d4dddcbf 2022-07-22 thomas .Cm got histedit
2772 d4dddcbf 2022-07-22 thomas commands.
2773 84792843 2019-08-09 stsp Because
2774 0e444aba 2019-08-08 stsp .Xr git 1
2775 84792843 2019-08-09 stsp may fail to parse commits without an email address in author data,
2776 0e444aba 2019-08-08 stsp .Nm
2777 84792843 2019-08-09 stsp attempts to reject
2778 0e444aba 2019-08-08 stsp .Ev GOT_AUTHOR
2779 84792843 2019-08-09 stsp environment variables with a missing email address.
2780 c9956ddf 2019-09-08 stsp .Pp
2781 93a300b2 2021-08-26 stsp .Ev GOT_AUTHOR will be overridden by configuration settings in
2782 50b0790e 2020-09-11 stsp .Xr got.conf 5
2783 50b0790e 2020-09-11 stsp or by Git's
2784 aba9c984 2019-09-08 stsp .Dv user.name
2785 aba9c984 2019-09-08 stsp and
2786 709ae9eb 2019-09-08 stsp .Dv user.email
2787 709ae9eb 2019-09-08 stsp configuration settings in the repository's
2788 aba9c984 2019-09-08 stsp .Pa .git/config
2789 50b0790e 2020-09-11 stsp file.
2790 257add31 2020-09-09 stsp The
2791 c9956ddf 2019-09-08 stsp .Dv user.name
2792 c9956ddf 2019-09-08 stsp and
2793 c9956ddf 2019-09-08 stsp .Dv user.email
2794 c9956ddf 2019-09-08 stsp configuration settings contained in Git's global
2795 c9956ddf 2019-09-08 stsp .Pa ~/.gitconfig
2796 257add31 2020-09-09 stsp configuration file will only be used if neither
2797 257add31 2020-09-09 stsp .Xr got.conf 5
2798 257add31 2020-09-09 stsp nor the
2799 c9956ddf 2019-09-08 stsp .Ev GOT_AUTHOR
2800 257add31 2020-09-09 stsp environment variable provide author information.
2801 1dd86744 2019-08-12 anthony .It Ev VISUAL , EDITOR
2802 23594da9 2019-05-13 stsp The editor spawned by
2803 8e7bd50a 2019-08-22 stsp .Cm got commit ,
2804 46215d2a 2020-09-11 stsp .Cm got histedit ,
2805 8e7bd50a 2019-08-22 stsp .Cm got import ,
2806 8e7bd50a 2019-08-22 stsp or
2807 8e7bd50a 2019-08-22 stsp .Cm got tag .
2808 5b735925 2020-09-15 stsp If not set, the
2809 5b735925 2020-09-15 stsp .Xr ed 1
2810 5b735925 2020-09-15 stsp text editor will be spawned in order to give
2811 5b735925 2020-09-15 stsp .Xr ed 1
2812 5b735925 2020-09-15 stsp the attention it deserves.
2813 b1ebc001 2019-08-13 stsp .It Ev GOT_LOG_DEFAULT_LIMIT
2814 b1ebc001 2019-08-13 stsp The default limit on the number of commits traversed by
2815 b1ebc001 2019-08-13 stsp .Cm got log .
2816 b1ebc001 2019-08-13 stsp If set to zero, the limit is unbounded.
2817 b1ebc001 2019-08-13 stsp This variable will be silently ignored if it is set to a non-numeric value.
2818 5daf5c53 2022-07-23 thomas .It Ev GOT_IGNORE_GITCONFIG
2819 5daf5c53 2022-07-23 thomas If this variable is set then any remote repository definitions or author
2820 5daf5c53 2022-07-23 thomas information found in Git configuration files will be ignored.
2821 74416c47 2019-05-09 stsp .El
2822 257add31 2020-09-09 stsp .Sh FILES
2823 257add31 2020-09-09 stsp .Bl -tag -width packed-refs -compact
2824 257add31 2020-09-09 stsp .It Pa got.conf
2825 257add31 2020-09-09 stsp Repository-wide configuration settings for
2826 257add31 2020-09-09 stsp .Nm .
2827 50b0790e 2020-09-11 stsp If present, a
2828 50b0790e 2020-09-11 stsp .Xr got.conf 5
2829 50b0790e 2020-09-11 stsp configuration file located in the root directory of a Git repository
2830 50b0790e 2020-09-11 stsp supersedes any relevant settings in Git's
2831 257add31 2020-09-09 stsp .Pa config
2832 257add31 2020-09-09 stsp file.
2833 50b0790e 2020-09-11 stsp .Pp
2834 50b0790e 2020-09-11 stsp .It Pa .got/got.conf
2835 50b0790e 2020-09-11 stsp Worktree-specific configuration settings for
2836 50b0790e 2020-09-11 stsp .Nm .
2837 50b0790e 2020-09-11 stsp If present, a
2838 1795b260 2021-04-02 kn .Xr got.conf 5
2839 50b0790e 2020-09-11 stsp configuration file in the
2840 50b0790e 2020-09-11 stsp .Pa .got
2841 50b0790e 2020-09-11 stsp meta-data directory of a work tree supersedes any relevant settings in
2842 50b0790e 2020-09-11 stsp the repository's
2843 50b0790e 2020-09-11 stsp .Xr got.conf 5
2844 50b0790e 2020-09-11 stsp configuration file and Git's
2845 50b0790e 2020-09-11 stsp .Pa config
2846 50b0790e 2020-09-11 stsp file.
2847 257add31 2020-09-09 stsp .El
2848 5c860e29 2018-03-12 stsp .Sh EXIT STATUS
2849 5c860e29 2018-03-12 stsp .Ex -std got
2850 97925469 2018-03-17 stsp .Sh EXAMPLES
2851 43e4eb1b 2021-08-29 stsp Enable tab-completion of
2852 43e4eb1b 2021-08-29 stsp .Nm
2853 43e4eb1b 2021-08-29 stsp command names in
2854 43e4eb1b 2021-08-29 stsp .Xr ksh 1 :
2855 43e4eb1b 2021-08-29 stsp .Pp
2856 e1d27370 2021-09-01 stsp .Dl $ set -A complete_got_1 -- $(got -h 2>&1 | sed -n s/commands://p)
2857 43e4eb1b 2021-08-29 stsp .Pp
2858 fa6e0e48 2019-05-23 stsp Clone an existing Git repository for use with
2859 fa6e0e48 2019-05-23 stsp .Nm .
2860 fd039d72 2020-03-18 stsp .Pp
2861 fd039d72 2020-03-18 stsp .Dl $ cd /var/git/
2862 fd039d72 2020-03-18 stsp .Dl $ got clone ssh://git@github.com/openbsd/src.git
2863 fd039d72 2020-03-18 stsp .Pp
2864 fd039d72 2020-03-18 stsp Use of HTTP URLs currently requires
2865 fa6e0e48 2019-05-23 stsp .Xr git 1 :
2866 d83d9d5c 2019-05-13 stsp .Pp
2867 fa6e0e48 2019-05-23 stsp .Dl $ cd /var/git/
2868 fa6e0e48 2019-05-23 stsp .Dl $ git clone --bare https://github.com/openbsd/src.git
2869 fa6e0e48 2019-05-23 stsp .Pp
2870 3ce1b845 2019-07-15 stsp Alternatively, for quick and dirty local testing of
2871 3ce1b845 2019-07-15 stsp .Nm
2872 3ce1b845 2019-07-15 stsp a new Git repository could be created and populated with files,
2873 3ce1b845 2019-07-15 stsp e.g. from a temporary CVS checkout located at
2874 3ce1b845 2019-07-15 stsp .Pa /tmp/src :
2875 fa6e0e48 2019-05-23 stsp .Pp
2876 27b10c3c 2022-07-04 thomas .Dl $ gotadmin init /var/git/src.git
2877 2930ef13 2019-07-15 stsp .Dl $ got import -r /var/git/src.git -I CVS -I obj /tmp/src
2878 3ce1b845 2019-07-15 stsp .Pp
2879 3ce1b845 2019-07-15 stsp Check out a work tree from the Git repository to /usr/src:
2880 3ce1b845 2019-07-15 stsp .Pp
2881 fa6e0e48 2019-05-23 stsp .Dl $ got checkout /var/git/src.git /usr/src
2882 fa6e0e48 2019-05-23 stsp .Pp
2883 e70c17ce 2019-05-22 stsp View local changes in a work tree directory:
2884 e70c17ce 2019-05-22 stsp .Pp
2885 e70c17ce 2019-05-22 stsp .Dl $ got diff | less
2886 33aa809d 2019-08-08 stsp .Pp
2887 081470ac 2020-08-13 stsp In a work tree, display files in a potentially problematic state:
2888 081470ac 2020-08-13 stsp .Pp
2889 081470ac 2020-08-13 stsp .Dl $ got status -s 'C!~?'
2890 081470ac 2020-08-13 stsp .Pp
2891 33aa809d 2019-08-08 stsp Interactively revert selected local changes in a work tree directory:
2892 e70c17ce 2019-05-22 stsp .Pp
2893 33aa809d 2019-08-08 stsp .Dl $ got revert -p -R\ .
2894 33aa809d 2019-08-08 stsp .Pp
2895 e70c17ce 2019-05-22 stsp In a work tree or a git repository directory, list all branch references:
2896 e70c17ce 2019-05-22 stsp .Pp
2897 4e759de4 2019-06-26 stsp .Dl $ got branch -l
2898 e70c17ce 2019-05-22 stsp .Pp
2899 fa6e0e48 2019-05-23 stsp In a work tree or a git repository directory, create a new branch called
2900 e70c17ce 2019-05-22 stsp .Dq unified-buffer-cache
2901 d83d9d5c 2019-05-13 stsp which is forked off the
2902 d83d9d5c 2019-05-13 stsp .Dq master
2903 d83d9d5c 2019-05-13 stsp branch:
2904 d83d9d5c 2019-05-13 stsp .Pp
2905 7b4f1fcb 2021-01-27 stsp .Dl $ got branch -c master unified-buffer-cache
2906 e70c17ce 2019-05-22 stsp .Pp
2907 e70c17ce 2019-05-22 stsp Switch an existing work tree to the branch
2908 e70c17ce 2019-05-22 stsp .Dq unified-buffer-cache .
2909 e70c17ce 2019-05-22 stsp Local changes in the work tree will be preserved and merged if necessary:
2910 e70c17ce 2019-05-22 stsp .Pp
2911 e70c17ce 2019-05-22 stsp .Dl $ got update -b unified-buffer-cache
2912 e70c17ce 2019-05-22 stsp .Pp
2913 fa6e0e48 2019-05-23 stsp Create a new commit from local changes in a work tree directory.
2914 fa6e0e48 2019-05-23 stsp This new commit will become the head commit of the work tree's current branch:
2915 fa6e0e48 2019-05-23 stsp .Pp
2916 fa6e0e48 2019-05-23 stsp .Dl $ got commit
2917 fa6e0e48 2019-05-23 stsp .Pp
2918 fa6e0e48 2019-05-23 stsp In a work tree or a git repository directory, view changes committed in
2919 fa6e0e48 2019-05-23 stsp the 3 most recent commits to the work tree's branch, or the branch resolved
2920 fa6e0e48 2019-05-23 stsp via the repository's HEAD reference, respectively:
2921 fa6e0e48 2019-05-23 stsp .Pp
2922 48c8c60d 2020-01-27 stsp .Dl $ got log -p -l 3
2923 04e9dcf3 2020-04-18 stsp .Pp
2924 3d0ac559 2020-04-18 stsp As above, but display changes in the order in which
2925 04e9dcf3 2020-04-18 stsp .Xr patch 1
2926 04e9dcf3 2020-04-18 stsp could apply them in sequence:
2927 5b666081 2020-02-24 stsp .Pp
2928 04e9dcf3 2020-04-18 stsp .Dl $ got log -p -l 3 -R
2929 04e9dcf3 2020-04-18 stsp .Pp
2930 5b666081 2020-02-24 stsp In a work tree or a git repository directory, log the history of a subdirectory:
2931 5b666081 2020-02-24 stsp .Pp
2932 5b666081 2020-02-24 stsp .Dl $ got log sys/uvm
2933 5b666081 2020-02-24 stsp .Pp
2934 5b666081 2020-02-24 stsp While operating inside a work tree, paths are specified relative to the current
2935 5b666081 2020-02-24 stsp working directory, so this command will log the subdirectory
2936 5b666081 2020-02-24 stsp .Pa sys/uvm :
2937 fa6e0e48 2019-05-23 stsp .Pp
2938 cf07f22b 2020-07-25 stsp .Dl $ cd sys/uvm && got log\ .
2939 5b666081 2020-02-24 stsp .Pp
2940 5b666081 2020-02-24 stsp And this command has the same effect:
2941 5b666081 2020-02-24 stsp .Pp
2942 5b666081 2020-02-24 stsp .Dl $ cd sys/dev/usb && got log ../../uvm
2943 5b666081 2020-02-24 stsp .Pp
2944 b2118c49 2020-07-28 stsp And this command displays work tree meta-data about all tracked files:
2945 b2118c49 2020-07-28 stsp .Pp
2946 b2118c49 2020-07-28 stsp .Dl $ cd /usr/src
2947 b2118c49 2020-07-28 stsp .Dl $ got info\ . | less
2948 b2118c49 2020-07-28 stsp .Pp
2949 e70c17ce 2019-05-22 stsp Add new files and remove obsolete files in a work tree directory:
2950 e70c17ce 2019-05-22 stsp .Pp
2951 fa6e0e48 2019-05-23 stsp .Dl $ got add sys/uvm/uvm_ubc.c
2952 86d25a1b 2019-07-11 stsp .Dl $ got remove sys/uvm/uvm_vnode.c
2953 e70c17ce 2019-05-22 stsp .Pp
2954 e70c17ce 2019-05-22 stsp Create a new commit from local changes in a work tree directory
2955 e70c17ce 2019-05-22 stsp with a pre-defined log message.
2956 e70c17ce 2019-05-22 stsp .Pp
2957 e70c17ce 2019-05-22 stsp .Dl $ got commit -m 'unify the buffer cache'
2958 95fc3404 2019-07-15 stsp .Pp
2959 bcbc2272 2020-05-20 stsp Alternatively, create a new commit from local changes in a work tree
2960 bcbc2272 2020-05-20 stsp directory with a log message that has been prepared in the file
2961 1795b260 2021-04-02 kn .Pa /tmp/msg :
2962 bcbc2272 2020-05-20 stsp .Pp
2963 28cf319f 2021-01-28 stsp .Dl $ got commit -F /tmp/msg
2964 bcbc2272 2020-05-20 stsp .Pp
2965 95fc3404 2019-07-15 stsp Update any work tree checked out from the
2966 95fc3404 2019-07-15 stsp .Dq unified-buffer-cache
2967 95fc3404 2019-07-15 stsp branch to the latest commit on this branch:
2968 95fc3404 2019-07-15 stsp .Pp
2969 95fc3404 2019-07-15 stsp .Dl $ got update
2970 ac90e726 2019-07-15 stsp .Pp
2971 c991308a 2019-07-15 stsp Roll file content on the unified-buffer-cache branch back by one commit,
2972 c991308a 2019-07-15 stsp and then fetch the rolled-back change into the work tree as a local change
2973 ac90e726 2019-07-15 stsp to be amended and perhaps committed again:
2974 e70c17ce 2019-05-22 stsp .Pp
2975 ac90e726 2019-07-15 stsp .Dl $ got backout unified-buffer-cache
2976 ac90e726 2019-07-15 stsp .Dl $ got commit -m 'roll back previous'
2977 59d52b88 2019-07-15 stsp .Dl $ # now back out the previous backout :-)
2978 ac90e726 2019-07-15 stsp .Dl $ got backout unified-buffer-cache
2979 ac90e726 2019-07-15 stsp .Pp
2980 a099809f 2021-08-27 stsp Fetch new changes on the remote repository's
2981 a099809f 2021-08-27 stsp .Dq master
2982 a099809f 2021-08-27 stsp branch, making them visible on the local repository's
2983 469dd726 2020-03-20 stsp .Dq origin/master
2984 469dd726 2020-03-20 stsp branch:
2985 fa6e0e48 2019-05-23 stsp .Pp
2986 469dd726 2020-03-20 stsp .Dl $ cd /usr/src
2987 469dd726 2020-03-20 stsp .Dl $ got fetch
2988 469dd726 2020-03-20 stsp .Pp
2989 469dd726 2020-03-20 stsp In a repository created with a HTTP URL and
2990 469dd726 2020-03-20 stsp .Cm git clone --bare
2991 469dd726 2020-03-20 stsp the
2992 469dd726 2020-03-20 stsp .Xr git-fetch 1
2993 469dd726 2020-03-20 stsp command must be used instead:
2994 469dd726 2020-03-20 stsp .Pp
2995 fa6e0e48 2019-05-23 stsp .Dl $ cd /var/git/src.git
2996 469dd726 2020-03-20 stsp .Dl $ git fetch origin master:refs/remotes/origin/master
2997 fa6e0e48 2019-05-23 stsp .Pp
2998 469dd726 2020-03-20 stsp Rebase the local
2999 469dd726 2020-03-20 stsp .Dq master
3000 469dd726 2020-03-20 stsp branch to merge the new changes that are now visible on the
3001 469dd726 2020-03-20 stsp .Dq origin/master
3002 469dd726 2020-03-20 stsp branch:
3003 469dd726 2020-03-20 stsp .Pp
3004 469dd726 2020-03-20 stsp .Dl $ cd /usr/src
3005 469dd726 2020-03-20 stsp .Dl $ got update -b origin/master
3006 469dd726 2020-03-20 stsp .Dl $ got rebase master
3007 469dd726 2020-03-20 stsp .Pp
3008 fa6e0e48 2019-05-23 stsp Rebase the
3009 fa6e0e48 2019-05-23 stsp .Dq unified-buffer-cache
3010 fa6e0e48 2019-05-23 stsp branch on top of the new head commit of the
3011 fa6e0e48 2019-05-23 stsp .Dq master
3012 fa6e0e48 2019-05-23 stsp branch.
3013 fa6e0e48 2019-05-23 stsp .Pp
3014 818c7501 2019-07-11 stsp .Dl $ got update -b master
3015 818c7501 2019-07-11 stsp .Dl $ got rebase unified-buffer-cache
3016 7d7ffedb 2019-07-14 stsp .Pp
3017 7d7ffedb 2019-07-14 stsp Create a patch from all changes on the unified-buffer-cache branch.
3018 1dd86744 2019-08-12 anthony The patch can be mailed out for review and applied to
3019 1dd86744 2019-08-12 anthony .Ox Ns 's
3020 1dd86744 2019-08-12 anthony CVS tree:
3021 7d7ffedb 2019-07-14 stsp .Pp
3022 7d7ffedb 2019-07-14 stsp .Dl $ got diff master unified-buffer-cache > /tmp/ubc.diff
3023 7d7ffedb 2019-07-14 stsp .Pp
3024 0ebf8283 2019-07-24 stsp Edit the entire commit history of the
3025 0ebf8283 2019-07-24 stsp .Dq unified-buffer-cache
3026 0ebf8283 2019-07-24 stsp branch:
3027 0ebf8283 2019-07-24 stsp .Pp
3028 0ebf8283 2019-07-24 stsp .Dl $ got update -b unified-buffer-cache
3029 0ebf8283 2019-07-24 stsp .Dl $ got update -c master
3030 0ebf8283 2019-07-24 stsp .Dl $ got histedit
3031 469dd726 2020-03-20 stsp .Pp
3032 ff2cf171 2019-07-28 stsp Before working against existing branches in a repository cloned with
3033 469dd726 2020-03-20 stsp .Cm git clone --bare
3034 7848a0e1 2020-03-19 stsp instead of
3035 7848a0e1 2020-03-19 stsp .Cm got clone ,
3036 ff2cf171 2019-07-28 stsp a Git
3037 ff2cf171 2019-07-28 stsp .Dq refspec
3038 ff2cf171 2019-07-28 stsp must be configured to map all references in the remote repository
3039 ff2cf171 2019-07-28 stsp into the
3040 ff2cf171 2019-07-28 stsp .Dq refs/remotes
3041 ff2cf171 2019-07-28 stsp namespace of the local repository.
3042 1795b260 2021-04-02 kn This can be achieved by setting Git's
3043 ff2cf171 2019-07-28 stsp .Pa remote.origin.fetch
3044 ff2cf171 2019-07-28 stsp configuration variable to the value
3045 ff2cf171 2019-07-28 stsp .Dq +refs/heads/*:refs/remotes/origin/*
3046 ff2cf171 2019-07-28 stsp with the
3047 ff2cf171 2019-07-28 stsp .Cm git config
3048 ff2cf171 2019-07-28 stsp command:
3049 ff2cf171 2019-07-28 stsp .Pp
3050 ff2cf171 2019-07-28 stsp .Dl $ cd /var/git/repo
3051 ff2cf171 2019-07-28 stsp .Dl $ git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
3052 eac81709 2020-03-21 stsp .Pp
3053 469dd726 2020-03-20 stsp Additionally, the
3054 469dd726 2020-03-20 stsp .Dq mirror
3055 469dd726 2020-03-20 stsp option must be disabled:
3056 ff2cf171 2019-07-28 stsp .Pp
3057 469dd726 2020-03-20 stsp .Dl $ cd /var/git/repo
3058 469dd726 2020-03-20 stsp .Dl $ git config remote.origin.mirror false
3059 469dd726 2020-03-20 stsp .Pp
3060 ff2cf171 2019-07-28 stsp Alternatively, the following
3061 469dd726 2020-03-20 stsp .Xr git-fetch 1
3062 ff2cf171 2019-07-28 stsp configuration item can be added manually to the Git repository's
3063 ff2cf171 2019-07-28 stsp .Pa config
3064 ff2cf171 2019-07-28 stsp file:
3065 0ebf8283 2019-07-24 stsp .Pp
3066 91c82228 2021-04-18 stsp .Dl [remote \&"origin\&"]
3067 ff2cf171 2019-07-28 stsp .Dl url = ...
3068 ff2cf171 2019-07-28 stsp .Dl fetch = +refs/heads/*:refs/remotes/origin/*
3069 469dd726 2020-03-20 stsp .Dl mirror = false
3070 ff2cf171 2019-07-28 stsp .Pp
3071 fe307c9b 2019-07-28 stsp This configuration leaves the local repository's
3072 ff2cf171 2019-07-28 stsp .Dq refs/heads
3073 ff2cf171 2019-07-28 stsp namespace free for use by local branches checked out with
3074 ff2cf171 2019-07-28 stsp .Cm got checkout
3075 ff2cf171 2019-07-28 stsp and, if needed, created with
3076 ff2cf171 2019-07-28 stsp .Cm got branch .
3077 ff2cf171 2019-07-28 stsp Branches in the
3078 a099809f 2021-08-27 stsp .Dq refs/remotes/origin
3079 469dd726 2020-03-20 stsp namespace can now be updated with incoming changes from the remote
3080 ff2cf171 2019-07-28 stsp repository with
3081 469dd726 2020-03-20 stsp .Cm got fetch
3082 469dd726 2020-03-20 stsp or
3083 469dd726 2020-03-20 stsp .Xr git-fetch 1
3084 a099809f 2021-08-27 stsp without extra command line arguments.
3085 a099809f 2021-08-27 stsp Newly fetched changes can be examined with
3086 a099809f 2021-08-27 stsp .Cm got log .
3087 ff2cf171 2019-07-28 stsp .Pp
3088 a099809f 2021-08-27 stsp Display changes on the remote repository's version of the
3089 ff2cf171 2019-07-28 stsp .Dq master
3090 a099809f 2021-08-27 stsp branch, as of the last time
3091 a099809f 2021-08-27 stsp .Cm got fetch
3092 a099809f 2021-08-27 stsp was run:
3093 a099809f 2021-08-27 stsp .Pp
3094 a099809f 2021-08-27 stsp .Dl $ got log -c origin/master | less
3095 a099809f 2021-08-27 stsp .Pp
3096 a099809f 2021-08-27 stsp As shown here, most commands accept abbreviated reference names such as
3097 ff2cf171 2019-07-28 stsp .Dq origin/master
3098 a099809f 2021-08-27 stsp instead of
3099 a099809f 2021-08-27 stsp .Dq refs/remotes/origin/master .
3100 a099809f 2021-08-27 stsp The latter is only needed in case of ambiguity.
3101 a099809f 2021-08-27 stsp .Pp
3102 a099809f 2021-08-27 stsp .Cm got rebase
3103 a099809f 2021-08-27 stsp must be used to merge changes which are visible on the
3104 a099809f 2021-08-27 stsp .Dq origin/master
3105 a099809f 2021-08-27 stsp branch into the
3106 a099809f 2021-08-27 stsp .Dq master
3107 7b0db533 2020-02-04 stsp branch.
3108 7b0db533 2020-02-04 stsp This will also merge local changes, if any, with the incoming changes:
3109 ff2cf171 2019-07-28 stsp .Pp
3110 ff2cf171 2019-07-28 stsp .Dl $ got update -b origin/master
3111 ff2cf171 2019-07-28 stsp .Dl $ got rebase master
3112 083957f4 2020-02-24 stsp .Pp
3113 a099809f 2021-08-27 stsp In order to make changes committed to the
3114 a099809f 2021-08-27 stsp .Dq unified-buffer-cache
3115 a099809f 2021-08-27 stsp visible on the
3116 a099809f 2021-08-27 stsp .Dq master
3117 a099809f 2021-08-27 stsp branch, the
3118 a099809f 2021-08-27 stsp .Dq unified-buffer-cache
3119 a099809f 2021-08-27 stsp branch must first be rebased onto the
3120 a099809f 2021-08-27 stsp .Dq master
3121 a099809f 2021-08-27 stsp branch:
3122 a099809f 2021-08-27 stsp .Pp
3123 a099809f 2021-08-27 stsp .Dl $ got update -b master
3124 a099809f 2021-08-27 stsp .Dl $ got rebase unified-buffer-cache
3125 a099809f 2021-08-27 stsp .Pp
3126 a099809f 2021-08-27 stsp Changes on the
3127 a099809f 2021-08-27 stsp .Dq unified-buffer-cache
3128 a099809f 2021-08-27 stsp branch can now be made visible on the
3129 a099809f 2021-08-27 stsp .Dq master
3130 a099809f 2021-08-27 stsp branch with
3131 a099809f 2021-08-27 stsp .Cm got integrate .
3132 a099809f 2021-08-27 stsp Because the rebase operation switched the work tree to the
3133 a099809f 2021-08-27 stsp .Dq unified-buffer-cache
3134 4b06140e 2022-03-22 thomas branch, the work tree must be switched back to the
3135 a099809f 2021-08-27 stsp .Dq master
3136 a099809f 2021-08-27 stsp branch first:
3137 a099809f 2021-08-27 stsp .Pp
3138 a099809f 2021-08-27 stsp .Dl $ got update -b master
3139 a099809f 2021-08-27 stsp .Dl $ got integrate unified-buffer-cache
3140 a099809f 2021-08-27 stsp .Pp
3141 083957f4 2020-02-24 stsp On the
3142 083957f4 2020-02-24 stsp .Dq master
3143 083957f4 2020-02-24 stsp branch, log messages for local changes can now be amended with
3144 083957f4 2020-02-24 stsp .Dq OK
3145 083957f4 2020-02-24 stsp by other developers and any other important new information:
3146 ff2cf171 2019-07-28 stsp .Pp
3147 083957f4 2020-02-24 stsp .Dl $ got update -c origin/master
3148 083957f4 2020-02-24 stsp .Dl $ got histedit -m
3149 083957f4 2020-02-24 stsp .Pp
3150 4b06140e 2022-03-22 thomas If the remote repository offers write access, local changes on the
3151 ff2cf171 2019-07-28 stsp .Dq master
3152 a099809f 2021-08-27 stsp branch can be sent to the remote repository with
3153 ac93b2c5 2021-10-08 thomas .Cm got send .
3154 ac93b2c5 2021-10-08 thomas Usually,
3155 a099809f 2021-08-27 stsp .Cm got send
3156 a099809f 2021-08-27 stsp can be run without further arguments.
3157 a099809f 2021-08-27 stsp The arguments shown here match defaults, provided the work tree's
3158 a099809f 2021-08-27 stsp current branch is the
3159 a099809f 2021-08-27 stsp .Dq master
3160 a099809f 2021-08-27 stsp branch:
3161 ff2cf171 2019-07-28 stsp .Pp
3162 a099809f 2021-08-27 stsp .Dl $ got send -b master origin
3163 a099809f 2021-08-27 stsp .Pp
3164 4b06140e 2022-03-22 thomas If the remote repository requires the HTTPS protocol, the
3165 a099809f 2021-08-27 stsp .Xr git-push 1
3166 a099809f 2021-08-27 stsp command must be used instead:
3167 a099809f 2021-08-27 stsp .Pp
3168 a099809f 2021-08-27 stsp .Dl $ cd /var/git/src.git
3169 ff2cf171 2019-07-28 stsp .Dl $ git push origin master
3170 4ff74dcf 2022-07-20 thomas .Pp
3171 4ff74dcf 2022-07-20 thomas When making contributions to projects which use the
3172 4ff74dcf 2022-07-20 thomas .Dq pull request
3173 4ff74dcf 2022-07-20 thomas workflow, SSH protocol repository access needs to be set up first.
3174 4ff74dcf 2022-07-20 thomas Once an account has been created on a Git hosting site it should
3175 4ff74dcf 2022-07-20 thomas be possible to upload a public SSH key for repository access
3176 4ff74dcf 2022-07-20 thomas authentication.
3177 4ff74dcf 2022-07-20 thomas .Pp
3178 4ff74dcf 2022-07-20 thomas The
3179 4ff74dcf 2022-07-20 thomas .Dq pull request
3180 4ff74dcf 2022-07-20 thomas workflow will usually involve two remote repositories.
3181 4ff74dcf 2022-07-20 thomas In the real-life example below, the
3182 4ff74dcf 2022-07-20 thomas .Dq origin
3183 4ff74dcf 2022-07-20 thomas repository was forked from the
3184 4ff74dcf 2022-07-20 thomas .Dq upstream
3185 4ff74dcf 2022-07-20 thomas repository by using the Git hosting site's web interface.
3186 4ff74dcf 2022-07-20 thomas The
3187 4ff74dcf 2022-07-20 thomas .Xr got.conf 5
3188 4ff74dcf 2022-07-20 thomas file in the local repository describes both remote repositories:
3189 4ff74dcf 2022-07-20 thomas .Bd -literal -offset indent
3190 4ff74dcf 2022-07-20 thomas # Jelmers's repository, which accepts pull requests
3191 4ff74dcf 2022-07-20 thomas remote "upstream" {
3192 4ff74dcf 2022-07-20 thomas server git@github.com
3193 4ff74dcf 2022-07-20 thomas protocol ssh
3194 4ff74dcf 2022-07-20 thomas repository "/jelmer/dulwich"
3195 4ff74dcf 2022-07-20 thomas branch { "master" }
3196 4ff74dcf 2022-07-20 thomas }
3197 4ff74dcf 2022-07-20 thomas
3198 4ff74dcf 2022-07-20 thomas # Stefan's fork, used as the default remote repository
3199 4ff74dcf 2022-07-20 thomas remote "origin" {
3200 4ff74dcf 2022-07-20 thomas server git@github.com
3201 4ff74dcf 2022-07-20 thomas protocol ssh
3202 4ff74dcf 2022-07-20 thomas repository "/stspdotname/dulwich"
3203 4ff74dcf 2022-07-20 thomas branch { "master" }
3204 4ff74dcf 2022-07-20 thomas }
3205 4ff74dcf 2022-07-20 thomas .Ed
3206 4ff74dcf 2022-07-20 thomas .Pp
3207 4ff74dcf 2022-07-20 thomas With this configuration, Stefan can create commits on
3208 4ff74dcf 2022-07-20 thomas .Dq refs/heads/master
3209 4ff74dcf 2022-07-20 thomas and send them to the
3210 4ff74dcf 2022-07-20 thomas .Dq origin
3211 4ff74dcf 2022-07-20 thomas repository by running:
3212 4ff74dcf 2022-07-20 thomas .Pp
3213 4ff74dcf 2022-07-20 thomas .Dl $ got send -b master origin
3214 4ff74dcf 2022-07-20 thomas .Pp
3215 4ff74dcf 2022-07-20 thomas The changes can now be proposed to Jelmer by opening a pull request
3216 4ff74dcf 2022-07-20 thomas via the Git hosting site's web interface.
3217 4ff74dcf 2022-07-20 thomas If Jelmer requests further changes to be made, additional commits
3218 4ff74dcf 2022-07-20 thomas can be created on the
3219 4ff74dcf 2022-07-20 thomas .Dq master
3220 4ff74dcf 2022-07-20 thomas branch and be added to the pull request by running
3221 4ff74dcf 2022-07-20 thomas .Cd got send
3222 4ff74dcf 2022-07-20 thomas again.
3223 4ff74dcf 2022-07-20 thomas .Pp
3224 4ff74dcf 2022-07-20 thomas If Jelmer prefers additional commits to be
3225 4ff74dcf 2022-07-20 thomas .Dq squashed
3226 4ff74dcf 2022-07-20 thomas then the following commands can be used to achieve this:
3227 4ff74dcf 2022-07-20 thomas .Pp
3228 4ff74dcf 2022-07-20 thomas .Dl $ got update -b master
3229 4ff74dcf 2022-07-20 thomas .Dl $ got update -c origin/master
3230 4ff74dcf 2022-07-20 thomas .Dl $ got histedit -f
3231 4ff74dcf 2022-07-20 thomas .Dl $ got send -f -b master origin
3232 4ff74dcf 2022-07-20 thomas .Pp
3233 4ff74dcf 2022-07-20 thomas Once Jelmer has accepted the pull request, Stefan can fetch the
3234 4ff74dcf 2022-07-20 thomas merged changes, and possibly several other new changes, by running:
3235 4ff74dcf 2022-07-20 thomas .Pp
3236 4ff74dcf 2022-07-20 thomas .Dl $ got fetch upstream
3237 4ff74dcf 2022-07-20 thomas .Pp
3238 4ff74dcf 2022-07-20 thomas The merged changes will now be visible under the reference
3239 4ff74dcf 2022-07-20 thomas .Dq refs/remotes/upstream/master .
3240 4ff74dcf 2022-07-20 thomas The local
3241 4ff74dcf 2022-07-20 thomas .Dq master
3242 4ff74dcf 2022-07-20 thomas branch can now be rebased on top of the latest changes
3243 4ff74dcf 2022-07-20 thomas from upstream:
3244 4ff74dcf 2022-07-20 thomas .Pp
3245 4ff74dcf 2022-07-20 thomas .Dl $ got update -b upstream/master
3246 4ff74dcf 2022-07-20 thomas .Dl $ got rebase master
3247 4ff74dcf 2022-07-20 thomas .Pp
3248 4ff74dcf 2022-07-20 thomas As a final step, the forked repository's copy of the master branch needs
3249 4ff74dcf 2022-07-20 thomas to be kept in sync by sending the new changes there:
3250 4ff74dcf 2022-07-20 thomas .Pp
3251 4ff74dcf 2022-07-20 thomas .Dl $ got send -f -b master origin
3252 4ff74dcf 2022-07-20 thomas .Pp
3253 4ff74dcf 2022-07-20 thomas If multiple pull requests need to be managed in parallel, a separate branch
3254 4ff74dcf 2022-07-20 thomas must be created for each pull request with
3255 4ff74dcf 2022-07-20 thomas .Cm got branch .
3256 4ff74dcf 2022-07-20 thomas Each such branch can then be used as above, in place of
3257 4ff74dcf 2022-07-20 thomas .Dq refs/heads/master .
3258 4ff74dcf 2022-07-20 thomas Changes for any accepted pull requests will still appear under
3259 4ff74dcf 2022-07-20 thomas .Dq refs/remotes/upstream/master,
3260 4ff74dcf 2022-07-20 thomas regardless of which branch was used in the forked repository to
3261 4ff74dcf 2022-07-20 thomas create a pull request.
3262 5c860e29 2018-03-12 stsp .Sh SEE ALSO
3263 0a79feb1 2021-04-10 stsp .Xr gotadmin 1 ,
3264 2312fc47 2019-07-15 stsp .Xr tog 1 ,
3265 2312fc47 2019-07-15 stsp .Xr git-repository 5 ,
3266 257add31 2020-09-09 stsp .Xr got-worktree 5 ,
3267 b345cf8f 2022-07-05 thomas .Xr got.conf 5 ,
3268 b345cf8f 2022-07-05 thomas .Xr gotweb 8
3269 1a208aaf 2018-04-01 stsp .Sh AUTHORS
3270 60c73080 2022-07-05 thomas .An Anthony J. Bentley Aq Mt bentley@openbsd.org
3271 60c73080 2022-07-05 thomas .An Christian Weisgerber Aq Mt naddy@openbsd.org
3272 60c73080 2022-07-05 thomas .An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org
3273 60c73080 2022-07-05 thomas .An Josh Rickmar Aq Mt jrick@zettaport.com
3274 bc3056e3 2019-08-18 stsp .An Joshua Stein Aq Mt jcs@openbsd.org
3275 60c73080 2022-07-05 thomas .An Klemens Nanni Aq Mt kn@openbsd.org
3276 60c73080 2022-07-05 thomas .An Martin Pieuchot Aq Mt mpi@openbsd.org
3277 f6fad9f6 2022-07-05 thomas .An Neels Hofmeyr Aq Mt neels@hofmeyr.de
3278 60c73080 2022-07-05 thomas .An Omar Polo Aq Mt op@openbsd.org
3279 83b416ed 2020-03-18 stsp .An Ori Bernstein Aq Mt ori@openbsd.org
3280 60c73080 2022-07-05 thomas .An Sebastien Marie Aq Mt semarie@openbsd.org
3281 60c73080 2022-07-05 thomas .An Stefan Sperling Aq Mt stsp@openbsd.org
3282 bee5044f 2022-07-05 thomas .An Steven McDonald Aq Mt steven@steven-mcdonald.id.au
3283 60c73080 2022-07-05 thomas .An Theo Buehler Aq Mt tb@openbsd.org
3284 60c73080 2022-07-05 thomas .An Thomas Adam Aq Mt thomas@xteddy.org
3285 60c73080 2022-07-05 thomas .An Tracey Emery Aq Mt tracey@traceyemery.net
3286 60c73080 2022-07-05 thomas .An Yang Zhong Aq Mt yzhong@freebsdfoundation.org
3287 de71b616 2022-07-05 thomas .Pp
3288 de71b616 2022-07-05 thomas Parts of
3289 de71b616 2022-07-05 thomas .Nm ,
3290 de71b616 2022-07-05 thomas .Xr tog 1 ,
3291 de71b616 2022-07-05 thomas and
3292 de71b616 2022-07-05 thomas .Xr gotweb 8
3293 de71b616 2022-07-05 thomas were derived from code under copyright by:
3294 de71b616 2022-07-05 thomas .Pp
3295 408db73d 2022-07-22 thomas .An Caldera International
3296 de71b616 2022-07-05 thomas .An Daniel Hartmeier
3297 de71b616 2022-07-05 thomas .An Esben Norby
3298 de71b616 2022-07-05 thomas .An Henning Brauer
3299 de71b616 2022-07-05 thomas .An HÃ¥kan Olsson
3300 de71b616 2022-07-05 thomas .An Ingo Schwarze
3301 de71b616 2022-07-05 thomas .An Jean-Francois Brousseau
3302 de71b616 2022-07-05 thomas .An Joris Vink
3303 de71b616 2022-07-05 thomas .An Jyri J. Virkki
3304 de71b616 2022-07-05 thomas .An Larry Wall
3305 408db73d 2022-07-22 thomas .An Markus Friedl
3306 de71b616 2022-07-05 thomas .An Niall O'Higgins
3307 de71b616 2022-07-05 thomas .An Niklas Hallqvist
3308 de71b616 2022-07-05 thomas .An Ray Lai
3309 de71b616 2022-07-05 thomas .An Ryan McBride
3310 de71b616 2022-07-05 thomas .An Theo de Raadt
3311 de71b616 2022-07-05 thomas .An Todd C. Miller
3312 de71b616 2022-07-05 thomas .An Xavier Santolaria
3313 e4badaa9 2022-07-05 thomas .Pp
3314 e4badaa9 2022-07-05 thomas .Nm
3315 e4badaa9 2022-07-05 thomas contains code contributed to the public domain by
3316 e4badaa9 2022-07-05 thomas .An Austin Appleby
3317 fa6e0e48 2019-05-23 stsp .Sh CAVEATS
3318 fa6e0e48 2019-05-23 stsp .Nm
3319 cc63216e 2020-12-26 stsp is a work-in-progress and some features remain to be implemented.
3320 1795b260 2021-04-02 kn .Pp
3321 fa6e0e48 2019-05-23 stsp At present, the user has to fall back on
3322 fa6e0e48 2019-05-23 stsp .Xr git 1
3323 cc63216e 2020-12-26 stsp to perform some tasks.
3324 cc63216e 2020-12-26 stsp In particular:
3325 cc63216e 2020-12-26 stsp .Bl -bullet
3326 cc63216e 2020-12-26 stsp .It
3327 cc63216e 2020-12-26 stsp Reading from remote repositories over HTTP or HTTPS protocols requires
3328 cc63216e 2020-12-26 stsp .Xr git-clone 1
3329 cc63216e 2020-12-26 stsp and
3330 cc63216e 2020-12-26 stsp .Xr git-fetch 1 .
3331 cc63216e 2020-12-26 stsp .It
3332 a099809f 2021-08-27 stsp Writing to remote repositories over HTTP or HTTPS protocols requires
3333 cc63216e 2020-12-26 stsp .Xr git-push 1 .
3334 cc63216e 2020-12-26 stsp .It
3335 22a38a43 2021-09-28 thomas The creation of merge commits with more than two parent commits requires
3336 cc63216e 2020-12-26 stsp .Xr git-merge 1 .
3337 cc63216e 2020-12-26 stsp .It
3338 cc63216e 2020-12-26 stsp In situations where files or directories were moved around
3339 cc63216e 2020-12-26 stsp .Cm got
3340 cc63216e 2020-12-26 stsp will not automatically merge changes to new locations and
3341 cc63216e 2020-12-26 stsp .Xr git 1
3342 cc63216e 2020-12-26 stsp will usually produce better results.
3343 cc63216e 2020-12-26 stsp .El