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