Blame


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