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