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