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