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