Blame


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