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 eaef698f 2022-04-23 thomas .It Cm patch 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 bfc91212 2022-03-13 thomas .It Fl n
1405 bfc91212 2022-03-13 thomas Do not make any modifications to the work tree.
1406 bfc91212 2022-03-13 thomas This can be used to check whether a patch would apply without issues.
1407 bfc91212 2022-03-13 thomas If the
1408 bfc91212 2022-03-13 thomas .Ar patchfile
1409 4b06140e 2022-03-22 thomas contains diffs that affect the same file multiple times, the results
1410 bfc91212 2022-03-13 thomas displayed may be incorrect.
1411 d9db2ff9 2022-04-16 thomas .It Fl p Ar strip-count
1412 d9db2ff9 2022-04-16 thomas Specify the number of leading path components to strip from paths
1413 d9db2ff9 2022-04-16 thomas parsed from
1414 d9db2ff9 2022-04-16 thomas .Ar patchfile .
1415 d9db2ff9 2022-04-16 thomas If the
1416 d9db2ff9 2022-04-16 thomas .Fl p
1417 d9db2ff9 2022-04-16 thomas option is not used,
1418 d9db2ff9 2022-04-16 thomas .Sq a/
1419 d9db2ff9 2022-04-16 thomas and
1420 d9db2ff9 2022-04-16 thomas .Sq b/
1421 d9db2ff9 2022-04-16 thomas path prefixes generated by
1422 d9db2ff9 2022-04-16 thomas .Xr git-diff 1
1423 d9db2ff9 2022-04-16 thomas will be recognized and stripped automatically.
1424 eaef698f 2022-04-23 thomas .It Fl R
1425 eaef698f 2022-04-23 thomas Reverse the patch before applying it.
1426 bfc91212 2022-03-13 thomas .El
1427 e8aa341a 2021-10-08 thomas .Tg rv
1428 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 ...
1429 d912d125 2021-11-04 thomas .Dl Pq alias: Cm rv
1430 bd81cfb7 2020-04-19 stsp Revert any local changes in files at the specified paths in a work tree.
1431 a129376b 2019-03-28 stsp File contents will be overwritten with those contained in the
1432 1dd86744 2019-08-12 anthony work tree's base commit.
1433 1dd86744 2019-08-12 anthony There is no way to bring discarded changes back after
1434 a129376b 2019-03-28 stsp .Cm got revert !
1435 a129376b 2019-03-28 stsp .Pp
1436 e20a8b6f 2019-06-04 stsp If a file was added with
1437 4b06140e 2022-03-22 thomas .Cm got add ,
1438 a129376b 2019-03-28 stsp it will become an unversioned file again.
1439 e20a8b6f 2019-06-04 stsp If a file was deleted with
1440 4b06140e 2022-03-22 thomas .Cm got remove ,
1441 a129376b 2019-03-28 stsp it will be restored.
1442 0f6d7415 2019-08-08 stsp .Pp
1443 0f6d7415 2019-08-08 stsp The options for
1444 0f6d7415 2019-08-08 stsp .Cm got revert
1445 0f6d7415 2019-08-08 stsp are as follows:
1446 0f6d7415 2019-08-08 stsp .Bl -tag -width Ds
1447 33aa809d 2019-08-08 stsp .It Fl p
1448 33aa809d 2019-08-08 stsp Instead of reverting all changes in files, interactively select or reject
1449 33aa809d 2019-08-08 stsp changes to revert based on
1450 33aa809d 2019-08-08 stsp .Dq y
1451 33aa809d 2019-08-08 stsp (revert change),
1452 33aa809d 2019-08-08 stsp .Dq n
1453 33aa809d 2019-08-08 stsp (keep change), and
1454 33aa809d 2019-08-08 stsp .Dq q
1455 33aa809d 2019-08-08 stsp (quit reverting this file) responses.
1456 33aa809d 2019-08-08 stsp If a file is in modified status, individual patches derived from the
1457 33aa809d 2019-08-08 stsp modified file content can be reverted.
1458 33aa809d 2019-08-08 stsp Files in added or deleted status may only be reverted in their entirety.
1459 33aa809d 2019-08-08 stsp .It Fl F Ar response-script
1460 33aa809d 2019-08-08 stsp With the
1461 33aa809d 2019-08-08 stsp .Fl p
1462 33aa809d 2019-08-08 stsp option, read
1463 33aa809d 2019-08-08 stsp .Dq y ,
1464 33aa809d 2019-08-08 stsp .Dq n ,
1465 33aa809d 2019-08-08 stsp and
1466 33aa809d 2019-08-08 stsp .Dq q
1467 33aa809d 2019-08-08 stsp responses line-by-line from the specified
1468 33aa809d 2019-08-08 stsp .Ar response-script
1469 33aa809d 2019-08-08 stsp file instead of prompting interactively.
1470 0f6d7415 2019-08-08 stsp .It Fl R
1471 0f6d7415 2019-08-08 stsp Permit recursion into directories.
1472 0f6d7415 2019-08-08 stsp If this option is not specified,
1473 0f6d7415 2019-08-08 stsp .Cm got revert
1474 0f6d7415 2019-08-08 stsp will refuse to run if a specified
1475 0f6d7415 2019-08-08 stsp .Ar path
1476 0f6d7415 2019-08-08 stsp is a directory.
1477 0f6d7415 2019-08-08 stsp .El
1478 e8aa341a 2021-10-08 thomas .Tg ci
1479 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 ...
1480 d912d125 2021-11-04 thomas .Dl Pq alias: Cm ci
1481 4ed9f614 2019-08-04 stsp Create a new commit in the repository from changes in a work tree
1482 15cd91f7 2019-05-12 stsp and use this commit as the new base commit for the work tree.
1483 5c1e53bc 2019-07-28 stsp If no
1484 90e8619e 2019-07-25 stsp .Ar path
1485 4ed9f614 2019-08-04 stsp is specified, commit all changes in the work tree.
1486 4ed9f614 2019-08-04 stsp Otherwise, commit changes at or within the specified paths.
1487 15cd91f7 2019-05-12 stsp .Pp
1488 4ed9f614 2019-08-04 stsp If changes have been explicitly staged for commit with
1489 1dd86744 2019-08-12 anthony .Cm got stage ,
1490 4ed9f614 2019-08-04 stsp only commit staged changes and reject any specified paths which
1491 4ed9f614 2019-08-04 stsp have not been staged.
1492 4ed9f614 2019-08-04 stsp .Pp
1493 28cf319f 2021-01-28 stsp .Cm got commit
1494 28cf319f 2021-01-28 stsp opens a temporary file in an editor where a log message can be written
1495 28cf319f 2021-01-28 stsp unless the
1496 28cf319f 2021-01-28 stsp .Fl m
1497 28cf319f 2021-01-28 stsp option is used
1498 28cf319f 2021-01-28 stsp or the
1499 28cf319f 2021-01-28 stsp .Fl F
1500 28cf319f 2021-01-28 stsp and
1501 28cf319f 2021-01-28 stsp .Fl N
1502 28cf319f 2021-01-28 stsp options are used together.
1503 28cf319f 2021-01-28 stsp .Pp
1504 15cd91f7 2019-05-12 stsp Show the status of each affected file, using the following status codes:
1505 15cd91f7 2019-05-12 stsp .Bl -column YXZ description
1506 15cd91f7 2019-05-12 stsp .It M Ta modified file
1507 15cd91f7 2019-05-12 stsp .It D Ta file was deleted
1508 15cd91f7 2019-05-12 stsp .It A Ta new file was added
1509 1ebedb77 2019-10-19 stsp .It m Ta modified file modes (executable bit only)
1510 15cd91f7 2019-05-12 stsp .El
1511 15cd91f7 2019-05-12 stsp .Pp
1512 996d5ccd 2019-08-05 stsp Files which are not part of the new commit will retain their previously
1513 996d5ccd 2019-08-05 stsp recorded base commit.
1514 15cd91f7 2019-05-12 stsp Some
1515 15cd91f7 2019-05-12 stsp .Nm
1516 15cd91f7 2019-05-12 stsp commands may refuse to run while the work tree contains files from
1517 15cd91f7 2019-05-12 stsp multiple base commits.
1518 15cd91f7 2019-05-12 stsp The base commit of such a work tree can be made consistent by running
1519 47ec7be7 2019-05-12 stsp .Cm got update
1520 47ec7be7 2019-05-12 stsp across the entire work tree.
1521 15cd91f7 2019-05-12 stsp .Pp
1522 15cd91f7 2019-05-12 stsp The
1523 15cd91f7 2019-05-12 stsp .Cm got commit
1524 15cd91f7 2019-05-12 stsp command requires the
1525 74416c47 2019-05-09 stsp .Ev GOT_AUTHOR
1526 aba9c984 2019-09-08 stsp environment variable to be set,
1527 257add31 2020-09-09 stsp unless an author has been configured in
1528 257add31 2020-09-09 stsp .Xr got.conf 5
1529 257add31 2020-09-09 stsp or Git's
1530 aba9c984 2019-09-08 stsp .Dv user.name
1531 aba9c984 2019-09-08 stsp and
1532 709ae9eb 2019-09-08 stsp .Dv user.email
1533 709ae9eb 2019-09-08 stsp configuration settings can be
1534 aba9c984 2019-09-08 stsp obtained from the repository's
1535 aba9c984 2019-09-08 stsp .Pa .git/config
1536 c9956ddf 2019-09-08 stsp file or from Git's global
1537 c9956ddf 2019-09-08 stsp .Pa ~/.gitconfig
1538 c9956ddf 2019-09-08 stsp configuration file.
1539 74416c47 2019-05-09 stsp .Pp
1540 74416c47 2019-05-09 stsp The options for
1541 74416c47 2019-05-09 stsp .Cm got commit
1542 74416c47 2019-05-09 stsp are as follows:
1543 74416c47 2019-05-09 stsp .Bl -tag -width Ds
1544 18d1acad 2022-07-20 thomas .It Fl A Ar author
1545 18d1acad 2022-07-20 thomas Set author information in the newly created commit to
1546 18d1acad 2022-07-20 thomas .Ar author .
1547 18d1acad 2022-07-20 thomas This is useful when committing changes which were written by someone
1548 18d1acad 2022-07-20 thomas else.
1549 18d1acad 2022-07-20 thomas The
1550 18d1acad 2022-07-20 thomas .Ar author
1551 18d1acad 2022-07-20 thomas argument must use the same format as the
1552 18d1acad 2022-07-20 thomas .Ev GOT_AUTHOR
1553 18d1acad 2022-07-20 thomas environment variable.
1554 18d1acad 2022-07-20 thomas .Pp
1555 18d1acad 2022-07-20 thomas In addition to storing author information, the newly created commit
1556 18d1acad 2022-07-20 thomas object will retain
1557 18d1acad 2022-07-20 thomas .Dq committer
1558 18d1acad 2022-07-20 thomas information which is obtained, as usual, from the
1559 18d1acad 2022-07-20 thomas .Ev GOT_AUTHOR
1560 18d1acad 2022-07-20 thomas environment variable, or
1561 18d1acad 2022-07-20 thomas .Xr got.conf 5 ,
1562 18d1acad 2022-07-20 thomas or Git configuration settings.
1563 28cf319f 2021-01-28 stsp .It Fl F Ar path
1564 28cf319f 2021-01-28 stsp Use the prepared log message stored in the file found at
1565 28cf319f 2021-01-28 stsp .Ar path
1566 28cf319f 2021-01-28 stsp when creating the new commit.
1567 28cf319f 2021-01-28 stsp .Cm got commit
1568 28cf319f 2021-01-28 stsp opens a temporary file in an editor where the prepared log message can be
1569 28cf319f 2021-01-28 stsp reviewed and edited further if needed.
1570 28cf319f 2021-01-28 stsp Cannot be used together with the
1571 23594da9 2019-05-13 stsp .Fl m
1572 28cf319f 2021-01-28 stsp option.
1573 28cf319f 2021-01-28 stsp .It Fl m Ar message
1574 28cf319f 2021-01-28 stsp Use the specified log message when creating the new commit.
1575 28cf319f 2021-01-28 stsp Cannot be used together with the
1576 28cf319f 2021-01-28 stsp .Fl F
1577 28cf319f 2021-01-28 stsp option.
1578 28cf319f 2021-01-28 stsp .It Fl N
1579 28cf319f 2021-01-28 stsp This option prevents
1580 23594da9 2019-05-13 stsp .Cm got commit
1581 28cf319f 2021-01-28 stsp from opening the commit message in an editor.
1582 28cf319f 2021-01-28 stsp It has no effect unless it is used together with the
1583 28cf319f 2021-01-28 stsp .Fl F
1584 28cf319f 2021-01-28 stsp option and is intended for non-interactive use such as scripting.
1585 35213c7c 2020-07-23 stsp .It Fl S
1586 af358f55 2020-07-23 stsp Allow the addition of symbolic links which point outside of the path space
1587 af358f55 2020-07-23 stsp that is under version control.
1588 af358f55 2020-07-23 stsp By default,
1589 af358f55 2020-07-23 stsp .Cm got commit
1590 af358f55 2020-07-23 stsp will reject such symbolic links due to safety concerns.
1591 35213c7c 2020-07-23 stsp As a precaution,
1592 35213c7c 2020-07-23 stsp .Nm
1593 af358f55 2020-07-23 stsp may decide to represent such a symbolic link as a regular file which contains
1594 af358f55 2020-07-23 stsp the link's target path, rather than creating an actual symbolic link which
1595 af358f55 2020-07-23 stsp points outside of the work tree.
1596 af358f55 2020-07-23 stsp Use of this option is discouraged because external mechanisms such as
1597 af358f55 2020-07-23 stsp .Dq make obj
1598 af358f55 2020-07-23 stsp are better suited for managing symbolic links to paths not under
1599 af358f55 2020-07-23 stsp version control.
1600 2ec1f75b 2019-03-26 stsp .El
1601 cfce0458 2019-07-28 stsp .Pp
1602 cfce0458 2019-07-28 stsp .Cm got commit
1603 cfce0458 2019-07-28 stsp will refuse to run if certain preconditions are not met.
1604 916f288c 2019-07-30 stsp If the work tree's current branch is not in the
1605 916f288c 2019-07-30 stsp .Dq refs/heads/
1606 916f288c 2019-07-30 stsp reference namespace, new commits may not be created on this branch.
1607 cfce0458 2019-07-28 stsp Local changes may only be committed if they are based on file content
1608 cfce0458 2019-07-28 stsp found in the most recent commit on the work tree's branch.
1609 cfce0458 2019-07-28 stsp If a path is found to be out of date,
1610 cfce0458 2019-07-28 stsp .Cm got update
1611 cfce0458 2019-07-28 stsp must be used first in order to merge local changes with changes made
1612 cfce0458 2019-07-28 stsp in the repository.
1613 e8aa341a 2021-10-08 thomas .Tg se
1614 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
1615 d912d125 2021-11-04 thomas .Dl Pq alias: Cm se
1616 f8a36e22 2021-08-26 stsp Send new changes to a remote repository.
1617 f8a36e22 2021-08-26 stsp If no
1618 f8a36e22 2021-08-26 stsp .Ar remote-repository
1619 f8a36e22 2021-08-26 stsp is specified,
1620 f8a36e22 2021-08-26 stsp .Dq origin
1621 f8a36e22 2021-08-26 stsp will be used.
1622 f8a36e22 2021-08-26 stsp The remote repository's URL is obtained from the corresponding entry in
1623 f8a36e22 2021-08-26 stsp .Xr got.conf 5
1624 f8a36e22 2021-08-26 stsp or Git's
1625 f8a36e22 2021-08-26 stsp .Pa config
1626 f8a36e22 2021-08-26 stsp file of the local repository, as created by
1627 f8a36e22 2021-08-26 stsp .Cm got clone .
1628 f8a36e22 2021-08-26 stsp .Pp
1629 f8a36e22 2021-08-26 stsp All objects corresponding to new changes will be written to a temporary
1630 f8a36e22 2021-08-26 stsp pack file which is then uploaded to the server.
1631 f8a36e22 2021-08-26 stsp Upon success, references in the
1632 f8a36e22 2021-08-26 stsp .Dq refs/remotes/
1633 f8a36e22 2021-08-26 stsp reference namespace of the local repository will be updated to point at
1634 f8a36e22 2021-08-26 stsp the commits which have been sent.
1635 f8a36e22 2021-08-26 stsp .Pp
1636 f8a36e22 2021-08-26 stsp By default, changes will only be sent if they are based on up-to-date
1637 f8a36e22 2021-08-26 stsp copies of relevant branches in the remote repository.
1638 fd44090b 2021-08-26 stsp If any changes to be sent are based on out-of-date copies or would
1639 fd44090b 2021-08-26 stsp otherwise break linear history of existing branches, new changes must
1640 fd44090b 2021-08-26 stsp be fetched from the server with
1641 f8a36e22 2021-08-26 stsp .Cm got fetch
1642 f8a36e22 2021-08-26 stsp and local branches must be rebased with
1643 f8a36e22 2021-08-26 stsp .Cm got rebase
1644 f8a36e22 2021-08-26 stsp before
1645 f8a36e22 2021-08-26 stsp .Cm got send
1646 f8a36e22 2021-08-26 stsp can succeed.
1647 fd44090b 2021-08-26 stsp The
1648 fd44090b 2021-08-26 stsp .Fl f
1649 fd44090b 2021-08-26 stsp option can be used to make exceptions to these requirements.
1650 f8a36e22 2021-08-26 stsp .Pp
1651 f8a36e22 2021-08-26 stsp The options for
1652 f8a36e22 2021-08-26 stsp .Cm got send
1653 f8a36e22 2021-08-26 stsp are as follows:
1654 f8a36e22 2021-08-26 stsp .Bl -tag -width Ds
1655 f8a36e22 2021-08-26 stsp .It Fl a
1656 f8a36e22 2021-08-26 stsp Send all branches from the local repository's
1657 f8a36e22 2021-08-26 stsp .Dq refs/heads/
1658 f8a36e22 2021-08-26 stsp reference namespace.
1659 f8a36e22 2021-08-26 stsp The
1660 f8a36e22 2021-08-26 stsp .Fl a
1661 f8a36e22 2021-08-26 stsp option is equivalent to listing all branches with multiple
1662 f8a36e22 2021-08-26 stsp .Fl b
1663 f8a36e22 2021-08-26 stsp options.
1664 f8a36e22 2021-08-26 stsp Cannot be used together with the
1665 f8a36e22 2021-08-26 stsp .Fl b
1666 f8a36e22 2021-08-26 stsp option.
1667 f8a36e22 2021-08-26 stsp .It Fl b Ar branch
1668 f8a36e22 2021-08-26 stsp Send the specified
1669 f8a36e22 2021-08-26 stsp .Ar branch
1670 f8a36e22 2021-08-26 stsp from the local repository's
1671 f8a36e22 2021-08-26 stsp .Dq refs/heads/
1672 f8a36e22 2021-08-26 stsp reference namespace.
1673 f8a36e22 2021-08-26 stsp This option may be specified multiple times to build a list of branches
1674 f8a36e22 2021-08-26 stsp to send.
1675 f8a36e22 2021-08-26 stsp If this option is not specified, default to the work tree's current branch
1676 f8a36e22 2021-08-26 stsp if invoked in a work tree, or to the repository's HEAD reference.
1677 f8a36e22 2021-08-26 stsp Cannot be used together with the
1678 f8a36e22 2021-08-26 stsp .Fl a
1679 f8a36e22 2021-08-26 stsp option.
1680 f8a36e22 2021-08-26 stsp .It Fl d Ar branch
1681 f8a36e22 2021-08-26 stsp Delete the specified
1682 f8a36e22 2021-08-26 stsp .Ar branch
1683 f8a36e22 2021-08-26 stsp from the remote repository's
1684 f8a36e22 2021-08-26 stsp .Dq refs/heads/
1685 f8a36e22 2021-08-26 stsp reference namespace.
1686 f8a36e22 2021-08-26 stsp This option may be specified multiple times to build a list of branches
1687 f8a36e22 2021-08-26 stsp to delete.
1688 f8a36e22 2021-08-26 stsp .Pp
1689 f8a36e22 2021-08-26 stsp Only references are deleted.
1690 f8a36e22 2021-08-26 stsp Any commit, tree, tag, and blob objects belonging to deleted branches
1691 f8a36e22 2021-08-26 stsp may become subject to deletion by Git's garbage collector running on
1692 f8a36e22 2021-08-26 stsp the server.
1693 f8a36e22 2021-08-26 stsp .Pp
1694 f8a36e22 2021-08-26 stsp Requesting deletion of branches results in an error if the server
1695 fd44090b 2021-08-26 stsp does not support this feature or disallows the deletion of branches
1696 fd44090b 2021-08-26 stsp based on its configuration.
1697 f8a36e22 2021-08-26 stsp .It Fl f
1698 fd44090b 2021-08-26 stsp Attempt to force the server to overwrite existing branches or tags
1699 fd44090b 2021-08-26 stsp in the remote repository, even when
1700 fd44090b 2021-08-26 stsp .Cm got fetch
1701 fd44090b 2021-08-26 stsp and
1702 fd44090b 2021-08-26 stsp .Cm got rebase
1703 fd44090b 2021-08-26 stsp would usually be required before changes can be sent.
1704 f8a36e22 2021-08-26 stsp The server may reject forced requests regardless, depending on its
1705 f8a36e22 2021-08-26 stsp configuration.
1706 f8a36e22 2021-08-26 stsp .Pp
1707 f8a36e22 2021-08-26 stsp Any commit, tree, tag, and blob objects belonging to overwritten branches
1708 f8a36e22 2021-08-26 stsp or tags may become subject to deletion by Git's garbage collector running
1709 f8a36e22 2021-08-26 stsp on the server.
1710 f8a36e22 2021-08-26 stsp .Pp
1711 f8a36e22 2021-08-26 stsp The
1712 f8a36e22 2021-08-26 stsp .Dq refs/tags
1713 f8a36e22 2021-08-26 stsp reference namespace is globally shared between all repositories.
1714 f8a36e22 2021-08-26 stsp Use of the
1715 f8a36e22 2021-08-26 stsp .Fl f
1716 f8a36e22 2021-08-26 stsp option to overwrite tags is discouraged because it can lead to
1717 f8a36e22 2021-08-26 stsp inconsistencies between the tags present in different repositories.
1718 f8a36e22 2021-08-26 stsp In general, creating a new tag with a different name is recommended
1719 f8a36e22 2021-08-26 stsp instead of overwriting an existing tag.
1720 f8a36e22 2021-08-26 stsp .Pp
1721 f8a36e22 2021-08-26 stsp Use of the
1722 f8a36e22 2021-08-26 stsp .Fl f
1723 f8a36e22 2021-08-26 stsp option is particularly discouraged if changes being sent are based
1724 f8a36e22 2021-08-26 stsp on an out-of-date copy of a branch in the remote repository.
1725 f8a36e22 2021-08-26 stsp Instead of using the
1726 f8a36e22 2021-08-26 stsp .Fl f
1727 f8a36e22 2021-08-26 stsp option, new changes should
1728 f8a36e22 2021-08-26 stsp be fetched with
1729 f8a36e22 2021-08-26 stsp .Cm got fetch
1730 f8a36e22 2021-08-26 stsp and local branches should be rebased with
1731 f8a36e22 2021-08-26 stsp .Cm got rebase ,
1732 f8a36e22 2021-08-26 stsp followed by another attempt to send the changes.
1733 f8a36e22 2021-08-26 stsp .Pp
1734 f8a36e22 2021-08-26 stsp The
1735 f8a36e22 2021-08-26 stsp .Fl f
1736 f8a36e22 2021-08-26 stsp option should only be needed in situations where the remote repository's
1737 f8a36e22 2021-08-26 stsp copy of a branch or tag is known to be out-of-date and is considered
1738 f8a36e22 2021-08-26 stsp disposable.
1739 f8a36e22 2021-08-26 stsp The risks of creating inconsistencies between different repositories
1740 f8a36e22 2021-08-26 stsp should also be taken into account.
1741 f8a36e22 2021-08-26 stsp .It Fl r Ar repository-path
1742 f8a36e22 2021-08-26 stsp Use the repository at the specified path.
1743 f8a36e22 2021-08-26 stsp If not specified, assume the repository is located at or above the current
1744 f8a36e22 2021-08-26 stsp working directory.
1745 f8a36e22 2021-08-26 stsp If this directory is a
1746 f8a36e22 2021-08-26 stsp .Nm
1747 f8a36e22 2021-08-26 stsp work tree, use the repository path associated with this work tree.
1748 f8a36e22 2021-08-26 stsp .It Fl t Ar tag
1749 f8a36e22 2021-08-26 stsp Send the specified
1750 f8a36e22 2021-08-26 stsp .Ar tag
1751 f8a36e22 2021-08-26 stsp from the local repository's
1752 f8a36e22 2021-08-26 stsp .Dq refs/tags/
1753 f8a36e22 2021-08-26 stsp reference namespace, in addition to any branches that are being sent.
1754 f8a36e22 2021-08-26 stsp The
1755 f8a36e22 2021-08-26 stsp .Fl t
1756 f8a36e22 2021-08-26 stsp option may be specified multiple times to build a list of tags to send.
1757 f8a36e22 2021-08-26 stsp No tags will be sent if the
1758 f8a36e22 2021-08-26 stsp .Fl t
1759 f8a36e22 2021-08-26 stsp option is not used.
1760 f8a36e22 2021-08-26 stsp .Pp
1761 f8a36e22 2021-08-26 stsp Raise an error if the specified
1762 f8a36e22 2021-08-26 stsp .Ar tag
1763 f8a36e22 2021-08-26 stsp already exists in the remote repository, unless the
1764 f8a36e22 2021-08-26 stsp .Fl f
1765 93a300b2 2021-08-26 stsp option is used to overwrite the server's copy of the tag.
1766 f8a36e22 2021-08-26 stsp In general, creating a new tag with a different name is recommended
1767 f8a36e22 2021-08-26 stsp instead of overwriting an existing tag.
1768 f8a36e22 2021-08-26 stsp .Pp
1769 f8a36e22 2021-08-26 stsp Cannot be used together with the
1770 f8a36e22 2021-08-26 stsp .Fl T
1771 f8a36e22 2021-08-26 stsp option.
1772 f8a36e22 2021-08-26 stsp .It Fl T
1773 f8a36e22 2021-08-26 stsp Attempt to send all tags from the local repository's
1774 f8a36e22 2021-08-26 stsp .Dq refs/tags/
1775 f8a36e22 2021-08-26 stsp reference namespace.
1776 f8a36e22 2021-08-26 stsp The
1777 f8a36e22 2021-08-26 stsp .Fl T
1778 f8a36e22 2021-08-26 stsp option is equivalent to listing all tags with multiple
1779 f8a36e22 2021-08-26 stsp .Fl t
1780 f8a36e22 2021-08-26 stsp options.
1781 f8a36e22 2021-08-26 stsp Cannot be used together with the
1782 f8a36e22 2021-08-26 stsp .Fl t
1783 f8a36e22 2021-08-26 stsp option.
1784 f8a36e22 2021-08-26 stsp .It Fl q
1785 f8a36e22 2021-08-26 stsp Suppress progress reporting output.
1786 f8a36e22 2021-08-26 stsp The same option will be passed to
1787 f8a36e22 2021-08-26 stsp .Xr ssh 1
1788 f8a36e22 2021-08-26 stsp if applicable.
1789 f8a36e22 2021-08-26 stsp .It Fl v
1790 f8a36e22 2021-08-26 stsp Verbose mode.
1791 f8a36e22 2021-08-26 stsp Causes
1792 f8a36e22 2021-08-26 stsp .Cm got send
1793 f8a36e22 2021-08-26 stsp to print debugging messages to standard error output.
1794 f8a36e22 2021-08-26 stsp The same option will be passed to
1795 f8a36e22 2021-08-26 stsp .Xr ssh 1
1796 f8a36e22 2021-08-26 stsp if applicable.
1797 f8a36e22 2021-08-26 stsp Multiple -v options increase the verbosity.
1798 f8a36e22 2021-08-26 stsp The maximum is 3.
1799 f8a36e22 2021-08-26 stsp .El
1800 e8aa341a 2021-10-08 thomas .Tg cy
1801 234035bc 2019-06-01 stsp .It Cm cherrypick Ar commit
1802 d912d125 2021-11-04 thomas .Dl Pq alias: Cm cy
1803 234035bc 2019-06-01 stsp Merge changes from a single
1804 234035bc 2019-06-01 stsp .Ar commit
1805 234035bc 2019-06-01 stsp into the work tree.
1806 234035bc 2019-06-01 stsp The specified
1807 234035bc 2019-06-01 stsp .Ar commit
1808 a16d97bd 2021-09-02 stsp should be on a different branch than the work tree's base commit.
1809 a54b6686 2019-06-28 stsp The expected argument is a reference or a commit ID SHA1 hash.
1810 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1811 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
1812 234035bc 2019-06-01 stsp .Pp
1813 234035bc 2019-06-01 stsp Show the status of each affected file, using the following status codes:
1814 234035bc 2019-06-01 stsp .Bl -column YXZ description
1815 234035bc 2019-06-01 stsp .It G Ta file was merged
1816 234035bc 2019-06-01 stsp .It C Ta file was merged and conflicts occurred during merge
1817 234035bc 2019-06-01 stsp .It ! Ta changes destined for a missing file were not merged
1818 234035bc 2019-06-01 stsp .It D Ta file was deleted
1819 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
1820 234035bc 2019-06-01 stsp .It A Ta new file was added
1821 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1822 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
1823 74416c47 2019-05-09 stsp .El
1824 234035bc 2019-06-01 stsp .Pp
1825 234035bc 2019-06-01 stsp The merged changes will appear as local changes in the work tree, which
1826 234035bc 2019-06-01 stsp may be viewed with
1827 234035bc 2019-06-01 stsp .Cm got diff ,
1828 234035bc 2019-06-01 stsp amended manually or with further
1829 234035bc 2019-06-01 stsp .Cm got cherrypick
1830 bc3056e3 2019-08-18 stsp commands,
1831 234035bc 2019-06-01 stsp committed with
1832 234035bc 2019-06-01 stsp .Cm got commit ,
1833 234035bc 2019-06-01 stsp or discarded again with
1834 234035bc 2019-06-01 stsp .Cm got revert .
1835 234035bc 2019-06-01 stsp .Pp
1836 234035bc 2019-06-01 stsp .Cm got cherrypick
1837 234035bc 2019-06-01 stsp will refuse to run if certain preconditions are not met.
1838 4b06140e 2022-03-22 thomas If the work tree contains multiple base commits, it must first be updated
1839 234035bc 2019-06-01 stsp to a single base commit with
1840 234035bc 2019-06-01 stsp .Cm got update .
1841 69de9dd4 2021-09-03 stsp If any relevant files already contain merge conflicts, these
1842 234035bc 2019-06-01 stsp conflicts must be resolved first.
1843 e8aa341a 2021-10-08 thomas .Tg bo
1844 5ef14e63 2019-06-02 stsp .It Cm backout Ar commit
1845 d912d125 2021-11-04 thomas .Dl Pq alias: Cm bo
1846 5ef14e63 2019-06-02 stsp Reverse-merge changes from a single
1847 5ef14e63 2019-06-02 stsp .Ar commit
1848 5ef14e63 2019-06-02 stsp into the work tree.
1849 5ef14e63 2019-06-02 stsp The specified
1850 5ef14e63 2019-06-02 stsp .Ar commit
1851 a16d97bd 2021-09-02 stsp should be on the same branch as the work tree's base commit.
1852 a54b6686 2019-06-28 stsp The expected argument is a reference or a commit ID SHA1 hash.
1853 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1854 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
1855 5ef14e63 2019-06-02 stsp .Pp
1856 5ef14e63 2019-06-02 stsp Show the status of each affected file, using the following status codes:
1857 5ef14e63 2019-06-02 stsp .Bl -column YXZ description
1858 5ef14e63 2019-06-02 stsp .It G Ta file was merged
1859 5ef14e63 2019-06-02 stsp .It C Ta file was merged and conflicts occurred during merge
1860 5ef14e63 2019-06-02 stsp .It ! Ta changes destined for a missing file were not merged
1861 5ef14e63 2019-06-02 stsp .It D Ta file was deleted
1862 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
1863 5ef14e63 2019-06-02 stsp .It A Ta new file was added
1864 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1865 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
1866 234035bc 2019-06-01 stsp .El
1867 5ef14e63 2019-06-02 stsp .Pp
1868 5ef14e63 2019-06-02 stsp The reverse-merged changes will appear as local changes in the work tree,
1869 5ef14e63 2019-06-02 stsp which may be viewed with
1870 5ef14e63 2019-06-02 stsp .Cm got diff ,
1871 5ef14e63 2019-06-02 stsp amended manually or with further
1872 778a73c2 2019-07-12 stsp .Cm got backout
1873 bc3056e3 2019-08-18 stsp commands,
1874 5ef14e63 2019-06-02 stsp committed with
1875 5ef14e63 2019-06-02 stsp .Cm got commit ,
1876 5ef14e63 2019-06-02 stsp or discarded again with
1877 5ef14e63 2019-06-02 stsp .Cm got revert .
1878 5ef14e63 2019-06-02 stsp .Pp
1879 92228c38 2019-06-02 stsp .Cm got backout
1880 92228c38 2019-06-02 stsp will refuse to run if certain preconditions are not met.
1881 4b06140e 2022-03-22 thomas If the work tree contains multiple base commits, it must first be updated
1882 92228c38 2019-06-02 stsp to a single base commit with
1883 92228c38 2019-06-02 stsp .Cm got update .
1884 69de9dd4 2021-09-03 stsp If any relevant files already contain merge conflicts, these
1885 92228c38 2019-06-02 stsp conflicts must be resolved first.
1886 e8aa341a 2021-10-08 thomas .Tg rb
1887 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
1888 d912d125 2021-11-04 thomas .Dl Pq alias: Cm rb
1889 818c7501 2019-07-11 stsp Rebase commits on the specified
1890 818c7501 2019-07-11 stsp .Ar branch
1891 818c7501 2019-07-11 stsp onto the tip of the current branch of the work tree.
1892 818c7501 2019-07-11 stsp The
1893 818c7501 2019-07-11 stsp .Ar branch
1894 818c7501 2019-07-11 stsp must share common ancestry with the work tree's current branch.
1895 bc3056e3 2019-08-18 stsp Rebasing begins with the first descendant commit of the youngest
1896 f09e2405 2019-07-11 stsp common ancestor commit shared by the specified
1897 818c7501 2019-07-11 stsp .Ar branch
1898 818c7501 2019-07-11 stsp and the work tree's current branch, and stops once the tip commit
1899 f09e2405 2019-07-11 stsp of the specified
1900 818c7501 2019-07-11 stsp .Ar branch
1901 f09e2405 2019-07-11 stsp has been rebased.
1902 818c7501 2019-07-11 stsp .Pp
1903 2b6826ba 2020-02-24 stsp When
1904 2b6826ba 2020-02-24 stsp .Cm got rebase
1905 2b6826ba 2020-02-24 stsp is used as intended, the specified
1906 2b6826ba 2020-02-24 stsp .Ar branch
1907 c10890ce 2020-02-25 stsp represents a local commit history and may already contain changes
1908 c10890ce 2020-02-25 stsp that are not yet visible in any other repositories.
1909 2b6826ba 2020-02-24 stsp The work tree's current branch, which must be set with
1910 2b6826ba 2020-02-24 stsp .Cm got update -b
1911 2b6826ba 2020-02-24 stsp before starting the
1912 2b6826ba 2020-02-24 stsp .Cm rebase
1913 2b6826ba 2020-02-24 stsp operation, represents a branch from a remote repository which shares
1914 2b6826ba 2020-02-24 stsp a common history with the specified
1915 2b6826ba 2020-02-24 stsp .Ar branch
1916 c10890ce 2020-02-25 stsp but has progressed, and perhaps diverged, due to commits added to the
1917 c10890ce 2020-02-25 stsp remote repository.
1918 2b6826ba 2020-02-24 stsp .Pp
1919 c6b4581b 2019-07-28 stsp Rebased commits are accumulated on a temporary branch which the work tree
1920 c6b4581b 2019-07-28 stsp will remain switched to throughout the entire rebase operation.
1921 c6b4581b 2019-07-28 stsp Commits on this branch represent the same changes with the same log
1922 c6b4581b 2019-07-28 stsp messages as their counterparts on the original
1923 818c7501 2019-07-11 stsp .Ar branch ,
1924 818c7501 2019-07-11 stsp but with different commit IDs.
1925 818c7501 2019-07-11 stsp Once rebasing has completed successfully, the temporary branch becomes
1926 f09e2405 2019-07-11 stsp the new version of the specified
1927 818c7501 2019-07-11 stsp .Ar branch
1928 818c7501 2019-07-11 stsp and the work tree is automatically switched to it.
1929 e600f124 2021-03-21 stsp .Pp
1930 1795b260 2021-04-02 kn Old commits in their pre-rebase state are automatically backed up in the
1931 e600f124 2021-03-21 stsp .Dq refs/got/backup/rebase
1932 e600f124 2021-03-21 stsp reference namespace.
1933 e600f124 2021-03-21 stsp As long as these references are not removed older versions of rebased
1934 e600f124 2021-03-21 stsp commits will remain in the repository and can be viewed with the
1935 e600f124 2021-03-21 stsp .Cm got rebase -l
1936 e600f124 2021-03-21 stsp command.
1937 e600f124 2021-03-21 stsp Removal of these references makes objects which become unreachable via
1938 e6786710 2021-07-03 stsp any reference subject to removal by Git's garbage collector or
1939 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
1940 818c7501 2019-07-11 stsp .Pp
1941 818c7501 2019-07-11 stsp While rebasing commits, show the status of each affected file,
1942 818c7501 2019-07-11 stsp using the following status codes:
1943 818c7501 2019-07-11 stsp .Bl -column YXZ description
1944 818c7501 2019-07-11 stsp .It G Ta file was merged
1945 818c7501 2019-07-11 stsp .It C Ta file was merged and conflicts occurred during merge
1946 818c7501 2019-07-11 stsp .It ! Ta changes destined for a missing file were not merged
1947 818c7501 2019-07-11 stsp .It D Ta file was deleted
1948 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
1949 818c7501 2019-07-11 stsp .It A Ta new file was added
1950 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1951 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
1952 5ef14e63 2019-06-02 stsp .El
1953 818c7501 2019-07-11 stsp .Pp
1954 4b06140e 2022-03-22 thomas If merge conflicts occur, the rebase operation is interrupted and may
1955 f09e2405 2019-07-11 stsp be continued once conflicts have been resolved.
1956 bb494413 2021-09-28 thomas If any files with destined changes are found to be missing or unversioned,
1957 bb494413 2021-09-28 thomas or if files could not be deleted due to differences in deleted content,
1958 bb494413 2021-09-28 thomas the rebase operation will be interrupted to prevent potentially incomplete
1959 bb494413 2021-09-28 thomas changes from being committed to the repository without user intervention.
1960 bb494413 2021-09-28 thomas The work tree may be modified as desired and the rebase operation can be
1961 bb494413 2021-09-28 thomas continued once the changes present in the work tree are considered complete.
1962 818c7501 2019-07-11 stsp Alternatively, the rebase operation may be aborted which will leave
1963 818c7501 2019-07-11 stsp .Ar branch
1964 818c7501 2019-07-11 stsp unmodified and the work tree switched back to its original branch.
1965 818c7501 2019-07-11 stsp .Pp
1966 ff0d2220 2019-07-11 stsp If a merge conflict is resolved in a way which renders the merged
1967 f09e2405 2019-07-11 stsp change into a no-op change, the corresponding commit will be elided
1968 f09e2405 2019-07-11 stsp when the rebase operation continues.
1969 ff0d2220 2019-07-11 stsp .Pp
1970 818c7501 2019-07-11 stsp .Cm got rebase
1971 818c7501 2019-07-11 stsp will refuse to run if certain preconditions are not met.
1972 a85446b2 2020-01-04 stsp If the work tree is not yet fully updated to the tip commit of its
1973 4b06140e 2022-03-22 thomas branch, then the work tree must first be updated with
1974 818c7501 2019-07-11 stsp .Cm got update .
1975 4ed9f614 2019-08-04 stsp If changes have been staged with
1976 4ed9f614 2019-08-04 stsp .Cm got stage ,
1977 bc3056e3 2019-08-18 stsp these changes must first be committed with
1978 4ed9f614 2019-08-04 stsp .Cm got commit
1979 4ed9f614 2019-08-04 stsp or unstaged with
1980 4ed9f614 2019-08-04 stsp .Cm got unstage .
1981 f09e2405 2019-07-11 stsp If the work tree contains local changes, these changes must first be
1982 f09e2405 2019-07-11 stsp committed with
1983 f09e2405 2019-07-11 stsp .Cm got commit
1984 f09e2405 2019-07-11 stsp or reverted with
1985 f09e2405 2019-07-11 stsp .Cm got revert .
1986 64c6d990 2019-07-11 stsp If the
1987 64c6d990 2019-07-11 stsp .Ar branch
1988 64c6d990 2019-07-11 stsp contains changes to files outside of the work tree's path prefix,
1989 64c6d990 2019-07-11 stsp the work tree cannot be used to rebase this branch.
1990 818c7501 2019-07-11 stsp .Pp
1991 7d5807f4 2019-07-11 stsp The
1992 7d5807f4 2019-07-11 stsp .Cm got update
1993 7d5807f4 2019-07-11 stsp and
1994 7d5807f4 2019-07-11 stsp .Cm got commit
1995 7d5807f4 2019-07-11 stsp commands will refuse to run while a rebase operation is in progress.
1996 7d5807f4 2019-07-11 stsp Other commands which manipulate the work tree may be used for
1997 7d5807f4 2019-07-11 stsp conflict resolution purposes.
1998 818c7501 2019-07-11 stsp .Pp
1999 d10218e7 2021-11-04 thomas If the specified
2000 d10218e7 2021-11-04 thomas .Ar branch
2001 4b06140e 2022-03-22 thomas is already based on the work tree's current branch, then no commits
2002 d10218e7 2021-11-04 thomas need to be rebased and
2003 d10218e7 2021-11-04 thomas .Cm got rebase
2004 d10218e7 2021-11-04 thomas will simply switch the work tree to the specified
2005 d10218e7 2021-11-04 thomas .Ar branch
2006 d10218e7 2021-11-04 thomas and update files in the work tree accordingly.
2007 d10218e7 2021-11-04 thomas .Pp
2008 818c7501 2019-07-11 stsp The options for
2009 818c7501 2019-07-11 stsp .Cm got rebase
2010 818c7501 2019-07-11 stsp are as follows:
2011 818c7501 2019-07-11 stsp .Bl -tag -width Ds
2012 818c7501 2019-07-11 stsp .It Fl a
2013 818c7501 2019-07-11 stsp Abort an interrupted rebase operation.
2014 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
2015 818c7501 2019-07-11 stsp .It Fl c
2016 06067b48 2019-07-11 stsp Continue an interrupted rebase operation.
2017 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
2018 e600f124 2021-03-21 stsp .It Fl l
2019 e600f124 2021-03-21 stsp Show a list of past rebase operations, represented by references in the
2020 e600f124 2021-03-21 stsp .Dq refs/got/backup/rebase
2021 e600f124 2021-03-21 stsp reference namespace.
2022 e600f124 2021-03-21 stsp .Pp
2023 e600f124 2021-03-21 stsp Display the author, date, and log message of each backed up commit,
2024 e600f124 2021-03-21 stsp the object ID of the corresponding post-rebase commit, and
2025 e600f124 2021-03-21 stsp the object ID of their common ancestor commit.
2026 e600f124 2021-03-21 stsp Given these object IDs,
2027 e600f124 2021-03-21 stsp the
2028 e600f124 2021-03-21 stsp .Cm got log
2029 e600f124 2021-03-21 stsp command with the
2030 e600f124 2021-03-21 stsp .Fl c
2031 e600f124 2021-03-21 stsp and
2032 e600f124 2021-03-21 stsp .Fl x
2033 e600f124 2021-03-21 stsp options can be used to examine the history of either version of the branch,
2034 e600f124 2021-03-21 stsp and the
2035 e600f124 2021-03-21 stsp .Cm got branch
2036 e600f124 2021-03-21 stsp command with the
2037 e600f124 2021-03-21 stsp .Fl c
2038 e600f124 2021-03-21 stsp option can be used to create a new branch from a pre-rebase state if desired.
2039 e600f124 2021-03-21 stsp .Pp
2040 e600f124 2021-03-21 stsp If a
2041 e600f124 2021-03-21 stsp .Ar branch
2042 e600f124 2021-03-21 stsp is specified, only show commits which at some point in time represented this
2043 e600f124 2021-03-21 stsp branch.
2044 e600f124 2021-03-21 stsp Otherwise, list all backed up commits for any branches.
2045 e600f124 2021-03-21 stsp .Pp
2046 e600f124 2021-03-21 stsp If this option is used,
2047 e600f124 2021-03-21 stsp .Cm got rebase
2048 e600f124 2021-03-21 stsp does not require a work tree.
2049 e600f124 2021-03-21 stsp None of the other options can be used together with
2050 e600f124 2021-03-21 stsp .Fl l .
2051 643b85bc 2021-07-16 stsp .It Fl X
2052 643b85bc 2021-07-16 stsp Delete backups created by past rebase operations, represented by references
2053 643b85bc 2021-07-16 stsp in the
2054 643b85bc 2021-07-16 stsp .Dq refs/got/backup/rebase
2055 643b85bc 2021-07-16 stsp reference namespace.
2056 643b85bc 2021-07-16 stsp .Pp
2057 643b85bc 2021-07-16 stsp If a
2058 643b85bc 2021-07-16 stsp .Ar branch
2059 643b85bc 2021-07-16 stsp is specified, only delete backups which at some point in time represented
2060 643b85bc 2021-07-16 stsp this branch.
2061 643b85bc 2021-07-16 stsp Otherwise, delete all references found within
2062 643b85bc 2021-07-16 stsp .Dq refs/got/backup/rebase .
2063 643b85bc 2021-07-16 stsp .Pp
2064 643b85bc 2021-07-16 stsp Any commit, tree, tag, and blob objects belonging to deleted backups
2065 643b85bc 2021-07-16 stsp remain in the repository and may be removed separately with
2066 643b85bc 2021-07-16 stsp Git's garbage collector or
2067 643b85bc 2021-07-16 stsp .Cm gotadmin cleanup .
2068 643b85bc 2021-07-16 stsp .Pp
2069 643b85bc 2021-07-16 stsp If this option is used,
2070 643b85bc 2021-07-16 stsp .Cm got rebase
2071 643b85bc 2021-07-16 stsp does not require a work tree.
2072 643b85bc 2021-07-16 stsp None of the other options can be used together with
2073 643b85bc 2021-07-16 stsp .Fl X .
2074 818c7501 2019-07-11 stsp .El
2075 e8aa341a 2021-10-08 thomas .Tg he
2076 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
2077 d912d125 2021-11-04 thomas .Dl Pq alias: Cm he
2078 0ebf8283 2019-07-24 stsp Edit commit history between the work tree's current base commit and
2079 0ebf8283 2019-07-24 stsp the tip commit of the work tree's current branch.
2080 6e54d307 2020-02-24 stsp .Pp
2081 6e54d307 2020-02-24 stsp Before starting a
2082 6e54d307 2020-02-24 stsp .Cm histedit
2083 4b06140e 2022-03-22 thomas operation, the work tree's current branch must be set with
2084 6e54d307 2020-02-24 stsp .Cm got update -b
2085 6e54d307 2020-02-24 stsp to the branch which should be edited, unless this branch is already the
2086 6e54d307 2020-02-24 stsp current branch of the work tree.
2087 6e54d307 2020-02-24 stsp The tip of this branch represents the upper bound (inclusive) of commits
2088 6e54d307 2020-02-24 stsp touched by the
2089 6e54d307 2020-02-24 stsp .Cm histedit
2090 6e54d307 2020-02-24 stsp operation.
2091 0ebf8283 2019-07-24 stsp .Pp
2092 6e54d307 2020-02-24 stsp Furthermore, the work tree's base commit
2093 6e54d307 2020-02-24 stsp must be set with
2094 6e54d307 2020-02-24 stsp .Cm got update -c
2095 6e54d307 2020-02-24 stsp to a point in this branch's commit history where editing should begin.
2096 6e54d307 2020-02-24 stsp This commit represents the lower bound (non-inclusive) of commits touched
2097 6e54d307 2020-02-24 stsp by the
2098 6e54d307 2020-02-24 stsp .Cm histedit
2099 6e54d307 2020-02-24 stsp operation.
2100 6e54d307 2020-02-24 stsp .Pp
2101 0ebf8283 2019-07-24 stsp Editing of commit history is controlled via a
2102 0ebf8283 2019-07-24 stsp .Ar histedit script
2103 46fa4c83 2020-02-24 stsp which can be written in an editor based on a template, passed on the
2104 46fa4c83 2020-02-24 stsp command line, or generated with the
2105 466785b9 2020-12-10 jrick .Fl f
2106 466785b9 2020-12-10 jrick or
2107 083957f4 2020-02-24 stsp .Fl m
2108 466785b9 2020-12-10 jrick options.
2109 083957f4 2020-02-24 stsp .Pp
2110 0ebf8283 2019-07-24 stsp The format of the histedit script is line-based.
2111 0ebf8283 2019-07-24 stsp Each line in the script begins with a command name, followed by
2112 0ebf8283 2019-07-24 stsp whitespace and an argument.
2113 0ebf8283 2019-07-24 stsp For most commands, the expected argument is a commit ID SHA1 hash.
2114 0ebf8283 2019-07-24 stsp Any remaining text on the line is ignored.
2115 0ebf8283 2019-07-24 stsp Lines which begin with the
2116 0ebf8283 2019-07-24 stsp .Sq #
2117 0ebf8283 2019-07-24 stsp character are ignored entirely.
2118 0ebf8283 2019-07-24 stsp .Pp
2119 f3a5718a 2022-07-12 thomas The available histedit script commands are as follows:
2120 0ebf8283 2019-07-24 stsp .Bl -column YXZ pick-commit
2121 f3a5718a 2022-07-12 thomas .It Cm pick Ar commit Ta Use the specified commit as it is.
2122 f3a5718a 2022-07-12 thomas .It Cm edit Ar commit Ta Use the specified commit but once changes have been
2123 0ebf8283 2019-07-24 stsp merged into the work tree interrupt the histedit operation for amending.
2124 f3a5718a 2022-07-12 thomas .It Cm fold Ar commit Ta Combine the specified commit with the next commit
2125 0ebf8283 2019-07-24 stsp listed further below that will be used.
2126 f3a5718a 2022-07-12 thomas .It Cm drop Ar commit Ta Remove this commit from the edited history.
2127 f3a5718a 2022-07-12 thomas .It Cm mesg Oo Ar log-message Oc Ta Create a new log message for the commit of
2128 f3a5718a 2022-07-12 thomas a preceding
2129 f3a5718a 2022-07-12 thomas .Cm pick
2130 f3a5718a 2022-07-12 thomas or
2131 f3a5718a 2022-07-12 thomas .Cm edit
2132 f3a5718a 2022-07-12 thomas command on the previous line of the histedit script.
2133 eefbc049 2022-07-12 thomas The optional
2134 eefbc049 2022-07-12 thomas .Ar log-message
2135 eefbc049 2022-07-12 thomas argument provides a new single-line log message to use.
2136 eefbc049 2022-07-12 thomas If the
2137 eefbc049 2022-07-12 thomas .Ar log-message
2138 eefbc049 2022-07-12 thomas argument is omitted, open an editor where a new log message can be written.
2139 0ebf8283 2019-07-24 stsp .El
2140 0ebf8283 2019-07-24 stsp .Pp
2141 ba67992e 2019-07-25 stsp Every commit in the history being edited must be mentioned in the script.
2142 0ebf8283 2019-07-24 stsp Lines may be re-ordered to change the order of commits in the edited history.
2143 5b87815e 2020-03-05 stsp No commit may be listed more than once.
2144 0ebf8283 2019-07-24 stsp .Pp
2145 c6b4581b 2019-07-28 stsp Edited commits are accumulated on a temporary branch which the work tree
2146 c6b4581b 2019-07-28 stsp will remain switched to throughout the entire histedit operation.
2147 0ebf8283 2019-07-24 stsp Once history editing has completed successfully, the temporary branch becomes
2148 498a90b7 2019-07-25 stsp the new version of the work tree's branch and the work tree is automatically
2149 498a90b7 2019-07-25 stsp switched to it.
2150 0ebf8283 2019-07-24 stsp .Pp
2151 1795b260 2021-04-02 kn Old commits in their pre-histedit state are automatically backed up in the
2152 e600f124 2021-03-21 stsp .Dq refs/got/backup/histedit
2153 e600f124 2021-03-21 stsp reference namespace.
2154 e600f124 2021-03-21 stsp As long as these references are not removed older versions of edited
2155 e600f124 2021-03-21 stsp commits will remain in the repository and can be viewed with the
2156 e600f124 2021-03-21 stsp .Cm got histedit -l
2157 e600f124 2021-03-21 stsp command.
2158 e600f124 2021-03-21 stsp Removal of these references makes objects which become unreachable via
2159 e6786710 2021-07-03 stsp any reference subject to removal by Git's garbage collector or
2160 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
2161 e600f124 2021-03-21 stsp .Pp
2162 0ebf8283 2019-07-24 stsp While merging commits, show the status of each affected file,
2163 0ebf8283 2019-07-24 stsp using the following status codes:
2164 0ebf8283 2019-07-24 stsp .Bl -column YXZ description
2165 0ebf8283 2019-07-24 stsp .It G Ta file was merged
2166 0ebf8283 2019-07-24 stsp .It C Ta file was merged and conflicts occurred during merge
2167 0ebf8283 2019-07-24 stsp .It ! Ta changes destined for a missing file were not merged
2168 0ebf8283 2019-07-24 stsp .It D Ta file was deleted
2169 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
2170 0ebf8283 2019-07-24 stsp .It A Ta new file was added
2171 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
2172 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
2173 0ebf8283 2019-07-24 stsp .El
2174 0ebf8283 2019-07-24 stsp .Pp
2175 4b06140e 2022-03-22 thomas If merge conflicts occur, the histedit operation is interrupted and may
2176 0ebf8283 2019-07-24 stsp be continued once conflicts have been resolved.
2177 dddbe150 2021-09-28 thomas If any files with destined changes are found to be missing or unversioned,
2178 dddbe150 2021-09-28 thomas or if files could not be deleted due to differences in deleted content,
2179 dddbe150 2021-09-28 thomas the histedit operation will be interrupted to prevent potentially incomplete
2180 dddbe150 2021-09-28 thomas changes from being committed to the repository without user intervention.
2181 dddbe150 2021-09-28 thomas The work tree may be modified as desired and the histedit operation can be
2182 dddbe150 2021-09-28 thomas continued once the changes present in the work tree are considered complete.
2183 0ebf8283 2019-07-24 stsp Alternatively, the histedit operation may be aborted which will leave
2184 0ebf8283 2019-07-24 stsp the work tree switched back to its original branch.
2185 0ebf8283 2019-07-24 stsp .Pp
2186 0ebf8283 2019-07-24 stsp If a merge conflict is resolved in a way which renders the merged
2187 0ebf8283 2019-07-24 stsp change into a no-op change, the corresponding commit will be elided
2188 0ebf8283 2019-07-24 stsp when the histedit operation continues.
2189 0ebf8283 2019-07-24 stsp .Pp
2190 0ebf8283 2019-07-24 stsp .Cm got histedit
2191 0ebf8283 2019-07-24 stsp will refuse to run if certain preconditions are not met.
2192 c7d20a3f 2019-07-30 stsp If the work tree's current branch is not in the
2193 c7d20a3f 2019-07-30 stsp .Dq refs/heads/
2194 c7d20a3f 2019-07-30 stsp reference namespace, the history of the branch may not be edited.
2195 4b06140e 2022-03-22 thomas If the work tree contains multiple base commits, it must first be updated
2196 0ebf8283 2019-07-24 stsp to a single base commit with
2197 0ebf8283 2019-07-24 stsp .Cm got update .
2198 4ed9f614 2019-08-04 stsp If changes have been staged with
2199 4ed9f614 2019-08-04 stsp .Cm got stage ,
2200 bc3056e3 2019-08-18 stsp these changes must first be committed with
2201 4ed9f614 2019-08-04 stsp .Cm got commit
2202 4ed9f614 2019-08-04 stsp or unstaged with
2203 4ed9f614 2019-08-04 stsp .Cm got unstage .
2204 0ebf8283 2019-07-24 stsp If the work tree contains local changes, these changes must first be
2205 0ebf8283 2019-07-24 stsp committed with
2206 0ebf8283 2019-07-24 stsp .Cm got commit
2207 0ebf8283 2019-07-24 stsp or reverted with
2208 0ebf8283 2019-07-24 stsp .Cm got revert .
2209 0ebf8283 2019-07-24 stsp If the edited history contains changes to files outside of the work tree's
2210 0ebf8283 2019-07-24 stsp path prefix, the work tree cannot be used to edit the history of this branch.
2211 0ebf8283 2019-07-24 stsp .Pp
2212 0ebf8283 2019-07-24 stsp The
2213 7ef62c4e 2020-02-24 stsp .Cm got update ,
2214 7ef62c4e 2020-02-24 stsp .Cm got rebase ,
2215 65db4ffb 2020-02-24 stsp and
2216 65db4ffb 2020-02-24 stsp .Cm got integrate
2217 65db4ffb 2020-02-24 stsp commands will refuse to run while a histedit operation is in progress.
2218 a698f62e 2019-07-25 stsp Other commands which manipulate the work tree may be used, and the
2219 0ebf8283 2019-07-24 stsp .Cm got commit
2220 a698f62e 2019-07-25 stsp command may be used to commit arbitrary changes to the temporary branch
2221 a698f62e 2019-07-25 stsp while the histedit operation is interrupted.
2222 0ebf8283 2019-07-24 stsp .Pp
2223 0ebf8283 2019-07-24 stsp The options for
2224 0ebf8283 2019-07-24 stsp .Cm got histedit
2225 0ebf8283 2019-07-24 stsp are as follows:
2226 0ebf8283 2019-07-24 stsp .Bl -tag -width Ds
2227 0ebf8283 2019-07-24 stsp .It Fl a
2228 0ebf8283 2019-07-24 stsp Abort an interrupted histedit operation.
2229 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
2230 0ebf8283 2019-07-24 stsp .It Fl c
2231 0ebf8283 2019-07-24 stsp Continue an interrupted histedit operation.
2232 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
2233 c50a7455 2021-10-04 thomas .It Fl e
2234 c50a7455 2021-10-04 thomas Interrupt the histedit operation for editing after merging each commit.
2235 c50a7455 2021-10-04 thomas This option is a quick equivalent to a histedit script which uses the
2236 c50a7455 2021-10-04 thomas .Cm edit
2237 c50a7455 2021-10-04 thomas command for all commits.
2238 c50a7455 2021-10-04 thomas The
2239 c50a7455 2021-10-04 thomas .Fl e
2240 c50a7455 2021-10-04 thomas option can only be used when starting a new histedit operation.
2241 c50a7455 2021-10-04 thomas If this option is used, no other command-line arguments are allowed.
2242 466785b9 2020-12-10 jrick .It Fl f
2243 466785b9 2020-12-10 jrick Fold all commits into a single commit.
2244 466785b9 2020-12-10 jrick This option is a quick equivalent to a histedit script which folds all
2245 466785b9 2020-12-10 jrick commits, combining them all into one commit.
2246 2a78779e 2020-12-11 stsp The
2247 2a78779e 2020-12-11 stsp .Fl f
2248 2a78779e 2020-12-11 stsp option can only be used when starting a new histedit operation.
2249 466785b9 2020-12-10 jrick If this option is used, no other command-line arguments are allowed.
2250 ddbfac99 2020-02-24 stsp .It Fl F Ar histedit-script
2251 ddbfac99 2020-02-24 stsp Use the specified
2252 ddbfac99 2020-02-24 stsp .Ar histedit-script
2253 ddbfac99 2020-02-24 stsp instead of opening a temporary file in an editor where a histedit script
2254 ddbfac99 2020-02-24 stsp can be written.
2255 083957f4 2020-02-24 stsp .It Fl m
2256 083957f4 2020-02-24 stsp Edit log messages only.
2257 083957f4 2020-02-24 stsp This option is a quick equivalent to a histedit script which edits
2258 2bdefe56 2020-02-24 tracey only log messages but otherwise leaves every picked commit as-is.
2259 083957f4 2020-02-24 stsp The
2260 083957f4 2020-02-24 stsp .Fl m
2261 083957f4 2020-02-24 stsp option can only be used when starting a new histedit operation.
2262 083957f4 2020-02-24 stsp If this option is used, no other command-line arguments are allowed.
2263 e600f124 2021-03-21 stsp .It Fl l
2264 e600f124 2021-03-21 stsp Show a list of past histedit operations, represented by references in the
2265 e600f124 2021-03-21 stsp .Dq refs/got/backup/histedit
2266 e600f124 2021-03-21 stsp reference namespace.
2267 e600f124 2021-03-21 stsp .Pp
2268 e600f124 2021-03-21 stsp Display the author, date, and log message of each backed up commit,
2269 e600f124 2021-03-21 stsp the object ID of the corresponding post-histedit commit, and
2270 e600f124 2021-03-21 stsp the object ID of their common ancestor commit.
2271 e600f124 2021-03-21 stsp Given these object IDs,
2272 e600f124 2021-03-21 stsp the
2273 e600f124 2021-03-21 stsp .Cm got log
2274 e600f124 2021-03-21 stsp command with the
2275 e600f124 2021-03-21 stsp .Fl c
2276 e600f124 2021-03-21 stsp and
2277 e600f124 2021-03-21 stsp .Fl x
2278 e600f124 2021-03-21 stsp options can be used to examine the history of either version of the branch,
2279 e600f124 2021-03-21 stsp and the
2280 e600f124 2021-03-21 stsp .Cm got branch
2281 e600f124 2021-03-21 stsp command with the
2282 e600f124 2021-03-21 stsp .Fl c
2283 e600f124 2021-03-21 stsp option can be used to create a new branch from a pre-histedit state if desired.
2284 e600f124 2021-03-21 stsp .Pp
2285 e600f124 2021-03-21 stsp If a
2286 e600f124 2021-03-21 stsp .Ar branch
2287 e600f124 2021-03-21 stsp is specified, only show commits which at some point in time represented this
2288 e600f124 2021-03-21 stsp branch.
2289 e600f124 2021-03-21 stsp Otherwise, list all backed up commits for any branches.
2290 e600f124 2021-03-21 stsp .Pp
2291 e600f124 2021-03-21 stsp If this option is used,
2292 e600f124 2021-03-21 stsp .Cm got histedit
2293 e600f124 2021-03-21 stsp does not require a work tree.
2294 e600f124 2021-03-21 stsp None of the other options can be used together with
2295 e600f124 2021-03-21 stsp .Fl l .
2296 643b85bc 2021-07-16 stsp .It Fl X
2297 643b85bc 2021-07-16 stsp Delete backups created by past histedit operations, represented by references
2298 643b85bc 2021-07-16 stsp in the
2299 643b85bc 2021-07-16 stsp .Dq refs/got/backup/histedit
2300 643b85bc 2021-07-16 stsp reference namespace.
2301 643b85bc 2021-07-16 stsp .Pp
2302 643b85bc 2021-07-16 stsp If a
2303 643b85bc 2021-07-16 stsp .Ar branch
2304 643b85bc 2021-07-16 stsp is specified, only delete backups which at some point in time represented
2305 643b85bc 2021-07-16 stsp this branch.
2306 643b85bc 2021-07-16 stsp Otherwise, delete all references found within
2307 643b85bc 2021-07-16 stsp .Dq refs/got/backup/histedit .
2308 643b85bc 2021-07-16 stsp .Pp
2309 643b85bc 2021-07-16 stsp Any commit, tree, tag, and blob objects belonging to deleted backups
2310 643b85bc 2021-07-16 stsp remain in the repository and may be removed separately with
2311 643b85bc 2021-07-16 stsp Git's garbage collector or
2312 643b85bc 2021-07-16 stsp .Cm gotadmin cleanup .
2313 643b85bc 2021-07-16 stsp .Pp
2314 643b85bc 2021-07-16 stsp If this option is used,
2315 643b85bc 2021-07-16 stsp .Cm got histedit
2316 643b85bc 2021-07-16 stsp does not require a work tree.
2317 643b85bc 2021-07-16 stsp None of the other options can be used together with
2318 643b85bc 2021-07-16 stsp .Fl X .
2319 818c7501 2019-07-11 stsp .El
2320 e8aa341a 2021-10-08 thomas .Tg ig
2321 2822a352 2019-10-15 stsp .It Cm integrate Ar branch
2322 d912d125 2021-11-04 thomas .Dl Pq alias: Cm ig
2323 2822a352 2019-10-15 stsp Integrate the specified
2324 2822a352 2019-10-15 stsp .Ar branch
2325 2822a352 2019-10-15 stsp into the work tree's current branch.
2326 2822a352 2019-10-15 stsp Files in the work tree are updated to match the contents on the integrated
2327 2822a352 2019-10-15 stsp .Ar branch ,
2328 2822a352 2019-10-15 stsp and the reference of the work tree's branch is changed to point at the
2329 2822a352 2019-10-15 stsp head commit of the integrated
2330 2822a352 2019-10-15 stsp .Ar branch .
2331 2822a352 2019-10-15 stsp .Pp
2332 2822a352 2019-10-15 stsp Both branches can be considered equivalent after integration since they
2333 2822a352 2019-10-15 stsp will be pointing at the same commit.
2334 2822a352 2019-10-15 stsp Both branches remain available for future work, if desired.
2335 2822a352 2019-10-15 stsp In case the integrated
2336 2822a352 2019-10-15 stsp .Ar branch
2337 2822a352 2019-10-15 stsp is no longer needed it may be deleted with
2338 2822a352 2019-10-15 stsp .Cm got branch -d .
2339 2822a352 2019-10-15 stsp .Pp
2340 2822a352 2019-10-15 stsp Show the status of each affected file, using the following status codes:
2341 2822a352 2019-10-15 stsp .Bl -column YXZ description
2342 2822a352 2019-10-15 stsp .It U Ta file was updated
2343 2822a352 2019-10-15 stsp .It D Ta file was deleted
2344 2822a352 2019-10-15 stsp .It A Ta new file was added
2345 2822a352 2019-10-15 stsp .It \(a~ Ta versioned file is obstructed by a non-regular file
2346 2822a352 2019-10-15 stsp .It ! Ta a missing versioned file was restored
2347 2822a352 2019-10-15 stsp .El
2348 2822a352 2019-10-15 stsp .Pp
2349 2822a352 2019-10-15 stsp .Cm got integrate
2350 2822a352 2019-10-15 stsp will refuse to run if certain preconditions are not met.
2351 2822a352 2019-10-15 stsp Most importantly, the
2352 2822a352 2019-10-15 stsp .Ar branch
2353 2822a352 2019-10-15 stsp must have been rebased onto the work tree's current branch with
2354 2822a352 2019-10-15 stsp .Cm got rebase
2355 2822a352 2019-10-15 stsp before it can be integrated, in order to linearize commit history and
2356 2822a352 2019-10-15 stsp resolve merge conflicts.
2357 4b06140e 2022-03-22 thomas If the work tree contains multiple base commits, it must first be updated
2358 2822a352 2019-10-15 stsp to a single base commit with
2359 2822a352 2019-10-15 stsp .Cm got update .
2360 2822a352 2019-10-15 stsp If changes have been staged with
2361 2822a352 2019-10-15 stsp .Cm got stage ,
2362 2822a352 2019-10-15 stsp these changes must first be committed with
2363 2822a352 2019-10-15 stsp .Cm got commit
2364 2822a352 2019-10-15 stsp or unstaged with
2365 2822a352 2019-10-15 stsp .Cm got unstage .
2366 2822a352 2019-10-15 stsp If the work tree contains local changes, these changes must first be
2367 2822a352 2019-10-15 stsp committed with
2368 2822a352 2019-10-15 stsp .Cm got commit
2369 2822a352 2019-10-15 stsp or reverted with
2370 2822a352 2019-10-15 stsp .Cm got revert .
2371 bea5ae74 2021-10-10 thomas .Tg mg
2372 ba34626b 2021-09-27 thomas .It Cm merge Oo Fl a Oc Oo Fl c Oc Oo Fl n Oc Op Ar branch
2373 d912d125 2021-11-04 thomas .Dl Pq alias: Cm mg
2374 10604dce 2021-09-24 thomas Create a merge commit based on the current branch of the work tree and
2375 10604dce 2021-09-24 thomas the specified
2376 10604dce 2021-09-24 thomas .Ar branch .
2377 10604dce 2021-09-24 thomas If a linear project history is desired, then use of
2378 10604dce 2021-09-24 thomas .Cm got rebase
2379 10604dce 2021-09-24 thomas should be preferred over
2380 10604dce 2021-09-24 thomas .Cm got merge .
2381 10604dce 2021-09-24 thomas However, even strictly linear projects may require merge commits in order
2382 768705e3 2021-09-27 thomas to merge in new versions of third-party code stored on vendor branches
2383 768705e3 2021-09-27 thomas created with
2384 768705e3 2021-09-27 thomas .Cm got import .
2385 10604dce 2021-09-24 thomas .Pp
2386 10604dce 2021-09-24 thomas Merge commits are commits based on multiple parent commits.
2387 10604dce 2021-09-24 thomas The tip commit of the work tree's current branch, which must be set with
2388 10604dce 2021-09-24 thomas .Cm got update -b
2389 10604dce 2021-09-24 thomas before starting the
2390 10604dce 2021-09-24 thomas .Cm merge
2391 10604dce 2021-09-24 thomas operation, will be used as the first parent.
2392 10604dce 2021-09-24 thomas The tip commit of the specified
2393 10604dce 2021-09-24 thomas .Ar branch
2394 10604dce 2021-09-24 thomas will be used as the second parent.
2395 10604dce 2021-09-24 thomas .Pp
2396 768705e3 2021-09-27 thomas No ancestral relationship between the two branches is required.
2397 768705e3 2021-09-27 thomas If the two branches have already been merged previously, only new changes
2398 768705e3 2021-09-27 thomas will be merged.
2399 768705e3 2021-09-27 thomas .Pp
2400 10604dce 2021-09-24 thomas It is not possible to create merge commits with more than two parents.
2401 10604dce 2021-09-24 thomas If more than one branch needs to be merged, then multiple merge commits
2402 10604dce 2021-09-24 thomas with two parents each can be created in sequence.
2403 10604dce 2021-09-24 thomas .Pp
2404 10604dce 2021-09-24 thomas While merging changes found on the
2405 10604dce 2021-09-24 thomas .Ar branch
2406 10604dce 2021-09-24 thomas into the work tree, show the status of each affected file,
2407 10604dce 2021-09-24 thomas using the following status codes:
2408 10604dce 2021-09-24 thomas .Bl -column YXZ description
2409 10604dce 2021-09-24 thomas .It G Ta file was merged
2410 10604dce 2021-09-24 thomas .It C Ta file was merged and conflicts occurred during merge
2411 10604dce 2021-09-24 thomas .It ! Ta changes destined for a missing file were not merged
2412 10604dce 2021-09-24 thomas .It D Ta file was deleted
2413 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
2414 10604dce 2021-09-24 thomas .It A Ta new file was added
2415 10604dce 2021-09-24 thomas .It \(a~ Ta changes destined for a non-regular file were not merged
2416 10604dce 2021-09-24 thomas .It ? Ta changes destined for an unversioned file were not merged
2417 10604dce 2021-09-24 thomas .El
2418 10604dce 2021-09-24 thomas .Pp
2419 10604dce 2021-09-24 thomas If merge conflicts occur, the merge operation is interrupted and conflicts
2420 10604dce 2021-09-24 thomas must be resolved before the merge operation can continue.
2421 8cf2970b 2021-09-28 thomas If any files with destined changes are found to be missing or unversioned,
2422 8cf2970b 2021-09-28 thomas or if files could not be deleted due to differences in deleted content,
2423 10604dce 2021-09-24 thomas the merge operation will be interrupted to prevent potentially incomplete
2424 10604dce 2021-09-24 thomas changes from being committed to the repository without user intervention.
2425 10604dce 2021-09-24 thomas The work tree may be modified as desired and the merge can be continued
2426 10604dce 2021-09-24 thomas once the changes present in the work tree are considered complete.
2427 10604dce 2021-09-24 thomas Alternatively, the merge operation may be aborted which will leave
2428 10604dce 2021-09-24 thomas the work tree's current branch unmodified.
2429 10604dce 2021-09-24 thomas .Pp
2430 10604dce 2021-09-24 thomas If a merge conflict is resolved in a way which renders all merged
2431 10604dce 2021-09-24 thomas changes into no-op changes, the merge operation cannot continue
2432 10604dce 2021-09-24 thomas and must be aborted.
2433 10604dce 2021-09-24 thomas .Pp
2434 10604dce 2021-09-24 thomas .Cm got merge
2435 10604dce 2021-09-24 thomas will refuse to run if certain preconditions are not met.
2436 10604dce 2021-09-24 thomas If history of the
2437 10604dce 2021-09-24 thomas .Ar branch
2438 10604dce 2021-09-24 thomas is based on the work tree's current branch, then no merge commit can
2439 10604dce 2021-09-24 thomas be created and
2440 10604dce 2021-09-24 thomas .Cm got integrate
2441 10604dce 2021-09-24 thomas may be used to integrate the
2442 10604dce 2021-09-24 thomas .Ar branch
2443 10604dce 2021-09-24 thomas instead.
2444 10604dce 2021-09-24 thomas If the work tree is not yet fully updated to the tip commit of its
2445 10604dce 2021-09-24 thomas branch, then the work tree must first be updated with
2446 10604dce 2021-09-24 thomas .Cm got update .
2447 4b06140e 2022-03-22 thomas If the work tree contains multiple base commits, it must first be updated
2448 10604dce 2021-09-24 thomas to a single base commit with
2449 10604dce 2021-09-24 thomas .Cm got update .
2450 10604dce 2021-09-24 thomas If changes have been staged with
2451 10604dce 2021-09-24 thomas .Cm got stage ,
2452 10604dce 2021-09-24 thomas these changes must first be committed with
2453 10604dce 2021-09-24 thomas .Cm got commit
2454 10604dce 2021-09-24 thomas or unstaged with
2455 10604dce 2021-09-24 thomas .Cm got unstage .
2456 10604dce 2021-09-24 thomas If the work tree contains local changes, these changes must first be
2457 10604dce 2021-09-24 thomas committed with
2458 10604dce 2021-09-24 thomas .Cm got commit
2459 10604dce 2021-09-24 thomas or reverted with
2460 10604dce 2021-09-24 thomas .Cm got revert .
2461 10604dce 2021-09-24 thomas If the
2462 10604dce 2021-09-24 thomas .Ar branch
2463 10604dce 2021-09-24 thomas contains changes to files outside of the work tree's path prefix,
2464 10604dce 2021-09-24 thomas the work tree cannot be used to merge this branch.
2465 10604dce 2021-09-24 thomas .Pp
2466 10604dce 2021-09-24 thomas The
2467 10604dce 2021-09-24 thomas .Cm got update ,
2468 10604dce 2021-09-24 thomas .Cm got commit ,
2469 10604dce 2021-09-24 thomas .Cm got rebase ,
2470 ac93b2c5 2021-10-08 thomas .Cm got histedit ,
2471 10604dce 2021-09-24 thomas .Cm got integrate ,
2472 10604dce 2021-09-24 thomas and
2473 10604dce 2021-09-24 thomas .Cm got stage
2474 10604dce 2021-09-24 thomas commands will refuse to run while a merge operation is in progress.
2475 10604dce 2021-09-24 thomas Other commands which manipulate the work tree may be used for
2476 10604dce 2021-09-24 thomas conflict resolution purposes.
2477 10604dce 2021-09-24 thomas .Pp
2478 10604dce 2021-09-24 thomas The options for
2479 10604dce 2021-09-24 thomas .Cm got merge
2480 10604dce 2021-09-24 thomas are as follows:
2481 10604dce 2021-09-24 thomas .Bl -tag -width Ds
2482 10604dce 2021-09-24 thomas .It Fl a
2483 10604dce 2021-09-24 thomas Abort an interrupted merge operation.
2484 10604dce 2021-09-24 thomas If this option is used, no other command-line arguments are allowed.
2485 10604dce 2021-09-24 thomas .It Fl c
2486 10604dce 2021-09-24 thomas Continue an interrupted merge operation.
2487 10604dce 2021-09-24 thomas If this option is used, no other command-line arguments are allowed.
2488 ba34626b 2021-09-27 thomas .It Fl n
2489 ba34626b 2021-09-27 thomas Merge changes into the work tree as usual but do not create a merge
2490 ba34626b 2021-09-27 thomas commit immediately.
2491 ba34626b 2021-09-27 thomas The merge result can be adjusted as desired before a merge commit is
2492 ba34626b 2021-09-27 thomas created with
2493 ba34626b 2021-09-27 thomas .Cm got merge -c .
2494 ba34626b 2021-09-27 thomas Alternatively, the merge may be aborted with
2495 ba34626b 2021-09-27 thomas .Cm got merge -a .
2496 10604dce 2021-09-24 thomas .El
2497 e8aa341a 2021-10-08 thomas .Tg sg
2498 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 ...
2499 d912d125 2021-11-04 thomas .Dl Pq alias: Cm sg
2500 2db2652d 2019-08-07 stsp Stage local changes for inclusion in the next commit.
2501 2db2652d 2019-08-07 stsp If no
2502 2db2652d 2019-08-07 stsp .Ar path
2503 2db2652d 2019-08-07 stsp is specified, stage all changes in the work tree.
2504 2db2652d 2019-08-07 stsp Otherwise, stage changes at or within the specified paths.
2505 4ed9f614 2019-08-04 stsp Paths may be staged if they are added, modified, or deleted according to
2506 4ed9f614 2019-08-04 stsp .Cm got status .
2507 4ed9f614 2019-08-04 stsp .Pp
2508 9d8b19a4 2019-08-04 stsp Show the status of each affected file, using the following status codes:
2509 9d8b19a4 2019-08-04 stsp .Bl -column YXZ description
2510 9d8b19a4 2019-08-04 stsp .It A Ta file addition has been staged
2511 9d8b19a4 2019-08-04 stsp .It M Ta file modification has been staged
2512 9d8b19a4 2019-08-04 stsp .It D Ta file deletion has been staged
2513 9d8b19a4 2019-08-04 stsp .El
2514 9d8b19a4 2019-08-04 stsp .Pp
2515 9d8b19a4 2019-08-04 stsp Staged file contents are saved in newly created blob objects in the repository.
2516 52c8d4ac 2019-08-04 stsp These blobs will be referred to by tree objects once staged changes have been
2517 9d8b19a4 2019-08-04 stsp committed.
2518 9d8b19a4 2019-08-04 stsp .Pp
2519 890ea719 2019-08-04 stsp Staged changes affect the behaviour of
2520 4ed9f614 2019-08-04 stsp .Cm got commit ,
2521 4ed9f614 2019-08-04 stsp .Cm got status ,
2522 4ed9f614 2019-08-04 stsp and
2523 4ed9f614 2019-08-04 stsp .Cm got diff .
2524 4ed9f614 2019-08-04 stsp While paths with staged changes exist, the
2525 4ed9f614 2019-08-04 stsp .Cm got commit
2526 4ed9f614 2019-08-04 stsp command will refuse to commit any paths which do not have staged changes.
2527 4ed9f614 2019-08-04 stsp Local changes created on top of staged changes can only be committed if
2528 4ed9f614 2019-08-04 stsp the path is staged again, or if the staged changes are committed first.
2529 4ed9f614 2019-08-04 stsp The
2530 4ed9f614 2019-08-04 stsp .Cm got status
2531 4ed9f614 2019-08-04 stsp command will show both local changes and staged changes.
2532 4ed9f614 2019-08-04 stsp The
2533 4ed9f614 2019-08-04 stsp .Cm got diff
2534 ecf14362 2019-08-04 stsp command is able to display local changes relative to staged changes,
2535 ecf14362 2019-08-04 stsp and to display staged changes relative to the repository.
2536 4ed9f614 2019-08-04 stsp The
2537 4ed9f614 2019-08-04 stsp .Cm got revert
2538 4ed9f614 2019-08-04 stsp command cannot revert staged changes but may be used to revert
2539 4f2494e6 2019-08-08 stsp local changes created on top of staged changes.
2540 4ed9f614 2019-08-04 stsp .Pp
2541 4ed9f614 2019-08-04 stsp The options for
2542 4ed9f614 2019-08-04 stsp .Cm got stage
2543 4ed9f614 2019-08-04 stsp are as follows:
2544 4ed9f614 2019-08-04 stsp .Bl -tag -width Ds
2545 4ed9f614 2019-08-04 stsp .It Fl l
2546 4ed9f614 2019-08-04 stsp Instead of staging new changes, list paths which are already staged,
2547 9d8b19a4 2019-08-04 stsp along with the IDs of staged blob objects and stage status codes.
2548 4b06140e 2022-03-22 thomas If paths were provided on the command line, show the staged paths
2549 1dd86744 2019-08-12 anthony among the specified paths.
2550 1dd86744 2019-08-12 anthony Otherwise, show all staged paths.
2551 dc424a06 2019-08-07 stsp .It Fl p
2552 dc424a06 2019-08-07 stsp Instead of staging the entire content of a changed file, interactively
2553 dc424a06 2019-08-07 stsp select or reject changes for staging based on
2554 dc424a06 2019-08-07 stsp .Dq y
2555 6d23ec10 2019-08-08 stsp (stage change),
2556 dc424a06 2019-08-07 stsp .Dq n
2557 6d23ec10 2019-08-08 stsp (reject change), and
2558 b353a198 2019-08-07 stsp .Dq q
2559 6d23ec10 2019-08-08 stsp (quit staging this file) responses.
2560 dc424a06 2019-08-07 stsp If a file is in modified status, individual patches derived from the
2561 dc424a06 2019-08-07 stsp modified file content can be staged.
2562 6d23ec10 2019-08-08 stsp Files in added or deleted status may only be staged or rejected in
2563 6d23ec10 2019-08-08 stsp their entirety.
2564 3a070a2b 2019-08-07 stsp .It Fl F Ar response-script
2565 dc424a06 2019-08-07 stsp With the
2566 dc424a06 2019-08-07 stsp .Fl p
2567 3a070a2b 2019-08-07 stsp option, read
2568 3a070a2b 2019-08-07 stsp .Dq y ,
2569 3a070a2b 2019-08-07 stsp .Dq n ,
2570 3a070a2b 2019-08-07 stsp and
2571 3a070a2b 2019-08-07 stsp .Dq q
2572 0e2f5884 2019-08-07 stsp responses line-by-line from the specified
2573 0e2f5884 2019-08-07 stsp .Ar response-script
2574 0e2f5884 2019-08-07 stsp file instead of prompting interactively.
2575 35213c7c 2020-07-23 stsp .It Fl S
2576 af358f55 2020-07-23 stsp Allow staging of symbolic links which point outside of the path space
2577 af358f55 2020-07-23 stsp that is under version control.
2578 af358f55 2020-07-23 stsp By default,
2579 af358f55 2020-07-23 stsp .Cm got stage
2580 af358f55 2020-07-23 stsp will reject such symbolic links due to safety concerns.
2581 35213c7c 2020-07-23 stsp As a precaution,
2582 35213c7c 2020-07-23 stsp .Nm
2583 af358f55 2020-07-23 stsp may decide to represent such a symbolic link as a regular file which contains
2584 af358f55 2020-07-23 stsp the link's target path, rather than creating an actual symbolic link which
2585 af358f55 2020-07-23 stsp points outside of the work tree.
2586 af358f55 2020-07-23 stsp Use of this option is discouraged because external mechanisms such as
2587 af358f55 2020-07-23 stsp .Dq make obj
2588 af358f55 2020-07-23 stsp are better suited for managing symbolic links to paths not under
2589 af358f55 2020-07-23 stsp version control.
2590 4ed9f614 2019-08-04 stsp .El
2591 4ed9f614 2019-08-04 stsp .Pp
2592 4ed9f614 2019-08-04 stsp .Cm got stage
2593 4ed9f614 2019-08-04 stsp will refuse to run if certain preconditions are not met.
2594 4ed9f614 2019-08-04 stsp If a file contains merge conflicts, these conflicts must be resolved first.
2595 4ed9f614 2019-08-04 stsp If a file is found to be out of date relative to the head commit on the
2596 4ed9f614 2019-08-04 stsp work tree's current branch, the file must be updated with
2597 4ed9f614 2019-08-04 stsp .Cm got update
2598 4ed9f614 2019-08-04 stsp before it can be staged (however, this does not prevent the file from
2599 4ed9f614 2019-08-04 stsp becoming out-of-date at some point after having been staged).
2600 4ed9f614 2019-08-04 stsp .Pp
2601 4ed9f614 2019-08-04 stsp The
2602 4ed9f614 2019-08-04 stsp .Cm got update ,
2603 4ed9f614 2019-08-04 stsp .Cm got rebase ,
2604 4ed9f614 2019-08-04 stsp and
2605 4ed9f614 2019-08-04 stsp .Cm got histedit
2606 4ed9f614 2019-08-04 stsp commands will refuse to run while staged changes exist.
2607 4ed9f614 2019-08-04 stsp If staged changes cannot be committed because a staged path
2608 4ed9f614 2019-08-04 stsp is out of date, the path must be unstaged with
2609 4ed9f614 2019-08-04 stsp .Cm got unstage
2610 4ed9f614 2019-08-04 stsp before it can be updated with
2611 4ed9f614 2019-08-04 stsp .Cm got update ,
2612 4ed9f614 2019-08-04 stsp and may then be staged again if necessary.
2613 e8aa341a 2021-10-08 thomas .Tg ug
2614 dfc23429 2019-08-11 stsp .It Cm unstage Oo Fl p Oc Oo Fl F Ar response-script Oc Op Ar path ...
2615 d912d125 2021-11-04 thomas .Dl Pq alias: Cm ug
2616 4ed9f614 2019-08-04 stsp Merge staged changes back into the work tree and put affected paths
2617 4ed9f614 2019-08-04 stsp back into non-staged status.
2618 4ed9f614 2019-08-04 stsp If no
2619 4ed9f614 2019-08-04 stsp .Ar path
2620 4ed9f614 2019-08-04 stsp is specified, unstage all staged changes across the entire work tree.
2621 2db2652d 2019-08-07 stsp Otherwise, unstage changes at or within the specified paths.
2622 4ed9f614 2019-08-04 stsp .Pp
2623 4ed9f614 2019-08-04 stsp Show the status of each affected file, using the following status codes:
2624 4ed9f614 2019-08-04 stsp .Bl -column YXZ description
2625 4ed9f614 2019-08-04 stsp .It G Ta file was unstaged
2626 4ed9f614 2019-08-04 stsp .It C Ta file was unstaged and conflicts occurred during merge
2627 4ed9f614 2019-08-04 stsp .It ! Ta changes destined for a missing file were not merged
2628 4ed9f614 2019-08-04 stsp .It D Ta file was staged as deleted and still is deleted
2629 df3d7c3e 2021-09-24 thomas .It d Ta file's deletion was prevented by local modifications
2630 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
2631 4ed9f614 2019-08-04 stsp .El
2632 2e1f37b0 2019-08-08 stsp .Pp
2633 2e1f37b0 2019-08-08 stsp The options for
2634 2e1f37b0 2019-08-08 stsp .Cm got unstage
2635 2e1f37b0 2019-08-08 stsp are as follows:
2636 2e1f37b0 2019-08-08 stsp .Bl -tag -width Ds
2637 2e1f37b0 2019-08-08 stsp .It Fl p
2638 2e1f37b0 2019-08-08 stsp Instead of unstaging the entire content of a changed file, interactively
2639 2e1f37b0 2019-08-08 stsp select or reject changes for unstaging based on
2640 2e1f37b0 2019-08-08 stsp .Dq y
2641 2e1f37b0 2019-08-08 stsp (unstage change),
2642 2e1f37b0 2019-08-08 stsp .Dq n
2643 2e1f37b0 2019-08-08 stsp (keep change staged), and
2644 2e1f37b0 2019-08-08 stsp .Dq q
2645 2e1f37b0 2019-08-08 stsp (quit unstaging this file) responses.
2646 2e1f37b0 2019-08-08 stsp If a file is staged in modified status, individual patches derived from the
2647 2e1f37b0 2019-08-08 stsp staged file content can be unstaged.
2648 2e1f37b0 2019-08-08 stsp Files staged in added or deleted status may only be unstaged in their entirety.
2649 2e1f37b0 2019-08-08 stsp .It Fl F Ar response-script
2650 2e1f37b0 2019-08-08 stsp With the
2651 2e1f37b0 2019-08-08 stsp .Fl p
2652 2e1f37b0 2019-08-08 stsp option, read
2653 2e1f37b0 2019-08-08 stsp .Dq y ,
2654 2e1f37b0 2019-08-08 stsp .Dq n ,
2655 2e1f37b0 2019-08-08 stsp and
2656 2e1f37b0 2019-08-08 stsp .Dq q
2657 2e1f37b0 2019-08-08 stsp responses line-by-line from the specified
2658 2e1f37b0 2019-08-08 stsp .Ar response-script
2659 2e1f37b0 2019-08-08 stsp file instead of prompting interactively.
2660 2e1f37b0 2019-08-08 stsp .El
2661 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 ...
2662 896e9b6f 2019-08-26 stsp Parse and print contents of objects to standard output in a line-based
2663 896e9b6f 2019-08-26 stsp text format.
2664 896e9b6f 2019-08-26 stsp Content of commit, tree, and tag objects is printed in a way similar
2665 896e9b6f 2019-08-26 stsp to the actual content stored in such objects.
2666 896e9b6f 2019-08-26 stsp Blob object contents are printed as they would appear in files on disk.
2667 896e9b6f 2019-08-26 stsp .Pp
2668 896e9b6f 2019-08-26 stsp Attempt to interpret each argument as a reference, a tag name, or
2669 896e9b6f 2019-08-26 stsp an object ID SHA1 hash.
2670 01073a5d 2019-08-22 stsp References will be resolved to an object ID.
2671 01073a5d 2019-08-22 stsp Tag names will resolved to a tag object.
2672 01073a5d 2019-08-22 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
2673 01073a5d 2019-08-22 stsp automatically, provided the abbreviation is unique.
2674 01073a5d 2019-08-22 stsp .Pp
2675 896e9b6f 2019-08-26 stsp If none of the above interpretations produce a valid result, or if the
2676 896e9b6f 2019-08-26 stsp .Fl P
2677 896e9b6f 2019-08-26 stsp option is used, attempt to interpret the argument as a path which will
2678 896e9b6f 2019-08-26 stsp be resolved to the ID of an object found at this path in the repository.
2679 896e9b6f 2019-08-26 stsp .Pp
2680 01073a5d 2019-08-22 stsp The options for
2681 01073a5d 2019-08-22 stsp .Cm got cat
2682 01073a5d 2019-08-22 stsp are as follows:
2683 01073a5d 2019-08-22 stsp .Bl -tag -width Ds
2684 896e9b6f 2019-08-26 stsp .It Fl c Ar commit
2685 896e9b6f 2019-08-26 stsp Look up paths in the specified
2686 896e9b6f 2019-08-26 stsp .Ar commit .
2687 896e9b6f 2019-08-26 stsp If this option is not used, paths are looked up in the commit resolved
2688 896e9b6f 2019-08-26 stsp via the repository's HEAD reference.
2689 896e9b6f 2019-08-26 stsp The expected argument is a commit ID SHA1 hash or an existing reference
2690 896e9b6f 2019-08-26 stsp or tag name which will be resolved to a commit ID.
2691 896e9b6f 2019-08-26 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
2692 896e9b6f 2019-08-26 stsp automatically, provided the abbreviation is unique.
2693 01073a5d 2019-08-22 stsp .It Fl r Ar repository-path
2694 01073a5d 2019-08-22 stsp Use the repository at the specified path.
2695 01073a5d 2019-08-22 stsp If not specified, assume the repository is located at or above the current
2696 01073a5d 2019-08-22 stsp working directory.
2697 01073a5d 2019-08-22 stsp If this directory is a
2698 01073a5d 2019-08-22 stsp .Nm
2699 01073a5d 2019-08-22 stsp work tree, use the repository path associated with this work tree.
2700 896e9b6f 2019-08-26 stsp .It Fl P
2701 896e9b6f 2019-08-26 stsp Interpret all arguments as paths only.
2702 896e9b6f 2019-08-26 stsp This option can be used to resolve ambiguity in cases where paths
2703 896e9b6f 2019-08-26 stsp look like tag names, reference names, or object IDs.
2704 4ed9f614 2019-08-04 stsp .El
2705 b2118c49 2020-07-28 stsp .It Cm info Op Ar path ...
2706 b2118c49 2020-07-28 stsp Display meta-data stored in a work tree.
2707 b2118c49 2020-07-28 stsp See
2708 b2118c49 2020-07-28 stsp .Xr got-worktree 5
2709 b2118c49 2020-07-28 stsp for details.
2710 b2118c49 2020-07-28 stsp .Pp
2711 b2118c49 2020-07-28 stsp The work tree to use is resolved implicitly by walking upwards from the
2712 b2118c49 2020-07-28 stsp current working directory.
2713 b2118c49 2020-07-28 stsp .Pp
2714 b2118c49 2020-07-28 stsp If one or more
2715 b2118c49 2020-07-28 stsp .Ar path
2716 b2118c49 2020-07-28 stsp arguments are specified, show additional per-file information for tracked
2717 b2118c49 2020-07-28 stsp files located at or within these paths.
2718 b2118c49 2020-07-28 stsp If a
2719 b2118c49 2020-07-28 stsp .Ar path
2720 b2118c49 2020-07-28 stsp argument corresponds to the work tree's root directory, display information
2721 b2118c49 2020-07-28 stsp for all tracked files.
2722 01073a5d 2019-08-22 stsp .El
2723 74416c47 2019-05-09 stsp .Sh ENVIRONMENT
2724 74416c47 2019-05-09 stsp .Bl -tag -width GOT_AUTHOR
2725 74416c47 2019-05-09 stsp .It Ev GOT_AUTHOR
2726 74416c47 2019-05-09 stsp The author's name and email address for
2727 21a44f98 2019-07-15 stsp .Cm got commit
2728 21a44f98 2019-07-15 stsp and
2729 21a44f98 2019-07-15 stsp .Cm got import ,
2730 74416c47 2019-05-09 stsp for example:
2731 aba9c984 2019-09-08 stsp .Dq An Flan Hacker Aq Mt flan_hacker@openbsd.org .
2732 84792843 2019-08-09 stsp Because
2733 0e444aba 2019-08-08 stsp .Xr git 1
2734 84792843 2019-08-09 stsp may fail to parse commits without an email address in author data,
2735 0e444aba 2019-08-08 stsp .Nm
2736 84792843 2019-08-09 stsp attempts to reject
2737 0e444aba 2019-08-08 stsp .Ev GOT_AUTHOR
2738 84792843 2019-08-09 stsp environment variables with a missing email address.
2739 c9956ddf 2019-09-08 stsp .Pp
2740 93a300b2 2021-08-26 stsp .Ev GOT_AUTHOR will be overridden by configuration settings in
2741 50b0790e 2020-09-11 stsp .Xr got.conf 5
2742 50b0790e 2020-09-11 stsp or by Git's
2743 aba9c984 2019-09-08 stsp .Dv user.name
2744 aba9c984 2019-09-08 stsp and
2745 709ae9eb 2019-09-08 stsp .Dv user.email
2746 709ae9eb 2019-09-08 stsp configuration settings in the repository's
2747 aba9c984 2019-09-08 stsp .Pa .git/config
2748 50b0790e 2020-09-11 stsp file.
2749 257add31 2020-09-09 stsp The
2750 c9956ddf 2019-09-08 stsp .Dv user.name
2751 c9956ddf 2019-09-08 stsp and
2752 c9956ddf 2019-09-08 stsp .Dv user.email
2753 c9956ddf 2019-09-08 stsp configuration settings contained in Git's global
2754 c9956ddf 2019-09-08 stsp .Pa ~/.gitconfig
2755 257add31 2020-09-09 stsp configuration file will only be used if neither
2756 257add31 2020-09-09 stsp .Xr got.conf 5
2757 257add31 2020-09-09 stsp nor the
2758 c9956ddf 2019-09-08 stsp .Ev GOT_AUTHOR
2759 257add31 2020-09-09 stsp environment variable provide author information.
2760 1dd86744 2019-08-12 anthony .It Ev VISUAL , EDITOR
2761 23594da9 2019-05-13 stsp The editor spawned by
2762 8e7bd50a 2019-08-22 stsp .Cm got commit ,
2763 46215d2a 2020-09-11 stsp .Cm got histedit ,
2764 8e7bd50a 2019-08-22 stsp .Cm got import ,
2765 8e7bd50a 2019-08-22 stsp or
2766 8e7bd50a 2019-08-22 stsp .Cm got tag .
2767 5b735925 2020-09-15 stsp If not set, the
2768 5b735925 2020-09-15 stsp .Xr ed 1
2769 5b735925 2020-09-15 stsp text editor will be spawned in order to give
2770 5b735925 2020-09-15 stsp .Xr ed 1
2771 5b735925 2020-09-15 stsp the attention it deserves.
2772 b1ebc001 2019-08-13 stsp .It Ev GOT_LOG_DEFAULT_LIMIT
2773 b1ebc001 2019-08-13 stsp The default limit on the number of commits traversed by
2774 b1ebc001 2019-08-13 stsp .Cm got log .
2775 b1ebc001 2019-08-13 stsp If set to zero, the limit is unbounded.
2776 b1ebc001 2019-08-13 stsp This variable will be silently ignored if it is set to a non-numeric value.
2777 74416c47 2019-05-09 stsp .El
2778 257add31 2020-09-09 stsp .Sh FILES
2779 257add31 2020-09-09 stsp .Bl -tag -width packed-refs -compact
2780 257add31 2020-09-09 stsp .It Pa got.conf
2781 257add31 2020-09-09 stsp Repository-wide configuration settings for
2782 257add31 2020-09-09 stsp .Nm .
2783 50b0790e 2020-09-11 stsp If present, a
2784 50b0790e 2020-09-11 stsp .Xr got.conf 5
2785 50b0790e 2020-09-11 stsp configuration file located in the root directory of a Git repository
2786 50b0790e 2020-09-11 stsp supersedes any relevant settings in Git's
2787 257add31 2020-09-09 stsp .Pa config
2788 257add31 2020-09-09 stsp file.
2789 50b0790e 2020-09-11 stsp .Pp
2790 50b0790e 2020-09-11 stsp .It Pa .got/got.conf
2791 50b0790e 2020-09-11 stsp Worktree-specific configuration settings for
2792 50b0790e 2020-09-11 stsp .Nm .
2793 50b0790e 2020-09-11 stsp If present, a
2794 1795b260 2021-04-02 kn .Xr got.conf 5
2795 50b0790e 2020-09-11 stsp configuration file in the
2796 50b0790e 2020-09-11 stsp .Pa .got
2797 50b0790e 2020-09-11 stsp meta-data directory of a work tree supersedes any relevant settings in
2798 50b0790e 2020-09-11 stsp the repository's
2799 50b0790e 2020-09-11 stsp .Xr got.conf 5
2800 50b0790e 2020-09-11 stsp configuration file and Git's
2801 50b0790e 2020-09-11 stsp .Pa config
2802 50b0790e 2020-09-11 stsp file.
2803 257add31 2020-09-09 stsp .El
2804 5c860e29 2018-03-12 stsp .Sh EXIT STATUS
2805 5c860e29 2018-03-12 stsp .Ex -std got
2806 97925469 2018-03-17 stsp .Sh EXAMPLES
2807 43e4eb1b 2021-08-29 stsp Enable tab-completion of
2808 43e4eb1b 2021-08-29 stsp .Nm
2809 43e4eb1b 2021-08-29 stsp command names in
2810 43e4eb1b 2021-08-29 stsp .Xr ksh 1 :
2811 43e4eb1b 2021-08-29 stsp .Pp
2812 e1d27370 2021-09-01 stsp .Dl $ set -A complete_got_1 -- $(got -h 2>&1 | sed -n s/commands://p)
2813 43e4eb1b 2021-08-29 stsp .Pp
2814 fa6e0e48 2019-05-23 stsp Clone an existing Git repository for use with
2815 fa6e0e48 2019-05-23 stsp .Nm .
2816 fd039d72 2020-03-18 stsp .Pp
2817 fd039d72 2020-03-18 stsp .Dl $ cd /var/git/
2818 fd039d72 2020-03-18 stsp .Dl $ got clone ssh://git@github.com/openbsd/src.git
2819 fd039d72 2020-03-18 stsp .Pp
2820 fd039d72 2020-03-18 stsp Use of HTTP URLs currently requires
2821 fa6e0e48 2019-05-23 stsp .Xr git 1 :
2822 d83d9d5c 2019-05-13 stsp .Pp
2823 fa6e0e48 2019-05-23 stsp .Dl $ cd /var/git/
2824 fa6e0e48 2019-05-23 stsp .Dl $ git clone --bare https://github.com/openbsd/src.git
2825 fa6e0e48 2019-05-23 stsp .Pp
2826 3ce1b845 2019-07-15 stsp Alternatively, for quick and dirty local testing of
2827 3ce1b845 2019-07-15 stsp .Nm
2828 3ce1b845 2019-07-15 stsp a new Git repository could be created and populated with files,
2829 3ce1b845 2019-07-15 stsp e.g. from a temporary CVS checkout located at
2830 3ce1b845 2019-07-15 stsp .Pa /tmp/src :
2831 fa6e0e48 2019-05-23 stsp .Pp
2832 27b10c3c 2022-07-04 thomas .Dl $ gotadmin init /var/git/src.git
2833 2930ef13 2019-07-15 stsp .Dl $ got import -r /var/git/src.git -I CVS -I obj /tmp/src
2834 3ce1b845 2019-07-15 stsp .Pp
2835 3ce1b845 2019-07-15 stsp Check out a work tree from the Git repository to /usr/src:
2836 3ce1b845 2019-07-15 stsp .Pp
2837 fa6e0e48 2019-05-23 stsp .Dl $ got checkout /var/git/src.git /usr/src
2838 fa6e0e48 2019-05-23 stsp .Pp
2839 e70c17ce 2019-05-22 stsp View local changes in a work tree directory:
2840 e70c17ce 2019-05-22 stsp .Pp
2841 e70c17ce 2019-05-22 stsp .Dl $ got diff | less
2842 33aa809d 2019-08-08 stsp .Pp
2843 081470ac 2020-08-13 stsp In a work tree, display files in a potentially problematic state:
2844 081470ac 2020-08-13 stsp .Pp
2845 081470ac 2020-08-13 stsp .Dl $ got status -s 'C!~?'
2846 081470ac 2020-08-13 stsp .Pp
2847 33aa809d 2019-08-08 stsp Interactively revert selected local changes in a work tree directory:
2848 e70c17ce 2019-05-22 stsp .Pp
2849 33aa809d 2019-08-08 stsp .Dl $ got revert -p -R\ .
2850 33aa809d 2019-08-08 stsp .Pp
2851 e70c17ce 2019-05-22 stsp In a work tree or a git repository directory, list all branch references:
2852 e70c17ce 2019-05-22 stsp .Pp
2853 4e759de4 2019-06-26 stsp .Dl $ got branch -l
2854 e70c17ce 2019-05-22 stsp .Pp
2855 fa6e0e48 2019-05-23 stsp In a work tree or a git repository directory, create a new branch called
2856 e70c17ce 2019-05-22 stsp .Dq unified-buffer-cache
2857 d83d9d5c 2019-05-13 stsp which is forked off the
2858 d83d9d5c 2019-05-13 stsp .Dq master
2859 d83d9d5c 2019-05-13 stsp branch:
2860 d83d9d5c 2019-05-13 stsp .Pp
2861 7b4f1fcb 2021-01-27 stsp .Dl $ got branch -c master unified-buffer-cache
2862 e70c17ce 2019-05-22 stsp .Pp
2863 e70c17ce 2019-05-22 stsp Switch an existing work tree to the branch
2864 e70c17ce 2019-05-22 stsp .Dq unified-buffer-cache .
2865 e70c17ce 2019-05-22 stsp Local changes in the work tree will be preserved and merged if necessary:
2866 e70c17ce 2019-05-22 stsp .Pp
2867 e70c17ce 2019-05-22 stsp .Dl $ got update -b unified-buffer-cache
2868 e70c17ce 2019-05-22 stsp .Pp
2869 fa6e0e48 2019-05-23 stsp Create a new commit from local changes in a work tree directory.
2870 fa6e0e48 2019-05-23 stsp This new commit will become the head commit of the work tree's current branch:
2871 fa6e0e48 2019-05-23 stsp .Pp
2872 fa6e0e48 2019-05-23 stsp .Dl $ got commit
2873 fa6e0e48 2019-05-23 stsp .Pp
2874 fa6e0e48 2019-05-23 stsp In a work tree or a git repository directory, view changes committed in
2875 fa6e0e48 2019-05-23 stsp the 3 most recent commits to the work tree's branch, or the branch resolved
2876 fa6e0e48 2019-05-23 stsp via the repository's HEAD reference, respectively:
2877 fa6e0e48 2019-05-23 stsp .Pp
2878 48c8c60d 2020-01-27 stsp .Dl $ got log -p -l 3
2879 04e9dcf3 2020-04-18 stsp .Pp
2880 3d0ac559 2020-04-18 stsp As above, but display changes in the order in which
2881 04e9dcf3 2020-04-18 stsp .Xr patch 1
2882 04e9dcf3 2020-04-18 stsp could apply them in sequence:
2883 5b666081 2020-02-24 stsp .Pp
2884 04e9dcf3 2020-04-18 stsp .Dl $ got log -p -l 3 -R
2885 04e9dcf3 2020-04-18 stsp .Pp
2886 5b666081 2020-02-24 stsp In a work tree or a git repository directory, log the history of a subdirectory:
2887 5b666081 2020-02-24 stsp .Pp
2888 5b666081 2020-02-24 stsp .Dl $ got log sys/uvm
2889 5b666081 2020-02-24 stsp .Pp
2890 5b666081 2020-02-24 stsp While operating inside a work tree, paths are specified relative to the current
2891 5b666081 2020-02-24 stsp working directory, so this command will log the subdirectory
2892 5b666081 2020-02-24 stsp .Pa sys/uvm :
2893 fa6e0e48 2019-05-23 stsp .Pp
2894 cf07f22b 2020-07-25 stsp .Dl $ cd sys/uvm && got log\ .
2895 5b666081 2020-02-24 stsp .Pp
2896 5b666081 2020-02-24 stsp And this command has the same effect:
2897 5b666081 2020-02-24 stsp .Pp
2898 5b666081 2020-02-24 stsp .Dl $ cd sys/dev/usb && got log ../../uvm
2899 5b666081 2020-02-24 stsp .Pp
2900 b2118c49 2020-07-28 stsp And this command displays work tree meta-data about all tracked files:
2901 b2118c49 2020-07-28 stsp .Pp
2902 b2118c49 2020-07-28 stsp .Dl $ cd /usr/src
2903 b2118c49 2020-07-28 stsp .Dl $ got info\ . | less
2904 b2118c49 2020-07-28 stsp .Pp
2905 e70c17ce 2019-05-22 stsp Add new files and remove obsolete files in a work tree directory:
2906 e70c17ce 2019-05-22 stsp .Pp
2907 fa6e0e48 2019-05-23 stsp .Dl $ got add sys/uvm/uvm_ubc.c
2908 86d25a1b 2019-07-11 stsp .Dl $ got remove sys/uvm/uvm_vnode.c
2909 e70c17ce 2019-05-22 stsp .Pp
2910 e70c17ce 2019-05-22 stsp Create a new commit from local changes in a work tree directory
2911 e70c17ce 2019-05-22 stsp with a pre-defined log message.
2912 e70c17ce 2019-05-22 stsp .Pp
2913 e70c17ce 2019-05-22 stsp .Dl $ got commit -m 'unify the buffer cache'
2914 95fc3404 2019-07-15 stsp .Pp
2915 bcbc2272 2020-05-20 stsp Alternatively, create a new commit from local changes in a work tree
2916 bcbc2272 2020-05-20 stsp directory with a log message that has been prepared in the file
2917 1795b260 2021-04-02 kn .Pa /tmp/msg :
2918 bcbc2272 2020-05-20 stsp .Pp
2919 28cf319f 2021-01-28 stsp .Dl $ got commit -F /tmp/msg
2920 bcbc2272 2020-05-20 stsp .Pp
2921 95fc3404 2019-07-15 stsp Update any work tree checked out from the
2922 95fc3404 2019-07-15 stsp .Dq unified-buffer-cache
2923 95fc3404 2019-07-15 stsp branch to the latest commit on this branch:
2924 95fc3404 2019-07-15 stsp .Pp
2925 95fc3404 2019-07-15 stsp .Dl $ got update
2926 ac90e726 2019-07-15 stsp .Pp
2927 c991308a 2019-07-15 stsp Roll file content on the unified-buffer-cache branch back by one commit,
2928 c991308a 2019-07-15 stsp and then fetch the rolled-back change into the work tree as a local change
2929 ac90e726 2019-07-15 stsp to be amended and perhaps committed again:
2930 e70c17ce 2019-05-22 stsp .Pp
2931 ac90e726 2019-07-15 stsp .Dl $ got backout unified-buffer-cache
2932 ac90e726 2019-07-15 stsp .Dl $ got commit -m 'roll back previous'
2933 59d52b88 2019-07-15 stsp .Dl $ # now back out the previous backout :-)
2934 ac90e726 2019-07-15 stsp .Dl $ got backout unified-buffer-cache
2935 ac90e726 2019-07-15 stsp .Pp
2936 a099809f 2021-08-27 stsp Fetch new changes on the remote repository's
2937 a099809f 2021-08-27 stsp .Dq master
2938 a099809f 2021-08-27 stsp branch, making them visible on the local repository's
2939 469dd726 2020-03-20 stsp .Dq origin/master
2940 469dd726 2020-03-20 stsp branch:
2941 fa6e0e48 2019-05-23 stsp .Pp
2942 469dd726 2020-03-20 stsp .Dl $ cd /usr/src
2943 469dd726 2020-03-20 stsp .Dl $ got fetch
2944 469dd726 2020-03-20 stsp .Pp
2945 469dd726 2020-03-20 stsp In a repository created with a HTTP URL and
2946 469dd726 2020-03-20 stsp .Cm git clone --bare
2947 469dd726 2020-03-20 stsp the
2948 469dd726 2020-03-20 stsp .Xr git-fetch 1
2949 469dd726 2020-03-20 stsp command must be used instead:
2950 469dd726 2020-03-20 stsp .Pp
2951 fa6e0e48 2019-05-23 stsp .Dl $ cd /var/git/src.git
2952 469dd726 2020-03-20 stsp .Dl $ git fetch origin master:refs/remotes/origin/master
2953 fa6e0e48 2019-05-23 stsp .Pp
2954 469dd726 2020-03-20 stsp Rebase the local
2955 469dd726 2020-03-20 stsp .Dq master
2956 469dd726 2020-03-20 stsp branch to merge the new changes that are now visible on the
2957 469dd726 2020-03-20 stsp .Dq origin/master
2958 469dd726 2020-03-20 stsp branch:
2959 469dd726 2020-03-20 stsp .Pp
2960 469dd726 2020-03-20 stsp .Dl $ cd /usr/src
2961 469dd726 2020-03-20 stsp .Dl $ got update -b origin/master
2962 469dd726 2020-03-20 stsp .Dl $ got rebase master
2963 469dd726 2020-03-20 stsp .Pp
2964 fa6e0e48 2019-05-23 stsp Rebase the
2965 fa6e0e48 2019-05-23 stsp .Dq unified-buffer-cache
2966 fa6e0e48 2019-05-23 stsp branch on top of the new head commit of the
2967 fa6e0e48 2019-05-23 stsp .Dq master
2968 fa6e0e48 2019-05-23 stsp branch.
2969 fa6e0e48 2019-05-23 stsp .Pp
2970 818c7501 2019-07-11 stsp .Dl $ got update -b master
2971 818c7501 2019-07-11 stsp .Dl $ got rebase unified-buffer-cache
2972 7d7ffedb 2019-07-14 stsp .Pp
2973 7d7ffedb 2019-07-14 stsp Create a patch from all changes on the unified-buffer-cache branch.
2974 1dd86744 2019-08-12 anthony The patch can be mailed out for review and applied to
2975 1dd86744 2019-08-12 anthony .Ox Ns 's
2976 1dd86744 2019-08-12 anthony CVS tree:
2977 7d7ffedb 2019-07-14 stsp .Pp
2978 7d7ffedb 2019-07-14 stsp .Dl $ got diff master unified-buffer-cache > /tmp/ubc.diff
2979 7d7ffedb 2019-07-14 stsp .Pp
2980 0ebf8283 2019-07-24 stsp Edit the entire commit history of the
2981 0ebf8283 2019-07-24 stsp .Dq unified-buffer-cache
2982 0ebf8283 2019-07-24 stsp branch:
2983 0ebf8283 2019-07-24 stsp .Pp
2984 0ebf8283 2019-07-24 stsp .Dl $ got update -b unified-buffer-cache
2985 0ebf8283 2019-07-24 stsp .Dl $ got update -c master
2986 0ebf8283 2019-07-24 stsp .Dl $ got histedit
2987 469dd726 2020-03-20 stsp .Pp
2988 ff2cf171 2019-07-28 stsp Before working against existing branches in a repository cloned with
2989 469dd726 2020-03-20 stsp .Cm git clone --bare
2990 7848a0e1 2020-03-19 stsp instead of
2991 7848a0e1 2020-03-19 stsp .Cm got clone ,
2992 ff2cf171 2019-07-28 stsp a Git
2993 ff2cf171 2019-07-28 stsp .Dq refspec
2994 ff2cf171 2019-07-28 stsp must be configured to map all references in the remote repository
2995 ff2cf171 2019-07-28 stsp into the
2996 ff2cf171 2019-07-28 stsp .Dq refs/remotes
2997 ff2cf171 2019-07-28 stsp namespace of the local repository.
2998 1795b260 2021-04-02 kn This can be achieved by setting Git's
2999 ff2cf171 2019-07-28 stsp .Pa remote.origin.fetch
3000 ff2cf171 2019-07-28 stsp configuration variable to the value
3001 ff2cf171 2019-07-28 stsp .Dq +refs/heads/*:refs/remotes/origin/*
3002 ff2cf171 2019-07-28 stsp with the
3003 ff2cf171 2019-07-28 stsp .Cm git config
3004 ff2cf171 2019-07-28 stsp command:
3005 ff2cf171 2019-07-28 stsp .Pp
3006 ff2cf171 2019-07-28 stsp .Dl $ cd /var/git/repo
3007 ff2cf171 2019-07-28 stsp .Dl $ git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
3008 eac81709 2020-03-21 stsp .Pp
3009 469dd726 2020-03-20 stsp Additionally, the
3010 469dd726 2020-03-20 stsp .Dq mirror
3011 469dd726 2020-03-20 stsp option must be disabled:
3012 ff2cf171 2019-07-28 stsp .Pp
3013 469dd726 2020-03-20 stsp .Dl $ cd /var/git/repo
3014 469dd726 2020-03-20 stsp .Dl $ git config remote.origin.mirror false
3015 469dd726 2020-03-20 stsp .Pp
3016 ff2cf171 2019-07-28 stsp Alternatively, the following
3017 469dd726 2020-03-20 stsp .Xr git-fetch 1
3018 ff2cf171 2019-07-28 stsp configuration item can be added manually to the Git repository's
3019 ff2cf171 2019-07-28 stsp .Pa config
3020 ff2cf171 2019-07-28 stsp file:
3021 0ebf8283 2019-07-24 stsp .Pp
3022 91c82228 2021-04-18 stsp .Dl [remote \&"origin\&"]
3023 ff2cf171 2019-07-28 stsp .Dl url = ...
3024 ff2cf171 2019-07-28 stsp .Dl fetch = +refs/heads/*:refs/remotes/origin/*
3025 469dd726 2020-03-20 stsp .Dl mirror = false
3026 ff2cf171 2019-07-28 stsp .Pp
3027 fe307c9b 2019-07-28 stsp This configuration leaves the local repository's
3028 ff2cf171 2019-07-28 stsp .Dq refs/heads
3029 ff2cf171 2019-07-28 stsp namespace free for use by local branches checked out with
3030 ff2cf171 2019-07-28 stsp .Cm got checkout
3031 ff2cf171 2019-07-28 stsp and, if needed, created with
3032 ff2cf171 2019-07-28 stsp .Cm got branch .
3033 ff2cf171 2019-07-28 stsp Branches in the
3034 a099809f 2021-08-27 stsp .Dq refs/remotes/origin
3035 469dd726 2020-03-20 stsp namespace can now be updated with incoming changes from the remote
3036 ff2cf171 2019-07-28 stsp repository with
3037 469dd726 2020-03-20 stsp .Cm got fetch
3038 469dd726 2020-03-20 stsp or
3039 469dd726 2020-03-20 stsp .Xr git-fetch 1
3040 a099809f 2021-08-27 stsp without extra command line arguments.
3041 a099809f 2021-08-27 stsp Newly fetched changes can be examined with
3042 a099809f 2021-08-27 stsp .Cm got log .
3043 ff2cf171 2019-07-28 stsp .Pp
3044 a099809f 2021-08-27 stsp Display changes on the remote repository's version of the
3045 ff2cf171 2019-07-28 stsp .Dq master
3046 a099809f 2021-08-27 stsp branch, as of the last time
3047 a099809f 2021-08-27 stsp .Cm got fetch
3048 a099809f 2021-08-27 stsp was run:
3049 a099809f 2021-08-27 stsp .Pp
3050 a099809f 2021-08-27 stsp .Dl $ got log -c origin/master | less
3051 a099809f 2021-08-27 stsp .Pp
3052 a099809f 2021-08-27 stsp As shown here, most commands accept abbreviated reference names such as
3053 ff2cf171 2019-07-28 stsp .Dq origin/master
3054 a099809f 2021-08-27 stsp instead of
3055 a099809f 2021-08-27 stsp .Dq refs/remotes/origin/master .
3056 a099809f 2021-08-27 stsp The latter is only needed in case of ambiguity.
3057 a099809f 2021-08-27 stsp .Pp
3058 a099809f 2021-08-27 stsp .Cm got rebase
3059 a099809f 2021-08-27 stsp must be used to merge changes which are visible on the
3060 a099809f 2021-08-27 stsp .Dq origin/master
3061 a099809f 2021-08-27 stsp branch into the
3062 a099809f 2021-08-27 stsp .Dq master
3063 7b0db533 2020-02-04 stsp branch.
3064 7b0db533 2020-02-04 stsp This will also merge local changes, if any, with the incoming changes:
3065 ff2cf171 2019-07-28 stsp .Pp
3066 ff2cf171 2019-07-28 stsp .Dl $ got update -b origin/master
3067 ff2cf171 2019-07-28 stsp .Dl $ got rebase master
3068 083957f4 2020-02-24 stsp .Pp
3069 a099809f 2021-08-27 stsp In order to make changes committed to the
3070 a099809f 2021-08-27 stsp .Dq unified-buffer-cache
3071 a099809f 2021-08-27 stsp visible on the
3072 a099809f 2021-08-27 stsp .Dq master
3073 a099809f 2021-08-27 stsp branch, the
3074 a099809f 2021-08-27 stsp .Dq unified-buffer-cache
3075 a099809f 2021-08-27 stsp branch must first be rebased onto the
3076 a099809f 2021-08-27 stsp .Dq master
3077 a099809f 2021-08-27 stsp branch:
3078 a099809f 2021-08-27 stsp .Pp
3079 a099809f 2021-08-27 stsp .Dl $ got update -b master
3080 a099809f 2021-08-27 stsp .Dl $ got rebase unified-buffer-cache
3081 a099809f 2021-08-27 stsp .Pp
3082 a099809f 2021-08-27 stsp Changes on the
3083 a099809f 2021-08-27 stsp .Dq unified-buffer-cache
3084 a099809f 2021-08-27 stsp branch can now be made visible on the
3085 a099809f 2021-08-27 stsp .Dq master
3086 a099809f 2021-08-27 stsp branch with
3087 a099809f 2021-08-27 stsp .Cm got integrate .
3088 a099809f 2021-08-27 stsp Because the rebase operation switched the work tree to the
3089 a099809f 2021-08-27 stsp .Dq unified-buffer-cache
3090 4b06140e 2022-03-22 thomas branch, the work tree must be switched back to the
3091 a099809f 2021-08-27 stsp .Dq master
3092 a099809f 2021-08-27 stsp branch first:
3093 a099809f 2021-08-27 stsp .Pp
3094 a099809f 2021-08-27 stsp .Dl $ got update -b master
3095 a099809f 2021-08-27 stsp .Dl $ got integrate unified-buffer-cache
3096 a099809f 2021-08-27 stsp .Pp
3097 083957f4 2020-02-24 stsp On the
3098 083957f4 2020-02-24 stsp .Dq master
3099 083957f4 2020-02-24 stsp branch, log messages for local changes can now be amended with
3100 083957f4 2020-02-24 stsp .Dq OK
3101 083957f4 2020-02-24 stsp by other developers and any other important new information:
3102 ff2cf171 2019-07-28 stsp .Pp
3103 083957f4 2020-02-24 stsp .Dl $ got update -c origin/master
3104 083957f4 2020-02-24 stsp .Dl $ got histedit -m
3105 083957f4 2020-02-24 stsp .Pp
3106 4b06140e 2022-03-22 thomas If the remote repository offers write access, local changes on the
3107 ff2cf171 2019-07-28 stsp .Dq master
3108 a099809f 2021-08-27 stsp branch can be sent to the remote repository with
3109 ac93b2c5 2021-10-08 thomas .Cm got send .
3110 ac93b2c5 2021-10-08 thomas Usually,
3111 a099809f 2021-08-27 stsp .Cm got send
3112 a099809f 2021-08-27 stsp can be run without further arguments.
3113 a099809f 2021-08-27 stsp The arguments shown here match defaults, provided the work tree's
3114 a099809f 2021-08-27 stsp current branch is the
3115 a099809f 2021-08-27 stsp .Dq master
3116 a099809f 2021-08-27 stsp branch:
3117 ff2cf171 2019-07-28 stsp .Pp
3118 a099809f 2021-08-27 stsp .Dl $ got send -b master origin
3119 a099809f 2021-08-27 stsp .Pp
3120 4b06140e 2022-03-22 thomas If the remote repository requires the HTTPS protocol, the
3121 a099809f 2021-08-27 stsp .Xr git-push 1
3122 a099809f 2021-08-27 stsp command must be used instead:
3123 a099809f 2021-08-27 stsp .Pp
3124 a099809f 2021-08-27 stsp .Dl $ cd /var/git/src.git
3125 ff2cf171 2019-07-28 stsp .Dl $ git push origin master
3126 4ff74dcf 2022-07-20 thomas .Pp
3127 4ff74dcf 2022-07-20 thomas When making contributions to projects which use the
3128 4ff74dcf 2022-07-20 thomas .Dq pull request
3129 4ff74dcf 2022-07-20 thomas workflow, SSH protocol repository access needs to be set up first.
3130 4ff74dcf 2022-07-20 thomas Once an account has been created on a Git hosting site it should
3131 4ff74dcf 2022-07-20 thomas be possible to upload a public SSH key for repository access
3132 4ff74dcf 2022-07-20 thomas authentication.
3133 4ff74dcf 2022-07-20 thomas .Pp
3134 4ff74dcf 2022-07-20 thomas The
3135 4ff74dcf 2022-07-20 thomas .Dq pull request
3136 4ff74dcf 2022-07-20 thomas workflow will usually involve two remote repositories.
3137 4ff74dcf 2022-07-20 thomas In the real-life example below, the
3138 4ff74dcf 2022-07-20 thomas .Dq origin
3139 4ff74dcf 2022-07-20 thomas repository was forked from the
3140 4ff74dcf 2022-07-20 thomas .Dq upstream
3141 4ff74dcf 2022-07-20 thomas repository by using the Git hosting site's web interface.
3142 4ff74dcf 2022-07-20 thomas The
3143 4ff74dcf 2022-07-20 thomas .Xr got.conf 5
3144 4ff74dcf 2022-07-20 thomas file in the local repository describes both remote repositories:
3145 4ff74dcf 2022-07-20 thomas .Bd -literal -offset indent
3146 4ff74dcf 2022-07-20 thomas # Jelmers's repository, which accepts pull requests
3147 4ff74dcf 2022-07-20 thomas remote "upstream" {
3148 4ff74dcf 2022-07-20 thomas server git@github.com
3149 4ff74dcf 2022-07-20 thomas protocol ssh
3150 4ff74dcf 2022-07-20 thomas repository "/jelmer/dulwich"
3151 4ff74dcf 2022-07-20 thomas branch { "master" }
3152 4ff74dcf 2022-07-20 thomas }
3153 4ff74dcf 2022-07-20 thomas
3154 4ff74dcf 2022-07-20 thomas # Stefan's fork, used as the default remote repository
3155 4ff74dcf 2022-07-20 thomas remote "origin" {
3156 4ff74dcf 2022-07-20 thomas server git@github.com
3157 4ff74dcf 2022-07-20 thomas protocol ssh
3158 4ff74dcf 2022-07-20 thomas repository "/stspdotname/dulwich"
3159 4ff74dcf 2022-07-20 thomas branch { "master" }
3160 4ff74dcf 2022-07-20 thomas }
3161 4ff74dcf 2022-07-20 thomas .Ed
3162 4ff74dcf 2022-07-20 thomas .Pp
3163 4ff74dcf 2022-07-20 thomas With this configuration, Stefan can create commits on
3164 4ff74dcf 2022-07-20 thomas .Dq refs/heads/master
3165 4ff74dcf 2022-07-20 thomas and send them to the
3166 4ff74dcf 2022-07-20 thomas .Dq origin
3167 4ff74dcf 2022-07-20 thomas repository by running:
3168 4ff74dcf 2022-07-20 thomas .Pp
3169 4ff74dcf 2022-07-20 thomas .Dl $ got send -b master origin
3170 4ff74dcf 2022-07-20 thomas .Pp
3171 4ff74dcf 2022-07-20 thomas The changes can now be proposed to Jelmer by opening a pull request
3172 4ff74dcf 2022-07-20 thomas via the Git hosting site's web interface.
3173 4ff74dcf 2022-07-20 thomas If Jelmer requests further changes to be made, additional commits
3174 4ff74dcf 2022-07-20 thomas can be created on the
3175 4ff74dcf 2022-07-20 thomas .Dq master
3176 4ff74dcf 2022-07-20 thomas branch and be added to the pull request by running
3177 4ff74dcf 2022-07-20 thomas .Cd got send
3178 4ff74dcf 2022-07-20 thomas again.
3179 4ff74dcf 2022-07-20 thomas .Pp
3180 4ff74dcf 2022-07-20 thomas If Jelmer prefers additional commits to be
3181 4ff74dcf 2022-07-20 thomas .Dq squashed
3182 4ff74dcf 2022-07-20 thomas then the following commands can be used to achieve this:
3183 4ff74dcf 2022-07-20 thomas .Pp
3184 4ff74dcf 2022-07-20 thomas .Dl $ got update -b master
3185 4ff74dcf 2022-07-20 thomas .Dl $ got update -c origin/master
3186 4ff74dcf 2022-07-20 thomas .Dl $ got histedit -f
3187 4ff74dcf 2022-07-20 thomas .Dl $ got send -f -b master origin
3188 4ff74dcf 2022-07-20 thomas .Pp
3189 4ff74dcf 2022-07-20 thomas Once Jelmer has accepted the pull request, Stefan can fetch the
3190 4ff74dcf 2022-07-20 thomas merged changes, and possibly several other new changes, by running:
3191 4ff74dcf 2022-07-20 thomas .Pp
3192 4ff74dcf 2022-07-20 thomas .Dl $ got fetch upstream
3193 4ff74dcf 2022-07-20 thomas .Pp
3194 4ff74dcf 2022-07-20 thomas The merged changes will now be visible under the reference
3195 4ff74dcf 2022-07-20 thomas .Dq refs/remotes/upstream/master .
3196 4ff74dcf 2022-07-20 thomas The local
3197 4ff74dcf 2022-07-20 thomas .Dq master
3198 4ff74dcf 2022-07-20 thomas branch can now be rebased on top of the latest changes
3199 4ff74dcf 2022-07-20 thomas from upstream:
3200 4ff74dcf 2022-07-20 thomas .Pp
3201 4ff74dcf 2022-07-20 thomas .Dl $ got update -b upstream/master
3202 4ff74dcf 2022-07-20 thomas .Dl $ got rebase master
3203 4ff74dcf 2022-07-20 thomas .Pp
3204 4ff74dcf 2022-07-20 thomas As a final step, the forked repository's copy of the master branch needs
3205 4ff74dcf 2022-07-20 thomas to be kept in sync by sending the new changes there:
3206 4ff74dcf 2022-07-20 thomas .Pp
3207 4ff74dcf 2022-07-20 thomas .Dl $ got send -f -b master origin
3208 4ff74dcf 2022-07-20 thomas .Pp
3209 4ff74dcf 2022-07-20 thomas If multiple pull requests need to be managed in parallel, a separate branch
3210 4ff74dcf 2022-07-20 thomas must be created for each pull request with
3211 4ff74dcf 2022-07-20 thomas .Cm got branch .
3212 4ff74dcf 2022-07-20 thomas Each such branch can then be used as above, in place of
3213 4ff74dcf 2022-07-20 thomas .Dq refs/heads/master .
3214 4ff74dcf 2022-07-20 thomas Changes for any accepted pull requests will still appear under
3215 4ff74dcf 2022-07-20 thomas .Dq refs/remotes/upstream/master,
3216 4ff74dcf 2022-07-20 thomas regardless of which branch was used in the forked repository to
3217 4ff74dcf 2022-07-20 thomas create a pull request.
3218 5c860e29 2018-03-12 stsp .Sh SEE ALSO
3219 0a79feb1 2021-04-10 stsp .Xr gotadmin 1 ,
3220 2312fc47 2019-07-15 stsp .Xr tog 1 ,
3221 2312fc47 2019-07-15 stsp .Xr git-repository 5 ,
3222 257add31 2020-09-09 stsp .Xr got-worktree 5 ,
3223 b345cf8f 2022-07-05 thomas .Xr got.conf 5 ,
3224 b345cf8f 2022-07-05 thomas .Xr gotweb 8
3225 1a208aaf 2018-04-01 stsp .Sh AUTHORS
3226 60c73080 2022-07-05 thomas .An Anthony J. Bentley Aq Mt bentley@openbsd.org
3227 60c73080 2022-07-05 thomas .An Christian Weisgerber Aq Mt naddy@openbsd.org
3228 60c73080 2022-07-05 thomas .An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org
3229 60c73080 2022-07-05 thomas .An Josh Rickmar Aq Mt jrick@zettaport.com
3230 bc3056e3 2019-08-18 stsp .An Joshua Stein Aq Mt jcs@openbsd.org
3231 60c73080 2022-07-05 thomas .An Klemens Nanni Aq Mt kn@openbsd.org
3232 60c73080 2022-07-05 thomas .An Martin Pieuchot Aq Mt mpi@openbsd.org
3233 f6fad9f6 2022-07-05 thomas .An Neels Hofmeyr Aq Mt neels@hofmeyr.de
3234 60c73080 2022-07-05 thomas .An Omar Polo Aq Mt op@openbsd.org
3235 83b416ed 2020-03-18 stsp .An Ori Bernstein Aq Mt ori@openbsd.org
3236 60c73080 2022-07-05 thomas .An Sebastien Marie Aq Mt semarie@openbsd.org
3237 60c73080 2022-07-05 thomas .An Stefan Sperling Aq Mt stsp@openbsd.org
3238 bee5044f 2022-07-05 thomas .An Steven McDonald Aq Mt steven@steven-mcdonald.id.au
3239 60c73080 2022-07-05 thomas .An Theo Buehler Aq Mt tb@openbsd.org
3240 60c73080 2022-07-05 thomas .An Thomas Adam Aq Mt thomas@xteddy.org
3241 60c73080 2022-07-05 thomas .An Tracey Emery Aq Mt tracey@traceyemery.net
3242 60c73080 2022-07-05 thomas .An Yang Zhong Aq Mt yzhong@freebsdfoundation.org
3243 de71b616 2022-07-05 thomas .Pp
3244 de71b616 2022-07-05 thomas Parts of
3245 de71b616 2022-07-05 thomas .Nm ,
3246 de71b616 2022-07-05 thomas .Xr tog 1 ,
3247 de71b616 2022-07-05 thomas and
3248 de71b616 2022-07-05 thomas .Xr gotweb 8
3249 de71b616 2022-07-05 thomas were derived from code under copyright by:
3250 de71b616 2022-07-05 thomas .Pp
3251 de71b616 2022-07-05 thomas .An Caldera International Inc.
3252 de71b616 2022-07-05 thomas .An Daniel Hartmeier
3253 de71b616 2022-07-05 thomas .An Esben Norby
3254 de71b616 2022-07-05 thomas .An Henning Brauer
3255 de71b616 2022-07-05 thomas .An Håkan Olsson
3256 de71b616 2022-07-05 thomas .An Ingo Schwarze
3257 de71b616 2022-07-05 thomas .An Jean-Francois Brousseau
3258 de71b616 2022-07-05 thomas .An Joris Vink
3259 de71b616 2022-07-05 thomas .An Jyri J. Virkki
3260 de71b616 2022-07-05 thomas .An Larry Wall
3261 de71b616 2022-07-05 thomas .An Markus Friedl
3262 de71b616 2022-07-05 thomas .An Niall O'Higgins
3263 de71b616 2022-07-05 thomas .An Niklas Hallqvist
3264 de71b616 2022-07-05 thomas .An Ray Lai
3265 de71b616 2022-07-05 thomas .An Ryan McBride
3266 de71b616 2022-07-05 thomas .An Theo de Raadt
3267 de71b616 2022-07-05 thomas .An Todd C. Miller
3268 de71b616 2022-07-05 thomas .An Xavier Santolaria
3269 e4badaa9 2022-07-05 thomas .Pp
3270 e4badaa9 2022-07-05 thomas .Nm
3271 e4badaa9 2022-07-05 thomas contains code contributed to the public domain by
3272 e4badaa9 2022-07-05 thomas .An Austin Appleby
3273 fa6e0e48 2019-05-23 stsp .Sh CAVEATS
3274 fa6e0e48 2019-05-23 stsp .Nm
3275 cc63216e 2020-12-26 stsp is a work-in-progress and some features remain to be implemented.
3276 1795b260 2021-04-02 kn .Pp
3277 fa6e0e48 2019-05-23 stsp At present, the user has to fall back on
3278 fa6e0e48 2019-05-23 stsp .Xr git 1
3279 cc63216e 2020-12-26 stsp to perform some tasks.
3280 cc63216e 2020-12-26 stsp In particular:
3281 cc63216e 2020-12-26 stsp .Bl -bullet
3282 cc63216e 2020-12-26 stsp .It
3283 cc63216e 2020-12-26 stsp Reading from remote repositories over HTTP or HTTPS protocols requires
3284 cc63216e 2020-12-26 stsp .Xr git-clone 1
3285 cc63216e 2020-12-26 stsp and
3286 cc63216e 2020-12-26 stsp .Xr git-fetch 1 .
3287 cc63216e 2020-12-26 stsp .It
3288 a099809f 2021-08-27 stsp Writing to remote repositories over HTTP or HTTPS protocols requires
3289 cc63216e 2020-12-26 stsp .Xr git-push 1 .
3290 cc63216e 2020-12-26 stsp .It
3291 22a38a43 2021-09-28 thomas The creation of merge commits with more than two parent commits requires
3292 cc63216e 2020-12-26 stsp .Xr git-merge 1 .
3293 cc63216e 2020-12-26 stsp .It
3294 cc63216e 2020-12-26 stsp In situations where files or directories were moved around
3295 cc63216e 2020-12-26 stsp .Cm got
3296 cc63216e 2020-12-26 stsp will not automatically merge changes to new locations and
3297 cc63216e 2020-12-26 stsp .Xr git 1
3298 cc63216e 2020-12-26 stsp will usually produce better results.
3299 cc63216e 2020-12-26 stsp .El