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