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