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