Blame


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