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 4e68cba3 2019-11-23 stsp .Pp
1129 4e68cba3 2019-11-23 stsp The options for
1130 4e68cba3 2019-11-23 stsp .Cm got add
1131 4e68cba3 2019-11-23 stsp are as follows:
1132 4e68cba3 2019-11-23 stsp .Bl -tag -width Ds
1133 4e68cba3 2019-11-23 stsp .It Fl R
1134 4e68cba3 2019-11-23 stsp Permit recursion into directories.
1135 4e68cba3 2019-11-23 stsp If this option is not specified,
1136 4e68cba3 2019-11-23 stsp .Cm got add
1137 4e68cba3 2019-11-23 stsp will refuse to run if a specified
1138 4e68cba3 2019-11-23 stsp .Ar path
1139 4e68cba3 2019-11-23 stsp is a directory.
1140 022fae89 2019-12-06 tracey .It Fl I
1141 022fae89 2019-12-06 tracey With -R, add files even if they match a
1142 022fae89 2019-12-06 tracey .Cm got status
1143 022fae89 2019-12-06 tracey ignore pattern.
1144 4e68cba3 2019-11-23 stsp .El
1145 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 ...
1146 17ed4618 2019-06-02 stsp Remove versioned files from a work tree and schedule them for deletion
1147 2ec1f75b 2019-03-26 stsp from the repository in the next commit.
1148 2ec1f75b 2019-03-26 stsp .Pp
1149 2ec1f75b 2019-03-26 stsp The options for
1150 86d25a1b 2019-07-11 stsp .Cm got remove
1151 2ec1f75b 2019-03-26 stsp are as follows:
1152 2ec1f75b 2019-03-26 stsp .Bl -tag -width Ds
1153 2ec1f75b 2019-03-26 stsp .It Fl f
1154 bd81cfb7 2020-04-19 stsp Perform the operation even if a file contains local modifications.
1155 70e3e7f5 2019-12-13 tracey .It Fl k
1156 70e3e7f5 2019-12-13 tracey Keep affected files on disk.
1157 f2a9dc41 2019-12-13 tracey .It Fl R
1158 f2a9dc41 2019-12-13 tracey Permit recursion into directories.
1159 f2a9dc41 2019-12-13 tracey If this option is not specified,
1160 f2a9dc41 2019-12-13 tracey .Cm got remove
1161 f2a9dc41 2019-12-13 tracey will refuse to run if a specified
1162 f2a9dc41 2019-12-13 tracey .Ar path
1163 f2a9dc41 2019-12-13 tracey is a directory.
1164 766841c2 2020-08-13 stsp .It Fl s Ar status-codes
1165 766841c2 2020-08-13 stsp Only delete files with a modification status matching one of the
1166 766841c2 2020-08-13 stsp single-character status codes contained in the
1167 766841c2 2020-08-13 stsp .Ar status-codes
1168 766841c2 2020-08-13 stsp argument.
1169 766841c2 2020-08-13 stsp The following status codes may be specified:
1170 766841c2 2020-08-13 stsp .Bl -column YXZ description
1171 766841c2 2020-08-13 stsp .It M Ta modified file (this implies the
1172 766841c2 2020-08-13 stsp .Fl f
1173 766841c2 2020-08-13 stsp option)
1174 766841c2 2020-08-13 stsp .It ! Ta versioned file expected on disk but missing
1175 766841c2 2020-08-13 stsp .El
1176 d0eebce4 2019-03-11 stsp .El
1177 648e4ef7 2019-07-09 stsp .It Cm rm
1178 648e4ef7 2019-07-09 stsp Short alias for
1179 648e4ef7 2019-07-09 stsp .Cm remove .
1180 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 ...
1181 bd81cfb7 2020-04-19 stsp Revert any local changes in files at the specified paths in a work tree.
1182 a129376b 2019-03-28 stsp File contents will be overwritten with those contained in the
1183 1dd86744 2019-08-12 anthony work tree's base commit.
1184 1dd86744 2019-08-12 anthony There is no way to bring discarded changes back after
1185 a129376b 2019-03-28 stsp .Cm got revert !
1186 a129376b 2019-03-28 stsp .Pp
1187 e20a8b6f 2019-06-04 stsp If a file was added with
1188 a129376b 2019-03-28 stsp .Cm got add
1189 a129376b 2019-03-28 stsp it will become an unversioned file again.
1190 e20a8b6f 2019-06-04 stsp If a file was deleted with
1191 86d25a1b 2019-07-11 stsp .Cm got remove
1192 a129376b 2019-03-28 stsp it will be restored.
1193 0f6d7415 2019-08-08 stsp .Pp
1194 0f6d7415 2019-08-08 stsp The options for
1195 0f6d7415 2019-08-08 stsp .Cm got revert
1196 0f6d7415 2019-08-08 stsp are as follows:
1197 0f6d7415 2019-08-08 stsp .Bl -tag -width Ds
1198 33aa809d 2019-08-08 stsp .It Fl p
1199 33aa809d 2019-08-08 stsp Instead of reverting all changes in files, interactively select or reject
1200 33aa809d 2019-08-08 stsp changes to revert based on
1201 33aa809d 2019-08-08 stsp .Dq y
1202 33aa809d 2019-08-08 stsp (revert change),
1203 33aa809d 2019-08-08 stsp .Dq n
1204 33aa809d 2019-08-08 stsp (keep change), and
1205 33aa809d 2019-08-08 stsp .Dq q
1206 33aa809d 2019-08-08 stsp (quit reverting this file) responses.
1207 33aa809d 2019-08-08 stsp If a file is in modified status, individual patches derived from the
1208 33aa809d 2019-08-08 stsp modified file content can be reverted.
1209 33aa809d 2019-08-08 stsp Files in added or deleted status may only be reverted in their entirety.
1210 33aa809d 2019-08-08 stsp .It Fl F Ar response-script
1211 33aa809d 2019-08-08 stsp With the
1212 33aa809d 2019-08-08 stsp .Fl p
1213 33aa809d 2019-08-08 stsp option, read
1214 33aa809d 2019-08-08 stsp .Dq y ,
1215 33aa809d 2019-08-08 stsp .Dq n ,
1216 33aa809d 2019-08-08 stsp and
1217 33aa809d 2019-08-08 stsp .Dq q
1218 33aa809d 2019-08-08 stsp responses line-by-line from the specified
1219 33aa809d 2019-08-08 stsp .Ar response-script
1220 33aa809d 2019-08-08 stsp file instead of prompting interactively.
1221 0f6d7415 2019-08-08 stsp .It Fl R
1222 0f6d7415 2019-08-08 stsp Permit recursion into directories.
1223 0f6d7415 2019-08-08 stsp If this option is not specified,
1224 0f6d7415 2019-08-08 stsp .Cm got revert
1225 0f6d7415 2019-08-08 stsp will refuse to run if a specified
1226 0f6d7415 2019-08-08 stsp .Ar path
1227 0f6d7415 2019-08-08 stsp is a directory.
1228 0f6d7415 2019-08-08 stsp .El
1229 97b3a7be 2019-07-09 stsp .It Cm rv
1230 97b3a7be 2019-07-09 stsp Short alias for
1231 97b3a7be 2019-07-09 stsp .Cm revert .
1232 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 ...
1233 4ed9f614 2019-08-04 stsp Create a new commit in the repository from changes in a work tree
1234 15cd91f7 2019-05-12 stsp and use this commit as the new base commit for the work tree.
1235 5c1e53bc 2019-07-28 stsp If no
1236 90e8619e 2019-07-25 stsp .Ar path
1237 4ed9f614 2019-08-04 stsp is specified, commit all changes in the work tree.
1238 4ed9f614 2019-08-04 stsp Otherwise, commit changes at or within the specified paths.
1239 15cd91f7 2019-05-12 stsp .Pp
1240 4ed9f614 2019-08-04 stsp If changes have been explicitly staged for commit with
1241 1dd86744 2019-08-12 anthony .Cm got stage ,
1242 4ed9f614 2019-08-04 stsp only commit staged changes and reject any specified paths which
1243 4ed9f614 2019-08-04 stsp have not been staged.
1244 4ed9f614 2019-08-04 stsp .Pp
1245 28cf319f 2021-01-28 stsp .Cm got commit
1246 28cf319f 2021-01-28 stsp opens a temporary file in an editor where a log message can be written
1247 28cf319f 2021-01-28 stsp unless the
1248 28cf319f 2021-01-28 stsp .Fl m
1249 28cf319f 2021-01-28 stsp option is used
1250 28cf319f 2021-01-28 stsp or the
1251 28cf319f 2021-01-28 stsp .Fl F
1252 28cf319f 2021-01-28 stsp and
1253 28cf319f 2021-01-28 stsp .Fl N
1254 28cf319f 2021-01-28 stsp options are used together.
1255 28cf319f 2021-01-28 stsp .Pp
1256 15cd91f7 2019-05-12 stsp Show the status of each affected file, using the following status codes:
1257 15cd91f7 2019-05-12 stsp .Bl -column YXZ description
1258 15cd91f7 2019-05-12 stsp .It M Ta modified file
1259 15cd91f7 2019-05-12 stsp .It D Ta file was deleted
1260 15cd91f7 2019-05-12 stsp .It A Ta new file was added
1261 1ebedb77 2019-10-19 stsp .It m Ta modified file modes (executable bit only)
1262 15cd91f7 2019-05-12 stsp .El
1263 15cd91f7 2019-05-12 stsp .Pp
1264 996d5ccd 2019-08-05 stsp Files which are not part of the new commit will retain their previously
1265 996d5ccd 2019-08-05 stsp recorded base commit.
1266 15cd91f7 2019-05-12 stsp Some
1267 15cd91f7 2019-05-12 stsp .Nm
1268 15cd91f7 2019-05-12 stsp commands may refuse to run while the work tree contains files from
1269 15cd91f7 2019-05-12 stsp multiple base commits.
1270 15cd91f7 2019-05-12 stsp The base commit of such a work tree can be made consistent by running
1271 47ec7be7 2019-05-12 stsp .Cm got update
1272 47ec7be7 2019-05-12 stsp across the entire work tree.
1273 15cd91f7 2019-05-12 stsp .Pp
1274 15cd91f7 2019-05-12 stsp The
1275 15cd91f7 2019-05-12 stsp .Cm got commit
1276 15cd91f7 2019-05-12 stsp command requires the
1277 74416c47 2019-05-09 stsp .Ev GOT_AUTHOR
1278 aba9c984 2019-09-08 stsp environment variable to be set,
1279 257add31 2020-09-09 stsp unless an author has been configured in
1280 257add31 2020-09-09 stsp .Xr got.conf 5
1281 257add31 2020-09-09 stsp or Git's
1282 aba9c984 2019-09-08 stsp .Dv user.name
1283 aba9c984 2019-09-08 stsp and
1284 709ae9eb 2019-09-08 stsp .Dv user.email
1285 709ae9eb 2019-09-08 stsp configuration settings can be
1286 aba9c984 2019-09-08 stsp obtained from the repository's
1287 aba9c984 2019-09-08 stsp .Pa .git/config
1288 c9956ddf 2019-09-08 stsp file or from Git's global
1289 c9956ddf 2019-09-08 stsp .Pa ~/.gitconfig
1290 c9956ddf 2019-09-08 stsp configuration file.
1291 74416c47 2019-05-09 stsp .Pp
1292 74416c47 2019-05-09 stsp The options for
1293 74416c47 2019-05-09 stsp .Cm got commit
1294 74416c47 2019-05-09 stsp are as follows:
1295 74416c47 2019-05-09 stsp .Bl -tag -width Ds
1296 28cf319f 2021-01-28 stsp .It Fl F Ar path
1297 28cf319f 2021-01-28 stsp Use the prepared log message stored in the file found at
1298 28cf319f 2021-01-28 stsp .Ar path
1299 28cf319f 2021-01-28 stsp when creating the new commit.
1300 28cf319f 2021-01-28 stsp .Cm got commit
1301 28cf319f 2021-01-28 stsp opens a temporary file in an editor where the prepared log message can be
1302 28cf319f 2021-01-28 stsp reviewed and edited further if needed.
1303 28cf319f 2021-01-28 stsp Cannot be used together with the
1304 23594da9 2019-05-13 stsp .Fl m
1305 28cf319f 2021-01-28 stsp option.
1306 28cf319f 2021-01-28 stsp .It Fl m Ar message
1307 28cf319f 2021-01-28 stsp Use the specified log message when creating the new commit.
1308 28cf319f 2021-01-28 stsp Cannot be used together with the
1309 28cf319f 2021-01-28 stsp .Fl F
1310 28cf319f 2021-01-28 stsp option.
1311 28cf319f 2021-01-28 stsp .It Fl N
1312 28cf319f 2021-01-28 stsp This option prevents
1313 23594da9 2019-05-13 stsp .Cm got commit
1314 28cf319f 2021-01-28 stsp from opening the commit message in an editor.
1315 28cf319f 2021-01-28 stsp It has no effect unless it is used together with the
1316 28cf319f 2021-01-28 stsp .Fl F
1317 28cf319f 2021-01-28 stsp option and is intended for non-interactive use such as scripting.
1318 35213c7c 2020-07-23 stsp .It Fl S
1319 af358f55 2020-07-23 stsp Allow the addition of symbolic links which point outside of the path space
1320 af358f55 2020-07-23 stsp that is under version control.
1321 af358f55 2020-07-23 stsp By default,
1322 af358f55 2020-07-23 stsp .Cm got commit
1323 af358f55 2020-07-23 stsp will reject such symbolic links due to safety concerns.
1324 35213c7c 2020-07-23 stsp As a precaution,
1325 35213c7c 2020-07-23 stsp .Nm
1326 af358f55 2020-07-23 stsp may decide to represent such a symbolic link as a regular file which contains
1327 af358f55 2020-07-23 stsp the link's target path, rather than creating an actual symbolic link which
1328 af358f55 2020-07-23 stsp points outside of the work tree.
1329 af358f55 2020-07-23 stsp Use of this option is discouraged because external mechanisms such as
1330 af358f55 2020-07-23 stsp .Dq make obj
1331 af358f55 2020-07-23 stsp are better suited for managing symbolic links to paths not under
1332 af358f55 2020-07-23 stsp version control.
1333 2ec1f75b 2019-03-26 stsp .El
1334 cfce0458 2019-07-28 stsp .Pp
1335 cfce0458 2019-07-28 stsp .Cm got commit
1336 cfce0458 2019-07-28 stsp will refuse to run if certain preconditions are not met.
1337 916f288c 2019-07-30 stsp If the work tree's current branch is not in the
1338 916f288c 2019-07-30 stsp .Dq refs/heads/
1339 916f288c 2019-07-30 stsp reference namespace, new commits may not be created on this branch.
1340 cfce0458 2019-07-28 stsp Local changes may only be committed if they are based on file content
1341 cfce0458 2019-07-28 stsp found in the most recent commit on the work tree's branch.
1342 cfce0458 2019-07-28 stsp If a path is found to be out of date,
1343 cfce0458 2019-07-28 stsp .Cm got update
1344 cfce0458 2019-07-28 stsp must be used first in order to merge local changes with changes made
1345 cfce0458 2019-07-28 stsp in the repository.
1346 97b3a7be 2019-07-09 stsp .It Cm ci
1347 97b3a7be 2019-07-09 stsp Short alias for
1348 97b3a7be 2019-07-09 stsp .Cm commit .
1349 234035bc 2019-06-01 stsp .It Cm cherrypick Ar commit
1350 234035bc 2019-06-01 stsp Merge changes from a single
1351 234035bc 2019-06-01 stsp .Ar commit
1352 234035bc 2019-06-01 stsp into the work tree.
1353 234035bc 2019-06-01 stsp The specified
1354 234035bc 2019-06-01 stsp .Ar commit
1355 234035bc 2019-06-01 stsp must be on a different branch than the work tree's base commit.
1356 a54b6686 2019-06-28 stsp The expected argument is a reference or a commit ID SHA1 hash.
1357 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1358 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
1359 234035bc 2019-06-01 stsp .Pp
1360 234035bc 2019-06-01 stsp Show the status of each affected file, using the following status codes:
1361 234035bc 2019-06-01 stsp .Bl -column YXZ description
1362 234035bc 2019-06-01 stsp .It G Ta file was merged
1363 234035bc 2019-06-01 stsp .It C Ta file was merged and conflicts occurred during merge
1364 234035bc 2019-06-01 stsp .It ! Ta changes destined for a missing file were not merged
1365 234035bc 2019-06-01 stsp .It D Ta file was deleted
1366 2b92fad7 2019-06-02 stsp .It d Ta file's deletion was obstructed by local modifications
1367 234035bc 2019-06-01 stsp .It A Ta new file was added
1368 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1369 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
1370 74416c47 2019-05-09 stsp .El
1371 234035bc 2019-06-01 stsp .Pp
1372 234035bc 2019-06-01 stsp The merged changes will appear as local changes in the work tree, which
1373 234035bc 2019-06-01 stsp may be viewed with
1374 234035bc 2019-06-01 stsp .Cm got diff ,
1375 234035bc 2019-06-01 stsp amended manually or with further
1376 234035bc 2019-06-01 stsp .Cm got cherrypick
1377 bc3056e3 2019-08-18 stsp commands,
1378 234035bc 2019-06-01 stsp committed with
1379 234035bc 2019-06-01 stsp .Cm got commit ,
1380 234035bc 2019-06-01 stsp or discarded again with
1381 234035bc 2019-06-01 stsp .Cm got revert .
1382 234035bc 2019-06-01 stsp .Pp
1383 234035bc 2019-06-01 stsp .Cm got cherrypick
1384 234035bc 2019-06-01 stsp will refuse to run if certain preconditions are not met.
1385 234035bc 2019-06-01 stsp If the work tree contains multiple base commits it must first be updated
1386 234035bc 2019-06-01 stsp to a single base commit with
1387 234035bc 2019-06-01 stsp .Cm got update .
1388 234035bc 2019-06-01 stsp If the work tree already contains files with merge conflicts, these
1389 234035bc 2019-06-01 stsp conflicts must be resolved first.
1390 016477fd 2019-07-09 stsp .It Cm cy
1391 97b3a7be 2019-07-09 stsp Short alias for
1392 97b3a7be 2019-07-09 stsp .Cm cherrypick .
1393 5ef14e63 2019-06-02 stsp .It Cm backout Ar commit
1394 5ef14e63 2019-06-02 stsp Reverse-merge changes from a single
1395 5ef14e63 2019-06-02 stsp .Ar commit
1396 5ef14e63 2019-06-02 stsp into the work tree.
1397 5ef14e63 2019-06-02 stsp The specified
1398 5ef14e63 2019-06-02 stsp .Ar commit
1399 5ef14e63 2019-06-02 stsp must be on the same branch as the work tree's base commit.
1400 a54b6686 2019-06-28 stsp The expected argument is a reference or a commit ID SHA1 hash.
1401 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1402 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
1403 5ef14e63 2019-06-02 stsp .Pp
1404 5ef14e63 2019-06-02 stsp Show the status of each affected file, using the following status codes:
1405 5ef14e63 2019-06-02 stsp .Bl -column YXZ description
1406 5ef14e63 2019-06-02 stsp .It G Ta file was merged
1407 5ef14e63 2019-06-02 stsp .It C Ta file was merged and conflicts occurred during merge
1408 5ef14e63 2019-06-02 stsp .It ! Ta changes destined for a missing file were not merged
1409 5ef14e63 2019-06-02 stsp .It D Ta file was deleted
1410 5ef14e63 2019-06-02 stsp .It d Ta file's deletion was obstructed by local modifications
1411 5ef14e63 2019-06-02 stsp .It A Ta new file was added
1412 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1413 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
1414 234035bc 2019-06-01 stsp .El
1415 5ef14e63 2019-06-02 stsp .Pp
1416 5ef14e63 2019-06-02 stsp The reverse-merged changes will appear as local changes in the work tree,
1417 5ef14e63 2019-06-02 stsp which may be viewed with
1418 5ef14e63 2019-06-02 stsp .Cm got diff ,
1419 5ef14e63 2019-06-02 stsp amended manually or with further
1420 778a73c2 2019-07-12 stsp .Cm got backout
1421 bc3056e3 2019-08-18 stsp commands,
1422 5ef14e63 2019-06-02 stsp committed with
1423 5ef14e63 2019-06-02 stsp .Cm got commit ,
1424 5ef14e63 2019-06-02 stsp or discarded again with
1425 5ef14e63 2019-06-02 stsp .Cm got revert .
1426 5ef14e63 2019-06-02 stsp .Pp
1427 92228c38 2019-06-02 stsp .Cm got backout
1428 92228c38 2019-06-02 stsp will refuse to run if certain preconditions are not met.
1429 92228c38 2019-06-02 stsp If the work tree contains multiple base commits it must first be updated
1430 92228c38 2019-06-02 stsp to a single base commit with
1431 92228c38 2019-06-02 stsp .Cm got update .
1432 92228c38 2019-06-02 stsp If the work tree already contains files with merge conflicts, these
1433 92228c38 2019-06-02 stsp conflicts must be resolved first.
1434 97b3a7be 2019-07-09 stsp .It Cm bo
1435 97b3a7be 2019-07-09 stsp Short alias for
1436 97b3a7be 2019-07-09 stsp .Cm backout .
1437 e600f124 2021-03-21 stsp .It Cm rebase Oo Fl a Oc Oo Fl c Oc Oo Fl l Oc Op Ar branch
1438 818c7501 2019-07-11 stsp Rebase commits on the specified
1439 818c7501 2019-07-11 stsp .Ar branch
1440 818c7501 2019-07-11 stsp onto the tip of the current branch of the work tree.
1441 818c7501 2019-07-11 stsp The
1442 818c7501 2019-07-11 stsp .Ar branch
1443 818c7501 2019-07-11 stsp must share common ancestry with the work tree's current branch.
1444 bc3056e3 2019-08-18 stsp Rebasing begins with the first descendant commit of the youngest
1445 f09e2405 2019-07-11 stsp common ancestor commit shared by the specified
1446 818c7501 2019-07-11 stsp .Ar branch
1447 818c7501 2019-07-11 stsp and the work tree's current branch, and stops once the tip commit
1448 f09e2405 2019-07-11 stsp of the specified
1449 818c7501 2019-07-11 stsp .Ar branch
1450 f09e2405 2019-07-11 stsp has been rebased.
1451 818c7501 2019-07-11 stsp .Pp
1452 2b6826ba 2020-02-24 stsp When
1453 2b6826ba 2020-02-24 stsp .Cm got rebase
1454 2b6826ba 2020-02-24 stsp is used as intended, the specified
1455 2b6826ba 2020-02-24 stsp .Ar branch
1456 c10890ce 2020-02-25 stsp represents a local commit history and may already contain changes
1457 c10890ce 2020-02-25 stsp that are not yet visible in any other repositories.
1458 2b6826ba 2020-02-24 stsp The work tree's current branch, which must be set with
1459 2b6826ba 2020-02-24 stsp .Cm got update -b
1460 2b6826ba 2020-02-24 stsp before starting the
1461 2b6826ba 2020-02-24 stsp .Cm rebase
1462 2b6826ba 2020-02-24 stsp operation, represents a branch from a remote repository which shares
1463 2b6826ba 2020-02-24 stsp a common history with the specified
1464 2b6826ba 2020-02-24 stsp .Ar branch
1465 c10890ce 2020-02-25 stsp but has progressed, and perhaps diverged, due to commits added to the
1466 c10890ce 2020-02-25 stsp remote repository.
1467 2b6826ba 2020-02-24 stsp .Pp
1468 c6b4581b 2019-07-28 stsp Rebased commits are accumulated on a temporary branch which the work tree
1469 c6b4581b 2019-07-28 stsp will remain switched to throughout the entire rebase operation.
1470 c6b4581b 2019-07-28 stsp Commits on this branch represent the same changes with the same log
1471 c6b4581b 2019-07-28 stsp messages as their counterparts on the original
1472 818c7501 2019-07-11 stsp .Ar branch ,
1473 818c7501 2019-07-11 stsp but with different commit IDs.
1474 818c7501 2019-07-11 stsp Once rebasing has completed successfully, the temporary branch becomes
1475 f09e2405 2019-07-11 stsp the new version of the specified
1476 818c7501 2019-07-11 stsp .Ar branch
1477 818c7501 2019-07-11 stsp and the work tree is automatically switched to it.
1478 e600f124 2021-03-21 stsp .Pp
1479 1795b260 2021-04-02 kn Old commits in their pre-rebase state are automatically backed up in the
1480 e600f124 2021-03-21 stsp .Dq refs/got/backup/rebase
1481 e600f124 2021-03-21 stsp reference namespace.
1482 e600f124 2021-03-21 stsp As long as these references are not removed older versions of rebased
1483 e600f124 2021-03-21 stsp commits will remain in the repository and can be viewed with the
1484 e600f124 2021-03-21 stsp .Cm got rebase -l
1485 e600f124 2021-03-21 stsp command.
1486 e600f124 2021-03-21 stsp Removal of these references makes objects which become unreachable via
1487 e6786710 2021-07-03 stsp any reference subject to removal by Git's garbage collector or
1488 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
1489 818c7501 2019-07-11 stsp .Pp
1490 818c7501 2019-07-11 stsp While rebasing commits, show the status of each affected file,
1491 818c7501 2019-07-11 stsp using the following status codes:
1492 818c7501 2019-07-11 stsp .Bl -column YXZ description
1493 818c7501 2019-07-11 stsp .It G Ta file was merged
1494 818c7501 2019-07-11 stsp .It C Ta file was merged and conflicts occurred during merge
1495 818c7501 2019-07-11 stsp .It ! Ta changes destined for a missing file were not merged
1496 818c7501 2019-07-11 stsp .It D Ta file was deleted
1497 818c7501 2019-07-11 stsp .It d Ta file's deletion was obstructed by local modifications
1498 818c7501 2019-07-11 stsp .It A Ta new file was added
1499 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1500 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
1501 5ef14e63 2019-06-02 stsp .El
1502 818c7501 2019-07-11 stsp .Pp
1503 f09e2405 2019-07-11 stsp If merge conflicts occur the rebase operation is interrupted and may
1504 f09e2405 2019-07-11 stsp be continued once conflicts have been resolved.
1505 818c7501 2019-07-11 stsp Alternatively, the rebase operation may be aborted which will leave
1506 818c7501 2019-07-11 stsp .Ar branch
1507 818c7501 2019-07-11 stsp unmodified and the work tree switched back to its original branch.
1508 818c7501 2019-07-11 stsp .Pp
1509 ff0d2220 2019-07-11 stsp If a merge conflict is resolved in a way which renders the merged
1510 f09e2405 2019-07-11 stsp change into a no-op change, the corresponding commit will be elided
1511 f09e2405 2019-07-11 stsp when the rebase operation continues.
1512 ff0d2220 2019-07-11 stsp .Pp
1513 818c7501 2019-07-11 stsp .Cm got rebase
1514 818c7501 2019-07-11 stsp will refuse to run if certain preconditions are not met.
1515 a85446b2 2020-01-04 stsp If the work tree is not yet fully updated to the tip commit of its
1516 a85446b2 2020-01-04 stsp branch then the work tree must first be updated with
1517 818c7501 2019-07-11 stsp .Cm got update .
1518 4ed9f614 2019-08-04 stsp If changes have been staged with
1519 4ed9f614 2019-08-04 stsp .Cm got stage ,
1520 bc3056e3 2019-08-18 stsp these changes must first be committed with
1521 4ed9f614 2019-08-04 stsp .Cm got commit
1522 4ed9f614 2019-08-04 stsp or unstaged with
1523 4ed9f614 2019-08-04 stsp .Cm got unstage .
1524 f09e2405 2019-07-11 stsp If the work tree contains local changes, these changes must first be
1525 f09e2405 2019-07-11 stsp committed with
1526 f09e2405 2019-07-11 stsp .Cm got commit
1527 f09e2405 2019-07-11 stsp or reverted with
1528 f09e2405 2019-07-11 stsp .Cm got revert .
1529 64c6d990 2019-07-11 stsp If the
1530 64c6d990 2019-07-11 stsp .Ar branch
1531 64c6d990 2019-07-11 stsp contains changes to files outside of the work tree's path prefix,
1532 64c6d990 2019-07-11 stsp the work tree cannot be used to rebase this branch.
1533 818c7501 2019-07-11 stsp .Pp
1534 7d5807f4 2019-07-11 stsp The
1535 7d5807f4 2019-07-11 stsp .Cm got update
1536 7d5807f4 2019-07-11 stsp and
1537 7d5807f4 2019-07-11 stsp .Cm got commit
1538 7d5807f4 2019-07-11 stsp commands will refuse to run while a rebase operation is in progress.
1539 7d5807f4 2019-07-11 stsp Other commands which manipulate the work tree may be used for
1540 7d5807f4 2019-07-11 stsp conflict resolution purposes.
1541 818c7501 2019-07-11 stsp .Pp
1542 818c7501 2019-07-11 stsp The options for
1543 818c7501 2019-07-11 stsp .Cm got rebase
1544 818c7501 2019-07-11 stsp are as follows:
1545 818c7501 2019-07-11 stsp .Bl -tag -width Ds
1546 818c7501 2019-07-11 stsp .It Fl a
1547 818c7501 2019-07-11 stsp Abort an interrupted rebase operation.
1548 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
1549 818c7501 2019-07-11 stsp .It Fl c
1550 06067b48 2019-07-11 stsp Continue an interrupted rebase operation.
1551 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
1552 e600f124 2021-03-21 stsp .It Fl l
1553 e600f124 2021-03-21 stsp Show a list of past rebase operations, represented by references in the
1554 e600f124 2021-03-21 stsp .Dq refs/got/backup/rebase
1555 e600f124 2021-03-21 stsp reference namespace.
1556 e600f124 2021-03-21 stsp .Pp
1557 e600f124 2021-03-21 stsp Display the author, date, and log message of each backed up commit,
1558 e600f124 2021-03-21 stsp the object ID of the corresponding post-rebase commit, and
1559 e600f124 2021-03-21 stsp the object ID of their common ancestor commit.
1560 e600f124 2021-03-21 stsp Given these object IDs,
1561 e600f124 2021-03-21 stsp the
1562 e600f124 2021-03-21 stsp .Cm got log
1563 e600f124 2021-03-21 stsp command with the
1564 e600f124 2021-03-21 stsp .Fl c
1565 e600f124 2021-03-21 stsp and
1566 e600f124 2021-03-21 stsp .Fl x
1567 e600f124 2021-03-21 stsp options can be used to examine the history of either version of the branch,
1568 e600f124 2021-03-21 stsp and the
1569 e600f124 2021-03-21 stsp .Cm got branch
1570 e600f124 2021-03-21 stsp command with the
1571 e600f124 2021-03-21 stsp .Fl c
1572 e600f124 2021-03-21 stsp option can be used to create a new branch from a pre-rebase state if desired.
1573 e600f124 2021-03-21 stsp .Pp
1574 e600f124 2021-03-21 stsp If a
1575 e600f124 2021-03-21 stsp .Ar branch
1576 e600f124 2021-03-21 stsp is specified, only show commits which at some point in time represented this
1577 e600f124 2021-03-21 stsp branch.
1578 e600f124 2021-03-21 stsp Otherwise, list all backed up commits for any branches.
1579 e600f124 2021-03-21 stsp .Pp
1580 e600f124 2021-03-21 stsp If this option is used,
1581 e600f124 2021-03-21 stsp .Cm got rebase
1582 e600f124 2021-03-21 stsp does not require a work tree.
1583 e600f124 2021-03-21 stsp None of the other options can be used together with
1584 e600f124 2021-03-21 stsp .Fl l .
1585 818c7501 2019-07-11 stsp .El
1586 818c7501 2019-07-11 stsp .It Cm rb
1587 818c7501 2019-07-11 stsp Short alias for
1588 818c7501 2019-07-11 stsp .Cm rebase .
1589 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
1590 0ebf8283 2019-07-24 stsp Edit commit history between the work tree's current base commit and
1591 0ebf8283 2019-07-24 stsp the tip commit of the work tree's current branch.
1592 6e54d307 2020-02-24 stsp .Pp
1593 6e54d307 2020-02-24 stsp Before starting a
1594 6e54d307 2020-02-24 stsp .Cm histedit
1595 6e54d307 2020-02-24 stsp operation the work tree's current branch must be set with
1596 6e54d307 2020-02-24 stsp .Cm got update -b
1597 6e54d307 2020-02-24 stsp to the branch which should be edited, unless this branch is already the
1598 6e54d307 2020-02-24 stsp current branch of the work tree.
1599 6e54d307 2020-02-24 stsp The tip of this branch represents the upper bound (inclusive) of commits
1600 6e54d307 2020-02-24 stsp touched by the
1601 6e54d307 2020-02-24 stsp .Cm histedit
1602 6e54d307 2020-02-24 stsp operation.
1603 0ebf8283 2019-07-24 stsp .Pp
1604 6e54d307 2020-02-24 stsp Furthermore, the work tree's base commit
1605 6e54d307 2020-02-24 stsp must be set with
1606 6e54d307 2020-02-24 stsp .Cm got update -c
1607 6e54d307 2020-02-24 stsp to a point in this branch's commit history where editing should begin.
1608 6e54d307 2020-02-24 stsp This commit represents the lower bound (non-inclusive) of commits touched
1609 6e54d307 2020-02-24 stsp by the
1610 6e54d307 2020-02-24 stsp .Cm histedit
1611 6e54d307 2020-02-24 stsp operation.
1612 6e54d307 2020-02-24 stsp .Pp
1613 0ebf8283 2019-07-24 stsp Editing of commit history is controlled via a
1614 0ebf8283 2019-07-24 stsp .Ar histedit script
1615 46fa4c83 2020-02-24 stsp which can be written in an editor based on a template, passed on the
1616 46fa4c83 2020-02-24 stsp command line, or generated with the
1617 466785b9 2020-12-10 jrick .Fl f
1618 466785b9 2020-12-10 jrick or
1619 083957f4 2020-02-24 stsp .Fl m
1620 466785b9 2020-12-10 jrick options.
1621 083957f4 2020-02-24 stsp .Pp
1622 0ebf8283 2019-07-24 stsp The format of the histedit script is line-based.
1623 0ebf8283 2019-07-24 stsp Each line in the script begins with a command name, followed by
1624 0ebf8283 2019-07-24 stsp whitespace and an argument.
1625 0ebf8283 2019-07-24 stsp For most commands, the expected argument is a commit ID SHA1 hash.
1626 0ebf8283 2019-07-24 stsp Any remaining text on the line is ignored.
1627 0ebf8283 2019-07-24 stsp Lines which begin with the
1628 0ebf8283 2019-07-24 stsp .Sq #
1629 0ebf8283 2019-07-24 stsp character are ignored entirely.
1630 0ebf8283 2019-07-24 stsp .Pp
1631 0ebf8283 2019-07-24 stsp The available commands are as follows:
1632 0ebf8283 2019-07-24 stsp .Bl -column YXZ pick-commit
1633 0ebf8283 2019-07-24 stsp .It pick Ar commit Ta Use the specified commit as it is.
1634 a698f62e 2019-07-25 stsp .It edit Ar commit Ta Use the specified commit but once changes have been
1635 0ebf8283 2019-07-24 stsp merged into the work tree interrupt the histedit operation for amending.
1636 0ebf8283 2019-07-24 stsp .It fold Ar commit Ta Combine the specified commit with the next commit
1637 0ebf8283 2019-07-24 stsp listed further below that will be used.
1638 0ebf8283 2019-07-24 stsp .It drop Ar commit Ta Remove this commit from the edited history.
1639 0ebf8283 2019-07-24 stsp .It mesg Ar log-message Ta Use the specified single-line log message for
1640 0ebf8283 2019-07-24 stsp the commit on the previous line.
1641 0ebf8283 2019-07-24 stsp If the log message argument is left empty, open an editor where a new
1642 0ebf8283 2019-07-24 stsp log message can be written.
1643 0ebf8283 2019-07-24 stsp .El
1644 0ebf8283 2019-07-24 stsp .Pp
1645 ba67992e 2019-07-25 stsp Every commit in the history being edited must be mentioned in the script.
1646 0ebf8283 2019-07-24 stsp Lines may be re-ordered to change the order of commits in the edited history.
1647 5b87815e 2020-03-05 stsp No commit may be listed more than once.
1648 0ebf8283 2019-07-24 stsp .Pp
1649 c6b4581b 2019-07-28 stsp Edited commits are accumulated on a temporary branch which the work tree
1650 c6b4581b 2019-07-28 stsp will remain switched to throughout the entire histedit operation.
1651 0ebf8283 2019-07-24 stsp Once history editing has completed successfully, the temporary branch becomes
1652 498a90b7 2019-07-25 stsp the new version of the work tree's branch and the work tree is automatically
1653 498a90b7 2019-07-25 stsp switched to it.
1654 0ebf8283 2019-07-24 stsp .Pp
1655 1795b260 2021-04-02 kn Old commits in their pre-histedit state are automatically backed up in the
1656 e600f124 2021-03-21 stsp .Dq refs/got/backup/histedit
1657 e600f124 2021-03-21 stsp reference namespace.
1658 e600f124 2021-03-21 stsp As long as these references are not removed older versions of edited
1659 e600f124 2021-03-21 stsp commits will remain in the repository and can be viewed with the
1660 e600f124 2021-03-21 stsp .Cm got histedit -l
1661 e600f124 2021-03-21 stsp command.
1662 e600f124 2021-03-21 stsp Removal of these references makes objects which become unreachable via
1663 e6786710 2021-07-03 stsp any reference subject to removal by Git's garbage collector or
1664 e6786710 2021-07-03 stsp .Cm gotadmin cleanup .
1665 e600f124 2021-03-21 stsp .Pp
1666 0ebf8283 2019-07-24 stsp While merging commits, show the status of each affected file,
1667 0ebf8283 2019-07-24 stsp using the following status codes:
1668 0ebf8283 2019-07-24 stsp .Bl -column YXZ description
1669 0ebf8283 2019-07-24 stsp .It G Ta file was merged
1670 0ebf8283 2019-07-24 stsp .It C Ta file was merged and conflicts occurred during merge
1671 0ebf8283 2019-07-24 stsp .It ! Ta changes destined for a missing file were not merged
1672 0ebf8283 2019-07-24 stsp .It D Ta file was deleted
1673 0ebf8283 2019-07-24 stsp .It d Ta file's deletion was obstructed by local modifications
1674 0ebf8283 2019-07-24 stsp .It A Ta new file was added
1675 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1676 c90c8ce3 2020-07-23 stsp .It ? Ta changes destined for an unversioned file were not merged
1677 0ebf8283 2019-07-24 stsp .El
1678 0ebf8283 2019-07-24 stsp .Pp
1679 0ebf8283 2019-07-24 stsp If merge conflicts occur the histedit operation is interrupted and may
1680 0ebf8283 2019-07-24 stsp be continued once conflicts have been resolved.
1681 0ebf8283 2019-07-24 stsp Alternatively, the histedit operation may be aborted which will leave
1682 0ebf8283 2019-07-24 stsp the work tree switched back to its original branch.
1683 0ebf8283 2019-07-24 stsp .Pp
1684 0ebf8283 2019-07-24 stsp If a merge conflict is resolved in a way which renders the merged
1685 0ebf8283 2019-07-24 stsp change into a no-op change, the corresponding commit will be elided
1686 0ebf8283 2019-07-24 stsp when the histedit operation continues.
1687 0ebf8283 2019-07-24 stsp .Pp
1688 0ebf8283 2019-07-24 stsp .Cm got histedit
1689 0ebf8283 2019-07-24 stsp will refuse to run if certain preconditions are not met.
1690 c7d20a3f 2019-07-30 stsp If the work tree's current branch is not in the
1691 c7d20a3f 2019-07-30 stsp .Dq refs/heads/
1692 c7d20a3f 2019-07-30 stsp reference namespace, the history of the branch may not be edited.
1693 0ebf8283 2019-07-24 stsp If the work tree contains multiple base commits it must first be updated
1694 0ebf8283 2019-07-24 stsp to a single base commit with
1695 0ebf8283 2019-07-24 stsp .Cm got update .
1696 4ed9f614 2019-08-04 stsp If changes have been staged with
1697 4ed9f614 2019-08-04 stsp .Cm got stage ,
1698 bc3056e3 2019-08-18 stsp these changes must first be committed with
1699 4ed9f614 2019-08-04 stsp .Cm got commit
1700 4ed9f614 2019-08-04 stsp or unstaged with
1701 4ed9f614 2019-08-04 stsp .Cm got unstage .
1702 0ebf8283 2019-07-24 stsp If the work tree contains local changes, these changes must first be
1703 0ebf8283 2019-07-24 stsp committed with
1704 0ebf8283 2019-07-24 stsp .Cm got commit
1705 0ebf8283 2019-07-24 stsp or reverted with
1706 0ebf8283 2019-07-24 stsp .Cm got revert .
1707 0ebf8283 2019-07-24 stsp If the edited history contains changes to files outside of the work tree's
1708 0ebf8283 2019-07-24 stsp path prefix, the work tree cannot be used to edit the history of this branch.
1709 0ebf8283 2019-07-24 stsp .Pp
1710 0ebf8283 2019-07-24 stsp The
1711 7ef62c4e 2020-02-24 stsp .Cm got update ,
1712 7ef62c4e 2020-02-24 stsp .Cm got rebase ,
1713 65db4ffb 2020-02-24 stsp and
1714 65db4ffb 2020-02-24 stsp .Cm got integrate
1715 65db4ffb 2020-02-24 stsp commands will refuse to run while a histedit operation is in progress.
1716 a698f62e 2019-07-25 stsp Other commands which manipulate the work tree may be used, and the
1717 0ebf8283 2019-07-24 stsp .Cm got commit
1718 a698f62e 2019-07-25 stsp command may be used to commit arbitrary changes to the temporary branch
1719 a698f62e 2019-07-25 stsp while the histedit operation is interrupted.
1720 0ebf8283 2019-07-24 stsp .Pp
1721 0ebf8283 2019-07-24 stsp The options for
1722 0ebf8283 2019-07-24 stsp .Cm got histedit
1723 0ebf8283 2019-07-24 stsp are as follows:
1724 0ebf8283 2019-07-24 stsp .Bl -tag -width Ds
1725 0ebf8283 2019-07-24 stsp .It Fl a
1726 0ebf8283 2019-07-24 stsp Abort an interrupted histedit operation.
1727 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
1728 0ebf8283 2019-07-24 stsp .It Fl c
1729 0ebf8283 2019-07-24 stsp Continue an interrupted histedit operation.
1730 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
1731 466785b9 2020-12-10 jrick .It Fl f
1732 466785b9 2020-12-10 jrick Fold all commits into a single commit.
1733 466785b9 2020-12-10 jrick This option is a quick equivalent to a histedit script which folds all
1734 466785b9 2020-12-10 jrick commits, combining them all into one commit.
1735 2a78779e 2020-12-11 stsp The
1736 2a78779e 2020-12-11 stsp .Fl f
1737 2a78779e 2020-12-11 stsp option can only be used when starting a new histedit operation.
1738 466785b9 2020-12-10 jrick If this option is used, no other command-line arguments are allowed.
1739 ddbfac99 2020-02-24 stsp .It Fl F Ar histedit-script
1740 ddbfac99 2020-02-24 stsp Use the specified
1741 ddbfac99 2020-02-24 stsp .Ar histedit-script
1742 ddbfac99 2020-02-24 stsp instead of opening a temporary file in an editor where a histedit script
1743 ddbfac99 2020-02-24 stsp can be written.
1744 083957f4 2020-02-24 stsp .It Fl m
1745 083957f4 2020-02-24 stsp Edit log messages only.
1746 083957f4 2020-02-24 stsp This option is a quick equivalent to a histedit script which edits
1747 2bdefe56 2020-02-24 tracey only log messages but otherwise leaves every picked commit as-is.
1748 083957f4 2020-02-24 stsp The
1749 083957f4 2020-02-24 stsp .Fl m
1750 083957f4 2020-02-24 stsp option can only be used when starting a new histedit operation.
1751 083957f4 2020-02-24 stsp If this option is used, no other command-line arguments are allowed.
1752 e600f124 2021-03-21 stsp .It Fl l
1753 e600f124 2021-03-21 stsp Show a list of past histedit operations, represented by references in the
1754 e600f124 2021-03-21 stsp .Dq refs/got/backup/histedit
1755 e600f124 2021-03-21 stsp reference namespace.
1756 e600f124 2021-03-21 stsp .Pp
1757 e600f124 2021-03-21 stsp Display the author, date, and log message of each backed up commit,
1758 e600f124 2021-03-21 stsp the object ID of the corresponding post-histedit commit, and
1759 e600f124 2021-03-21 stsp the object ID of their common ancestor commit.
1760 e600f124 2021-03-21 stsp Given these object IDs,
1761 e600f124 2021-03-21 stsp the
1762 e600f124 2021-03-21 stsp .Cm got log
1763 e600f124 2021-03-21 stsp command with the
1764 e600f124 2021-03-21 stsp .Fl c
1765 e600f124 2021-03-21 stsp and
1766 e600f124 2021-03-21 stsp .Fl x
1767 e600f124 2021-03-21 stsp options can be used to examine the history of either version of the branch,
1768 e600f124 2021-03-21 stsp and the
1769 e600f124 2021-03-21 stsp .Cm got branch
1770 e600f124 2021-03-21 stsp command with the
1771 e600f124 2021-03-21 stsp .Fl c
1772 e600f124 2021-03-21 stsp option can be used to create a new branch from a pre-histedit state if desired.
1773 e600f124 2021-03-21 stsp .Pp
1774 e600f124 2021-03-21 stsp If a
1775 e600f124 2021-03-21 stsp .Ar branch
1776 e600f124 2021-03-21 stsp is specified, only show commits which at some point in time represented this
1777 e600f124 2021-03-21 stsp branch.
1778 e600f124 2021-03-21 stsp Otherwise, list all backed up commits for any branches.
1779 e600f124 2021-03-21 stsp .Pp
1780 e600f124 2021-03-21 stsp If this option is used,
1781 e600f124 2021-03-21 stsp .Cm got histedit
1782 e600f124 2021-03-21 stsp does not require a work tree.
1783 e600f124 2021-03-21 stsp None of the other options can be used together with
1784 e600f124 2021-03-21 stsp .Fl l .
1785 818c7501 2019-07-11 stsp .El
1786 0ebf8283 2019-07-24 stsp .It Cm he
1787 0ebf8283 2019-07-24 stsp Short alias for
1788 0ebf8283 2019-07-24 stsp .Cm histedit .
1789 2822a352 2019-10-15 stsp .It Cm integrate Ar branch
1790 2822a352 2019-10-15 stsp Integrate the specified
1791 2822a352 2019-10-15 stsp .Ar branch
1792 2822a352 2019-10-15 stsp into the work tree's current branch.
1793 2822a352 2019-10-15 stsp Files in the work tree are updated to match the contents on the integrated
1794 2822a352 2019-10-15 stsp .Ar branch ,
1795 2822a352 2019-10-15 stsp and the reference of the work tree's branch is changed to point at the
1796 2822a352 2019-10-15 stsp head commit of the integrated
1797 2822a352 2019-10-15 stsp .Ar branch .
1798 2822a352 2019-10-15 stsp .Pp
1799 2822a352 2019-10-15 stsp Both branches can be considered equivalent after integration since they
1800 2822a352 2019-10-15 stsp will be pointing at the same commit.
1801 2822a352 2019-10-15 stsp Both branches remain available for future work, if desired.
1802 2822a352 2019-10-15 stsp In case the integrated
1803 2822a352 2019-10-15 stsp .Ar branch
1804 2822a352 2019-10-15 stsp is no longer needed it may be deleted with
1805 2822a352 2019-10-15 stsp .Cm got branch -d .
1806 2822a352 2019-10-15 stsp .Pp
1807 2822a352 2019-10-15 stsp Show the status of each affected file, using the following status codes:
1808 2822a352 2019-10-15 stsp .Bl -column YXZ description
1809 2822a352 2019-10-15 stsp .It U Ta file was updated
1810 2822a352 2019-10-15 stsp .It D Ta file was deleted
1811 2822a352 2019-10-15 stsp .It A Ta new file was added
1812 2822a352 2019-10-15 stsp .It \(a~ Ta versioned file is obstructed by a non-regular file
1813 2822a352 2019-10-15 stsp .It ! Ta a missing versioned file was restored
1814 2822a352 2019-10-15 stsp .El
1815 2822a352 2019-10-15 stsp .Pp
1816 2822a352 2019-10-15 stsp .Cm got integrate
1817 2822a352 2019-10-15 stsp will refuse to run if certain preconditions are not met.
1818 2822a352 2019-10-15 stsp Most importantly, the
1819 2822a352 2019-10-15 stsp .Ar branch
1820 2822a352 2019-10-15 stsp must have been rebased onto the work tree's current branch with
1821 2822a352 2019-10-15 stsp .Cm got rebase
1822 2822a352 2019-10-15 stsp before it can be integrated, in order to linearize commit history and
1823 2822a352 2019-10-15 stsp resolve merge conflicts.
1824 2822a352 2019-10-15 stsp If the work tree contains multiple base commits it must first be updated
1825 2822a352 2019-10-15 stsp to a single base commit with
1826 2822a352 2019-10-15 stsp .Cm got update .
1827 2822a352 2019-10-15 stsp If changes have been staged with
1828 2822a352 2019-10-15 stsp .Cm got stage ,
1829 2822a352 2019-10-15 stsp these changes must first be committed with
1830 2822a352 2019-10-15 stsp .Cm got commit
1831 2822a352 2019-10-15 stsp or unstaged with
1832 2822a352 2019-10-15 stsp .Cm got unstage .
1833 2822a352 2019-10-15 stsp If the work tree contains local changes, these changes must first be
1834 2822a352 2019-10-15 stsp committed with
1835 2822a352 2019-10-15 stsp .Cm got commit
1836 2822a352 2019-10-15 stsp or reverted with
1837 2822a352 2019-10-15 stsp .Cm got revert .
1838 2822a352 2019-10-15 stsp .It Cm ig
1839 2822a352 2019-10-15 stsp Short alias for
1840 2822a352 2019-10-15 stsp .Cm integrate .
1841 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 ...
1842 2db2652d 2019-08-07 stsp Stage local changes for inclusion in the next commit.
1843 2db2652d 2019-08-07 stsp If no
1844 2db2652d 2019-08-07 stsp .Ar path
1845 2db2652d 2019-08-07 stsp is specified, stage all changes in the work tree.
1846 2db2652d 2019-08-07 stsp Otherwise, stage changes at or within the specified paths.
1847 4ed9f614 2019-08-04 stsp Paths may be staged if they are added, modified, or deleted according to
1848 4ed9f614 2019-08-04 stsp .Cm got status .
1849 4ed9f614 2019-08-04 stsp .Pp
1850 9d8b19a4 2019-08-04 stsp Show the status of each affected file, using the following status codes:
1851 9d8b19a4 2019-08-04 stsp .Bl -column YXZ description
1852 9d8b19a4 2019-08-04 stsp .It A Ta file addition has been staged
1853 9d8b19a4 2019-08-04 stsp .It M Ta file modification has been staged
1854 9d8b19a4 2019-08-04 stsp .It D Ta file deletion has been staged
1855 9d8b19a4 2019-08-04 stsp .El
1856 9d8b19a4 2019-08-04 stsp .Pp
1857 9d8b19a4 2019-08-04 stsp Staged file contents are saved in newly created blob objects in the repository.
1858 52c8d4ac 2019-08-04 stsp These blobs will be referred to by tree objects once staged changes have been
1859 9d8b19a4 2019-08-04 stsp committed.
1860 9d8b19a4 2019-08-04 stsp .Pp
1861 890ea719 2019-08-04 stsp Staged changes affect the behaviour of
1862 4ed9f614 2019-08-04 stsp .Cm got commit ,
1863 4ed9f614 2019-08-04 stsp .Cm got status ,
1864 4ed9f614 2019-08-04 stsp and
1865 4ed9f614 2019-08-04 stsp .Cm got diff .
1866 4ed9f614 2019-08-04 stsp While paths with staged changes exist, the
1867 4ed9f614 2019-08-04 stsp .Cm got commit
1868 4ed9f614 2019-08-04 stsp command will refuse to commit any paths which do not have staged changes.
1869 4ed9f614 2019-08-04 stsp Local changes created on top of staged changes can only be committed if
1870 4ed9f614 2019-08-04 stsp the path is staged again, or if the staged changes are committed first.
1871 4ed9f614 2019-08-04 stsp The
1872 4ed9f614 2019-08-04 stsp .Cm got status
1873 4ed9f614 2019-08-04 stsp command will show both local changes and staged changes.
1874 4ed9f614 2019-08-04 stsp The
1875 4ed9f614 2019-08-04 stsp .Cm got diff
1876 ecf14362 2019-08-04 stsp command is able to display local changes relative to staged changes,
1877 ecf14362 2019-08-04 stsp and to display staged changes relative to the repository.
1878 4ed9f614 2019-08-04 stsp The
1879 4ed9f614 2019-08-04 stsp .Cm got revert
1880 4ed9f614 2019-08-04 stsp command cannot revert staged changes but may be used to revert
1881 4f2494e6 2019-08-08 stsp local changes created on top of staged changes.
1882 4ed9f614 2019-08-04 stsp .Pp
1883 4ed9f614 2019-08-04 stsp The options for
1884 4ed9f614 2019-08-04 stsp .Cm got stage
1885 4ed9f614 2019-08-04 stsp are as follows:
1886 4ed9f614 2019-08-04 stsp .Bl -tag -width Ds
1887 4ed9f614 2019-08-04 stsp .It Fl l
1888 4ed9f614 2019-08-04 stsp Instead of staging new changes, list paths which are already staged,
1889 9d8b19a4 2019-08-04 stsp along with the IDs of staged blob objects and stage status codes.
1890 9d8b19a4 2019-08-04 stsp If paths were provided in the command line show the staged paths
1891 1dd86744 2019-08-12 anthony among the specified paths.
1892 1dd86744 2019-08-12 anthony Otherwise, show all staged paths.
1893 dc424a06 2019-08-07 stsp .It Fl p
1894 dc424a06 2019-08-07 stsp Instead of staging the entire content of a changed file, interactively
1895 dc424a06 2019-08-07 stsp select or reject changes for staging based on
1896 dc424a06 2019-08-07 stsp .Dq y
1897 6d23ec10 2019-08-08 stsp (stage change),
1898 dc424a06 2019-08-07 stsp .Dq n
1899 6d23ec10 2019-08-08 stsp (reject change), and
1900 b353a198 2019-08-07 stsp .Dq q
1901 6d23ec10 2019-08-08 stsp (quit staging this file) responses.
1902 dc424a06 2019-08-07 stsp If a file is in modified status, individual patches derived from the
1903 dc424a06 2019-08-07 stsp modified file content can be staged.
1904 6d23ec10 2019-08-08 stsp Files in added or deleted status may only be staged or rejected in
1905 6d23ec10 2019-08-08 stsp their entirety.
1906 3a070a2b 2019-08-07 stsp .It Fl F Ar response-script
1907 dc424a06 2019-08-07 stsp With the
1908 dc424a06 2019-08-07 stsp .Fl p
1909 3a070a2b 2019-08-07 stsp option, read
1910 3a070a2b 2019-08-07 stsp .Dq y ,
1911 3a070a2b 2019-08-07 stsp .Dq n ,
1912 3a070a2b 2019-08-07 stsp and
1913 3a070a2b 2019-08-07 stsp .Dq q
1914 0e2f5884 2019-08-07 stsp responses line-by-line from the specified
1915 0e2f5884 2019-08-07 stsp .Ar response-script
1916 0e2f5884 2019-08-07 stsp file instead of prompting interactively.
1917 35213c7c 2020-07-23 stsp .It Fl S
1918 af358f55 2020-07-23 stsp Allow staging of symbolic links which point outside of the path space
1919 af358f55 2020-07-23 stsp that is under version control.
1920 af358f55 2020-07-23 stsp By default,
1921 af358f55 2020-07-23 stsp .Cm got stage
1922 af358f55 2020-07-23 stsp will reject such symbolic links due to safety concerns.
1923 35213c7c 2020-07-23 stsp As a precaution,
1924 35213c7c 2020-07-23 stsp .Nm
1925 af358f55 2020-07-23 stsp may decide to represent such a symbolic link as a regular file which contains
1926 af358f55 2020-07-23 stsp the link's target path, rather than creating an actual symbolic link which
1927 af358f55 2020-07-23 stsp points outside of the work tree.
1928 af358f55 2020-07-23 stsp Use of this option is discouraged because external mechanisms such as
1929 af358f55 2020-07-23 stsp .Dq make obj
1930 af358f55 2020-07-23 stsp are better suited for managing symbolic links to paths not under
1931 af358f55 2020-07-23 stsp version control.
1932 4ed9f614 2019-08-04 stsp .El
1933 4ed9f614 2019-08-04 stsp .Pp
1934 4ed9f614 2019-08-04 stsp .Cm got stage
1935 4ed9f614 2019-08-04 stsp will refuse to run if certain preconditions are not met.
1936 4ed9f614 2019-08-04 stsp If a file contains merge conflicts, these conflicts must be resolved first.
1937 4ed9f614 2019-08-04 stsp If a file is found to be out of date relative to the head commit on the
1938 4ed9f614 2019-08-04 stsp work tree's current branch, the file must be updated with
1939 4ed9f614 2019-08-04 stsp .Cm got update
1940 4ed9f614 2019-08-04 stsp before it can be staged (however, this does not prevent the file from
1941 4ed9f614 2019-08-04 stsp becoming out-of-date at some point after having been staged).
1942 4ed9f614 2019-08-04 stsp .Pp
1943 4ed9f614 2019-08-04 stsp The
1944 4ed9f614 2019-08-04 stsp .Cm got update ,
1945 4ed9f614 2019-08-04 stsp .Cm got rebase ,
1946 4ed9f614 2019-08-04 stsp and
1947 4ed9f614 2019-08-04 stsp .Cm got histedit
1948 4ed9f614 2019-08-04 stsp commands will refuse to run while staged changes exist.
1949 4ed9f614 2019-08-04 stsp If staged changes cannot be committed because a staged path
1950 4ed9f614 2019-08-04 stsp is out of date, the path must be unstaged with
1951 4ed9f614 2019-08-04 stsp .Cm got unstage
1952 4ed9f614 2019-08-04 stsp before it can be updated with
1953 4ed9f614 2019-08-04 stsp .Cm got update ,
1954 4ed9f614 2019-08-04 stsp and may then be staged again if necessary.
1955 4ed9f614 2019-08-04 stsp .It Cm sg
1956 4ed9f614 2019-08-04 stsp Short alias for
1957 4ed9f614 2019-08-04 stsp .Cm stage .
1958 dfc23429 2019-08-11 stsp .It Cm unstage Oo Fl p Oc Oo Fl F Ar response-script Oc Op Ar path ...
1959 4ed9f614 2019-08-04 stsp Merge staged changes back into the work tree and put affected paths
1960 4ed9f614 2019-08-04 stsp back into non-staged status.
1961 4ed9f614 2019-08-04 stsp If no
1962 4ed9f614 2019-08-04 stsp .Ar path
1963 4ed9f614 2019-08-04 stsp is specified, unstage all staged changes across the entire work tree.
1964 2db2652d 2019-08-07 stsp Otherwise, unstage changes at or within the specified paths.
1965 4ed9f614 2019-08-04 stsp .Pp
1966 4ed9f614 2019-08-04 stsp Show the status of each affected file, using the following status codes:
1967 4ed9f614 2019-08-04 stsp .Bl -column YXZ description
1968 4ed9f614 2019-08-04 stsp .It G Ta file was unstaged
1969 4ed9f614 2019-08-04 stsp .It C Ta file was unstaged and conflicts occurred during merge
1970 4ed9f614 2019-08-04 stsp .It ! Ta changes destined for a missing file were not merged
1971 4ed9f614 2019-08-04 stsp .It D Ta file was staged as deleted and still is deleted
1972 4ed9f614 2019-08-04 stsp .It d Ta file's deletion was obstructed by local modifications
1973 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1974 4ed9f614 2019-08-04 stsp .El
1975 2e1f37b0 2019-08-08 stsp .Pp
1976 2e1f37b0 2019-08-08 stsp The options for
1977 2e1f37b0 2019-08-08 stsp .Cm got unstage
1978 2e1f37b0 2019-08-08 stsp are as follows:
1979 2e1f37b0 2019-08-08 stsp .Bl -tag -width Ds
1980 2e1f37b0 2019-08-08 stsp .It Fl p
1981 2e1f37b0 2019-08-08 stsp Instead of unstaging the entire content of a changed file, interactively
1982 2e1f37b0 2019-08-08 stsp select or reject changes for unstaging based on
1983 2e1f37b0 2019-08-08 stsp .Dq y
1984 2e1f37b0 2019-08-08 stsp (unstage change),
1985 2e1f37b0 2019-08-08 stsp .Dq n
1986 2e1f37b0 2019-08-08 stsp (keep change staged), and
1987 2e1f37b0 2019-08-08 stsp .Dq q
1988 2e1f37b0 2019-08-08 stsp (quit unstaging this file) responses.
1989 2e1f37b0 2019-08-08 stsp If a file is staged in modified status, individual patches derived from the
1990 2e1f37b0 2019-08-08 stsp staged file content can be unstaged.
1991 2e1f37b0 2019-08-08 stsp Files staged in added or deleted status may only be unstaged in their entirety.
1992 2e1f37b0 2019-08-08 stsp .It Fl F Ar response-script
1993 2e1f37b0 2019-08-08 stsp With the
1994 2e1f37b0 2019-08-08 stsp .Fl p
1995 2e1f37b0 2019-08-08 stsp option, read
1996 2e1f37b0 2019-08-08 stsp .Dq y ,
1997 2e1f37b0 2019-08-08 stsp .Dq n ,
1998 2e1f37b0 2019-08-08 stsp and
1999 2e1f37b0 2019-08-08 stsp .Dq q
2000 2e1f37b0 2019-08-08 stsp responses line-by-line from the specified
2001 2e1f37b0 2019-08-08 stsp .Ar response-script
2002 2e1f37b0 2019-08-08 stsp file instead of prompting interactively.
2003 2e1f37b0 2019-08-08 stsp .El
2004 4ed9f614 2019-08-04 stsp .It Cm ug
2005 4ed9f614 2019-08-04 stsp Short alias for
2006 4ed9f614 2019-08-04 stsp .Cm unstage .
2007 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 ...
2008 896e9b6f 2019-08-26 stsp Parse and print contents of objects to standard output in a line-based
2009 896e9b6f 2019-08-26 stsp text format.
2010 896e9b6f 2019-08-26 stsp Content of commit, tree, and tag objects is printed in a way similar
2011 896e9b6f 2019-08-26 stsp to the actual content stored in such objects.
2012 896e9b6f 2019-08-26 stsp Blob object contents are printed as they would appear in files on disk.
2013 896e9b6f 2019-08-26 stsp .Pp
2014 896e9b6f 2019-08-26 stsp Attempt to interpret each argument as a reference, a tag name, or
2015 896e9b6f 2019-08-26 stsp an object ID SHA1 hash.
2016 01073a5d 2019-08-22 stsp References will be resolved to an object ID.
2017 01073a5d 2019-08-22 stsp Tag names will resolved to a tag object.
2018 01073a5d 2019-08-22 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
2019 01073a5d 2019-08-22 stsp automatically, provided the abbreviation is unique.
2020 01073a5d 2019-08-22 stsp .Pp
2021 896e9b6f 2019-08-26 stsp If none of the above interpretations produce a valid result, or if the
2022 896e9b6f 2019-08-26 stsp .Fl P
2023 896e9b6f 2019-08-26 stsp option is used, attempt to interpret the argument as a path which will
2024 896e9b6f 2019-08-26 stsp be resolved to the ID of an object found at this path in the repository.
2025 896e9b6f 2019-08-26 stsp .Pp
2026 01073a5d 2019-08-22 stsp The options for
2027 01073a5d 2019-08-22 stsp .Cm got cat
2028 01073a5d 2019-08-22 stsp are as follows:
2029 01073a5d 2019-08-22 stsp .Bl -tag -width Ds
2030 896e9b6f 2019-08-26 stsp .It Fl c Ar commit
2031 896e9b6f 2019-08-26 stsp Look up paths in the specified
2032 896e9b6f 2019-08-26 stsp .Ar commit .
2033 896e9b6f 2019-08-26 stsp If this option is not used, paths are looked up in the commit resolved
2034 896e9b6f 2019-08-26 stsp via the repository's HEAD reference.
2035 896e9b6f 2019-08-26 stsp The expected argument is a commit ID SHA1 hash or an existing reference
2036 896e9b6f 2019-08-26 stsp or tag name which will be resolved to a commit ID.
2037 896e9b6f 2019-08-26 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
2038 896e9b6f 2019-08-26 stsp automatically, provided the abbreviation is unique.
2039 01073a5d 2019-08-22 stsp .It Fl r Ar repository-path
2040 01073a5d 2019-08-22 stsp Use the repository at the specified path.
2041 01073a5d 2019-08-22 stsp If not specified, assume the repository is located at or above the current
2042 01073a5d 2019-08-22 stsp working directory.
2043 01073a5d 2019-08-22 stsp If this directory is a
2044 01073a5d 2019-08-22 stsp .Nm
2045 01073a5d 2019-08-22 stsp work tree, use the repository path associated with this work tree.
2046 896e9b6f 2019-08-26 stsp .It Fl P
2047 896e9b6f 2019-08-26 stsp Interpret all arguments as paths only.
2048 896e9b6f 2019-08-26 stsp This option can be used to resolve ambiguity in cases where paths
2049 896e9b6f 2019-08-26 stsp look like tag names, reference names, or object IDs.
2050 4ed9f614 2019-08-04 stsp .El
2051 b2118c49 2020-07-28 stsp .It Cm info Op Ar path ...
2052 b2118c49 2020-07-28 stsp Display meta-data stored in a work tree.
2053 b2118c49 2020-07-28 stsp See
2054 b2118c49 2020-07-28 stsp .Xr got-worktree 5
2055 b2118c49 2020-07-28 stsp for details.
2056 b2118c49 2020-07-28 stsp .Pp
2057 b2118c49 2020-07-28 stsp The work tree to use is resolved implicitly by walking upwards from the
2058 b2118c49 2020-07-28 stsp current working directory.
2059 b2118c49 2020-07-28 stsp .Pp
2060 b2118c49 2020-07-28 stsp If one or more
2061 b2118c49 2020-07-28 stsp .Ar path
2062 b2118c49 2020-07-28 stsp arguments are specified, show additional per-file information for tracked
2063 b2118c49 2020-07-28 stsp files located at or within these paths.
2064 b2118c49 2020-07-28 stsp If a
2065 b2118c49 2020-07-28 stsp .Ar path
2066 b2118c49 2020-07-28 stsp argument corresponds to the work tree's root directory, display information
2067 b2118c49 2020-07-28 stsp for all tracked files.
2068 01073a5d 2019-08-22 stsp .El
2069 74416c47 2019-05-09 stsp .Sh ENVIRONMENT
2070 74416c47 2019-05-09 stsp .Bl -tag -width GOT_AUTHOR
2071 74416c47 2019-05-09 stsp .It Ev GOT_AUTHOR
2072 74416c47 2019-05-09 stsp The author's name and email address for
2073 21a44f98 2019-07-15 stsp .Cm got commit
2074 21a44f98 2019-07-15 stsp and
2075 21a44f98 2019-07-15 stsp .Cm got import ,
2076 74416c47 2019-05-09 stsp for example:
2077 aba9c984 2019-09-08 stsp .Dq An Flan Hacker Aq Mt flan_hacker@openbsd.org .
2078 84792843 2019-08-09 stsp Because
2079 0e444aba 2019-08-08 stsp .Xr git 1
2080 84792843 2019-08-09 stsp may fail to parse commits without an email address in author data,
2081 0e444aba 2019-08-08 stsp .Nm
2082 84792843 2019-08-09 stsp attempts to reject
2083 0e444aba 2019-08-08 stsp .Ev GOT_AUTHOR
2084 84792843 2019-08-09 stsp environment variables with a missing email address.
2085 c9956ddf 2019-09-08 stsp .Pp
2086 50b0790e 2020-09-11 stsp .Ev GOT_AUTHOR will be overriden by configuration settings in
2087 50b0790e 2020-09-11 stsp .Xr got.conf 5
2088 50b0790e 2020-09-11 stsp or by Git's
2089 aba9c984 2019-09-08 stsp .Dv user.name
2090 aba9c984 2019-09-08 stsp and
2091 709ae9eb 2019-09-08 stsp .Dv user.email
2092 709ae9eb 2019-09-08 stsp configuration settings in the repository's
2093 aba9c984 2019-09-08 stsp .Pa .git/config
2094 50b0790e 2020-09-11 stsp file.
2095 257add31 2020-09-09 stsp The
2096 c9956ddf 2019-09-08 stsp .Dv user.name
2097 c9956ddf 2019-09-08 stsp and
2098 c9956ddf 2019-09-08 stsp .Dv user.email
2099 c9956ddf 2019-09-08 stsp configuration settings contained in Git's global
2100 c9956ddf 2019-09-08 stsp .Pa ~/.gitconfig
2101 257add31 2020-09-09 stsp configuration file will only be used if neither
2102 257add31 2020-09-09 stsp .Xr got.conf 5
2103 257add31 2020-09-09 stsp nor the
2104 c9956ddf 2019-09-08 stsp .Ev GOT_AUTHOR
2105 257add31 2020-09-09 stsp environment variable provide author information.
2106 1dd86744 2019-08-12 anthony .It Ev VISUAL , EDITOR
2107 23594da9 2019-05-13 stsp The editor spawned by
2108 8e7bd50a 2019-08-22 stsp .Cm got commit ,
2109 46215d2a 2020-09-11 stsp .Cm got histedit ,
2110 8e7bd50a 2019-08-22 stsp .Cm got import ,
2111 8e7bd50a 2019-08-22 stsp or
2112 8e7bd50a 2019-08-22 stsp .Cm got tag .
2113 5b735925 2020-09-15 stsp If not set, the
2114 5b735925 2020-09-15 stsp .Xr ed 1
2115 5b735925 2020-09-15 stsp text editor will be spawned in order to give
2116 5b735925 2020-09-15 stsp .Xr ed 1
2117 5b735925 2020-09-15 stsp the attention it deserves.
2118 b1ebc001 2019-08-13 stsp .It Ev GOT_LOG_DEFAULT_LIMIT
2119 b1ebc001 2019-08-13 stsp The default limit on the number of commits traversed by
2120 b1ebc001 2019-08-13 stsp .Cm got log .
2121 b1ebc001 2019-08-13 stsp If set to zero, the limit is unbounded.
2122 b1ebc001 2019-08-13 stsp This variable will be silently ignored if it is set to a non-numeric value.
2123 74416c47 2019-05-09 stsp .El
2124 257add31 2020-09-09 stsp .Sh FILES
2125 257add31 2020-09-09 stsp .Bl -tag -width packed-refs -compact
2126 257add31 2020-09-09 stsp .It Pa got.conf
2127 257add31 2020-09-09 stsp Repository-wide configuration settings for
2128 257add31 2020-09-09 stsp .Nm .
2129 50b0790e 2020-09-11 stsp If present, a
2130 50b0790e 2020-09-11 stsp .Xr got.conf 5
2131 50b0790e 2020-09-11 stsp configuration file located in the root directory of a Git repository
2132 50b0790e 2020-09-11 stsp supersedes any relevant settings in Git's
2133 257add31 2020-09-09 stsp .Pa config
2134 257add31 2020-09-09 stsp file.
2135 50b0790e 2020-09-11 stsp .Pp
2136 50b0790e 2020-09-11 stsp .It Pa .got/got.conf
2137 50b0790e 2020-09-11 stsp Worktree-specific configuration settings for
2138 50b0790e 2020-09-11 stsp .Nm .
2139 50b0790e 2020-09-11 stsp If present, a
2140 1795b260 2021-04-02 kn .Xr got.conf 5
2141 50b0790e 2020-09-11 stsp configuration file in the
2142 50b0790e 2020-09-11 stsp .Pa .got
2143 50b0790e 2020-09-11 stsp meta-data directory of a work tree supersedes any relevant settings in
2144 50b0790e 2020-09-11 stsp the repository's
2145 50b0790e 2020-09-11 stsp .Xr got.conf 5
2146 50b0790e 2020-09-11 stsp configuration file and Git's
2147 50b0790e 2020-09-11 stsp .Pa config
2148 50b0790e 2020-09-11 stsp file.
2149 257add31 2020-09-09 stsp .El
2150 5c860e29 2018-03-12 stsp .Sh EXIT STATUS
2151 5c860e29 2018-03-12 stsp .Ex -std got
2152 97925469 2018-03-17 stsp .Sh EXAMPLES
2153 fa6e0e48 2019-05-23 stsp Clone an existing Git repository for use with
2154 fa6e0e48 2019-05-23 stsp .Nm .
2155 fd039d72 2020-03-18 stsp .Pp
2156 fd039d72 2020-03-18 stsp .Dl $ cd /var/git/
2157 fd039d72 2020-03-18 stsp .Dl $ got clone ssh://git@github.com/openbsd/src.git
2158 fd039d72 2020-03-18 stsp .Pp
2159 fd039d72 2020-03-18 stsp Use of HTTP URLs currently requires
2160 fa6e0e48 2019-05-23 stsp .Xr git 1 :
2161 d83d9d5c 2019-05-13 stsp .Pp
2162 fa6e0e48 2019-05-23 stsp .Dl $ cd /var/git/
2163 fa6e0e48 2019-05-23 stsp .Dl $ git clone --bare https://github.com/openbsd/src.git
2164 fa6e0e48 2019-05-23 stsp .Pp
2165 3ce1b845 2019-07-15 stsp Alternatively, for quick and dirty local testing of
2166 3ce1b845 2019-07-15 stsp .Nm
2167 3ce1b845 2019-07-15 stsp a new Git repository could be created and populated with files,
2168 3ce1b845 2019-07-15 stsp e.g. from a temporary CVS checkout located at
2169 3ce1b845 2019-07-15 stsp .Pa /tmp/src :
2170 fa6e0e48 2019-05-23 stsp .Pp
2171 3ce1b845 2019-07-15 stsp .Dl $ got init /var/git/src.git
2172 2930ef13 2019-07-15 stsp .Dl $ got import -r /var/git/src.git -I CVS -I obj /tmp/src
2173 3ce1b845 2019-07-15 stsp .Pp
2174 3ce1b845 2019-07-15 stsp Check out a work tree from the Git repository to /usr/src:
2175 3ce1b845 2019-07-15 stsp .Pp
2176 fa6e0e48 2019-05-23 stsp .Dl $ got checkout /var/git/src.git /usr/src
2177 fa6e0e48 2019-05-23 stsp .Pp
2178 e70c17ce 2019-05-22 stsp View local changes in a work tree directory:
2179 e70c17ce 2019-05-22 stsp .Pp
2180 e70c17ce 2019-05-22 stsp .Dl $ got diff | less
2181 33aa809d 2019-08-08 stsp .Pp
2182 081470ac 2020-08-13 stsp In a work tree, display files in a potentially problematic state:
2183 081470ac 2020-08-13 stsp .Pp
2184 081470ac 2020-08-13 stsp .Dl $ got status -s 'C!~?'
2185 081470ac 2020-08-13 stsp .Pp
2186 33aa809d 2019-08-08 stsp Interactively revert selected local changes in a work tree directory:
2187 e70c17ce 2019-05-22 stsp .Pp
2188 33aa809d 2019-08-08 stsp .Dl $ got revert -p -R\ .
2189 33aa809d 2019-08-08 stsp .Pp
2190 e70c17ce 2019-05-22 stsp In a work tree or a git repository directory, list all branch references:
2191 e70c17ce 2019-05-22 stsp .Pp
2192 4e759de4 2019-06-26 stsp .Dl $ got branch -l
2193 e70c17ce 2019-05-22 stsp .Pp
2194 fa6e0e48 2019-05-23 stsp In a work tree or a git repository directory, create a new branch called
2195 e70c17ce 2019-05-22 stsp .Dq unified-buffer-cache
2196 d83d9d5c 2019-05-13 stsp which is forked off the
2197 d83d9d5c 2019-05-13 stsp .Dq master
2198 d83d9d5c 2019-05-13 stsp branch:
2199 d83d9d5c 2019-05-13 stsp .Pp
2200 7b4f1fcb 2021-01-27 stsp .Dl $ got branch -c master unified-buffer-cache
2201 e70c17ce 2019-05-22 stsp .Pp
2202 e70c17ce 2019-05-22 stsp Switch an existing work tree to the branch
2203 e70c17ce 2019-05-22 stsp .Dq unified-buffer-cache .
2204 e70c17ce 2019-05-22 stsp Local changes in the work tree will be preserved and merged if necessary:
2205 e70c17ce 2019-05-22 stsp .Pp
2206 e70c17ce 2019-05-22 stsp .Dl $ got update -b unified-buffer-cache
2207 e70c17ce 2019-05-22 stsp .Pp
2208 fa6e0e48 2019-05-23 stsp Create a new commit from local changes in a work tree directory.
2209 fa6e0e48 2019-05-23 stsp This new commit will become the head commit of the work tree's current branch:
2210 fa6e0e48 2019-05-23 stsp .Pp
2211 fa6e0e48 2019-05-23 stsp .Dl $ got commit
2212 fa6e0e48 2019-05-23 stsp .Pp
2213 fa6e0e48 2019-05-23 stsp In a work tree or a git repository directory, view changes committed in
2214 fa6e0e48 2019-05-23 stsp the 3 most recent commits to the work tree's branch, or the branch resolved
2215 fa6e0e48 2019-05-23 stsp via the repository's HEAD reference, respectively:
2216 fa6e0e48 2019-05-23 stsp .Pp
2217 48c8c60d 2020-01-27 stsp .Dl $ got log -p -l 3
2218 04e9dcf3 2020-04-18 stsp .Pp
2219 3d0ac559 2020-04-18 stsp As above, but display changes in the order in which
2220 04e9dcf3 2020-04-18 stsp .Xr patch 1
2221 04e9dcf3 2020-04-18 stsp could apply them in sequence:
2222 5b666081 2020-02-24 stsp .Pp
2223 04e9dcf3 2020-04-18 stsp .Dl $ got log -p -l 3 -R
2224 04e9dcf3 2020-04-18 stsp .Pp
2225 5b666081 2020-02-24 stsp In a work tree or a git repository directory, log the history of a subdirectory:
2226 5b666081 2020-02-24 stsp .Pp
2227 5b666081 2020-02-24 stsp .Dl $ got log sys/uvm
2228 5b666081 2020-02-24 stsp .Pp
2229 5b666081 2020-02-24 stsp While operating inside a work tree, paths are specified relative to the current
2230 5b666081 2020-02-24 stsp working directory, so this command will log the subdirectory
2231 5b666081 2020-02-24 stsp .Pa sys/uvm :
2232 fa6e0e48 2019-05-23 stsp .Pp
2233 cf07f22b 2020-07-25 stsp .Dl $ cd sys/uvm && got log\ .
2234 5b666081 2020-02-24 stsp .Pp
2235 5b666081 2020-02-24 stsp And this command has the same effect:
2236 5b666081 2020-02-24 stsp .Pp
2237 5b666081 2020-02-24 stsp .Dl $ cd sys/dev/usb && got log ../../uvm
2238 5b666081 2020-02-24 stsp .Pp
2239 b2118c49 2020-07-28 stsp And this command displays work tree meta-data about all tracked files:
2240 b2118c49 2020-07-28 stsp .Pp
2241 b2118c49 2020-07-28 stsp .Dl $ cd /usr/src
2242 b2118c49 2020-07-28 stsp .Dl $ got info\ . | less
2243 b2118c49 2020-07-28 stsp .Pp
2244 e70c17ce 2019-05-22 stsp Add new files and remove obsolete files in a work tree directory:
2245 e70c17ce 2019-05-22 stsp .Pp
2246 fa6e0e48 2019-05-23 stsp .Dl $ got add sys/uvm/uvm_ubc.c
2247 86d25a1b 2019-07-11 stsp .Dl $ got remove sys/uvm/uvm_vnode.c
2248 e70c17ce 2019-05-22 stsp .Pp
2249 e70c17ce 2019-05-22 stsp Create a new commit from local changes in a work tree directory
2250 e70c17ce 2019-05-22 stsp with a pre-defined log message.
2251 e70c17ce 2019-05-22 stsp .Pp
2252 e70c17ce 2019-05-22 stsp .Dl $ got commit -m 'unify the buffer cache'
2253 95fc3404 2019-07-15 stsp .Pp
2254 bcbc2272 2020-05-20 stsp Alternatively, create a new commit from local changes in a work tree
2255 bcbc2272 2020-05-20 stsp directory with a log message that has been prepared in the file
2256 1795b260 2021-04-02 kn .Pa /tmp/msg :
2257 bcbc2272 2020-05-20 stsp .Pp
2258 28cf319f 2021-01-28 stsp .Dl $ got commit -F /tmp/msg
2259 bcbc2272 2020-05-20 stsp .Pp
2260 95fc3404 2019-07-15 stsp Update any work tree checked out from the
2261 95fc3404 2019-07-15 stsp .Dq unified-buffer-cache
2262 95fc3404 2019-07-15 stsp branch to the latest commit on this branch:
2263 95fc3404 2019-07-15 stsp .Pp
2264 95fc3404 2019-07-15 stsp .Dl $ got update
2265 ac90e726 2019-07-15 stsp .Pp
2266 c991308a 2019-07-15 stsp Roll file content on the unified-buffer-cache branch back by one commit,
2267 c991308a 2019-07-15 stsp and then fetch the rolled-back change into the work tree as a local change
2268 ac90e726 2019-07-15 stsp to be amended and perhaps committed again:
2269 e70c17ce 2019-05-22 stsp .Pp
2270 ac90e726 2019-07-15 stsp .Dl $ got backout unified-buffer-cache
2271 ac90e726 2019-07-15 stsp .Dl $ got commit -m 'roll back previous'
2272 59d52b88 2019-07-15 stsp .Dl $ # now back out the previous backout :-)
2273 ac90e726 2019-07-15 stsp .Dl $ got backout unified-buffer-cache
2274 ac90e726 2019-07-15 stsp .Pp
2275 469dd726 2020-03-20 stsp Fetch new upstream commits into the local repository's
2276 469dd726 2020-03-20 stsp .Dq origin/master
2277 469dd726 2020-03-20 stsp branch:
2278 fa6e0e48 2019-05-23 stsp .Pp
2279 469dd726 2020-03-20 stsp .Dl $ cd /usr/src
2280 469dd726 2020-03-20 stsp .Dl $ got fetch
2281 469dd726 2020-03-20 stsp .Pp
2282 469dd726 2020-03-20 stsp In a repository created with a HTTP URL and
2283 469dd726 2020-03-20 stsp .Cm git clone --bare
2284 469dd726 2020-03-20 stsp the
2285 469dd726 2020-03-20 stsp .Xr git-fetch 1
2286 469dd726 2020-03-20 stsp command must be used instead:
2287 469dd726 2020-03-20 stsp .Pp
2288 fa6e0e48 2019-05-23 stsp .Dl $ cd /var/git/src.git
2289 469dd726 2020-03-20 stsp .Dl $ git fetch origin master:refs/remotes/origin/master
2290 fa6e0e48 2019-05-23 stsp .Pp
2291 469dd726 2020-03-20 stsp Rebase the local
2292 469dd726 2020-03-20 stsp .Dq master
2293 469dd726 2020-03-20 stsp branch to merge the new changes that are now visible on the
2294 469dd726 2020-03-20 stsp .Dq origin/master
2295 469dd726 2020-03-20 stsp branch:
2296 469dd726 2020-03-20 stsp .Pp
2297 469dd726 2020-03-20 stsp .Dl $ cd /usr/src
2298 469dd726 2020-03-20 stsp .Dl $ got update -b origin/master
2299 469dd726 2020-03-20 stsp .Dl $ got rebase master
2300 469dd726 2020-03-20 stsp .Pp
2301 fa6e0e48 2019-05-23 stsp Rebase the
2302 fa6e0e48 2019-05-23 stsp .Dq unified-buffer-cache
2303 fa6e0e48 2019-05-23 stsp branch on top of the new head commit of the
2304 fa6e0e48 2019-05-23 stsp .Dq master
2305 fa6e0e48 2019-05-23 stsp branch.
2306 fa6e0e48 2019-05-23 stsp .Pp
2307 818c7501 2019-07-11 stsp .Dl $ got update -b master
2308 818c7501 2019-07-11 stsp .Dl $ got rebase unified-buffer-cache
2309 7d7ffedb 2019-07-14 stsp .Pp
2310 7d7ffedb 2019-07-14 stsp Create a patch from all changes on the unified-buffer-cache branch.
2311 1dd86744 2019-08-12 anthony The patch can be mailed out for review and applied to
2312 1dd86744 2019-08-12 anthony .Ox Ns 's
2313 1dd86744 2019-08-12 anthony CVS tree:
2314 7d7ffedb 2019-07-14 stsp .Pp
2315 7d7ffedb 2019-07-14 stsp .Dl $ got diff master unified-buffer-cache > /tmp/ubc.diff
2316 7d7ffedb 2019-07-14 stsp .Pp
2317 0ebf8283 2019-07-24 stsp Edit the entire commit history of the
2318 0ebf8283 2019-07-24 stsp .Dq unified-buffer-cache
2319 0ebf8283 2019-07-24 stsp branch:
2320 0ebf8283 2019-07-24 stsp .Pp
2321 0ebf8283 2019-07-24 stsp .Dl $ got update -b unified-buffer-cache
2322 0ebf8283 2019-07-24 stsp .Dl $ got update -c master
2323 0ebf8283 2019-07-24 stsp .Dl $ got histedit
2324 bf390dec 2020-03-20 stsp .Pp
2325 bf390dec 2020-03-20 stsp In order to merge changes committed to the
2326 bf390dec 2020-03-20 stsp .Dq unified-buffer-cache
2327 bf390dec 2020-03-20 stsp branch back into the
2328 bf390dec 2020-03-20 stsp .Dq master
2329 bf390dec 2020-03-20 stsp branch, the
2330 bf390dec 2020-03-20 stsp .Dq unified-buffer-cache
2331 bf390dec 2020-03-20 stsp branch must first be rebased onto the
2332 bf390dec 2020-03-20 stsp .Dq master
2333 bf390dec 2020-03-20 stsp branch:
2334 bf390dec 2020-03-20 stsp .Pp
2335 bf390dec 2020-03-20 stsp .Dl $ got update -b master
2336 bf390dec 2020-03-20 stsp .Dl $ got rebase unified-buffer-cache
2337 bf390dec 2020-03-20 stsp .Pp
2338 bf390dec 2020-03-20 stsp Changes on the
2339 bf390dec 2020-03-20 stsp .Dq unified-buffer-cache
2340 bf390dec 2020-03-20 stsp branch can now be made visible on the
2341 bf390dec 2020-03-20 stsp .Dq master
2342 bf390dec 2020-03-20 stsp branch with
2343 bf390dec 2020-03-20 stsp .Cm got integrate .
2344 bf390dec 2020-03-20 stsp Because the rebase operation switched the work tree to the
2345 bf390dec 2020-03-20 stsp .Dq unified-buffer-cache
2346 bf390dec 2020-03-20 stsp branch, the work tree must be switched back to the
2347 bf390dec 2020-03-20 stsp .Dq master
2348 bf390dec 2020-03-20 stsp branch before the
2349 bf390dec 2020-03-20 stsp .Dq unified-buffer-cache
2350 bf390dec 2020-03-20 stsp branch can be integrated into
2351 bf390dec 2020-03-20 stsp .Dq master :
2352 ff2cf171 2019-07-28 stsp .Pp
2353 bf390dec 2020-03-20 stsp .Dl $ got update -b master
2354 bf390dec 2020-03-20 stsp .Dl $ got integrate unified-buffer-cache
2355 469dd726 2020-03-20 stsp .Pp
2356 469dd726 2020-03-20 stsp Additional steps may be necessary if local changes need to be pushed back
2357 7b3fde24 2019-07-28 stsp to the remote repository, which currently requires
2358 7b3fde24 2019-07-28 stsp .Cm git push .
2359 ff2cf171 2019-07-28 stsp Before working against existing branches in a repository cloned with
2360 469dd726 2020-03-20 stsp .Cm git clone --bare
2361 7848a0e1 2020-03-19 stsp instead of
2362 7848a0e1 2020-03-19 stsp .Cm got clone ,
2363 ff2cf171 2019-07-28 stsp a Git
2364 ff2cf171 2019-07-28 stsp .Dq refspec
2365 ff2cf171 2019-07-28 stsp must be configured to map all references in the remote repository
2366 ff2cf171 2019-07-28 stsp into the
2367 ff2cf171 2019-07-28 stsp .Dq refs/remotes
2368 ff2cf171 2019-07-28 stsp namespace of the local repository.
2369 1795b260 2021-04-02 kn This can be achieved by setting Git's
2370 ff2cf171 2019-07-28 stsp .Pa remote.origin.fetch
2371 ff2cf171 2019-07-28 stsp configuration variable to the value
2372 ff2cf171 2019-07-28 stsp .Dq +refs/heads/*:refs/remotes/origin/*
2373 ff2cf171 2019-07-28 stsp with the
2374 ff2cf171 2019-07-28 stsp .Cm git config
2375 ff2cf171 2019-07-28 stsp command:
2376 ff2cf171 2019-07-28 stsp .Pp
2377 ff2cf171 2019-07-28 stsp .Dl $ cd /var/git/repo
2378 ff2cf171 2019-07-28 stsp .Dl $ git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
2379 eac81709 2020-03-21 stsp .Pp
2380 469dd726 2020-03-20 stsp Additionally, the
2381 469dd726 2020-03-20 stsp .Dq mirror
2382 469dd726 2020-03-20 stsp option must be disabled:
2383 ff2cf171 2019-07-28 stsp .Pp
2384 469dd726 2020-03-20 stsp .Dl $ cd /var/git/repo
2385 469dd726 2020-03-20 stsp .Dl $ git config remote.origin.mirror false
2386 469dd726 2020-03-20 stsp .Pp
2387 ff2cf171 2019-07-28 stsp Alternatively, the following
2388 469dd726 2020-03-20 stsp .Xr git-fetch 1
2389 ff2cf171 2019-07-28 stsp configuration item can be added manually to the Git repository's
2390 ff2cf171 2019-07-28 stsp .Pa config
2391 ff2cf171 2019-07-28 stsp file:
2392 0ebf8283 2019-07-24 stsp .Pp
2393 91c82228 2021-04-18 stsp .Dl [remote \&"origin\&"]
2394 ff2cf171 2019-07-28 stsp .Dl url = ...
2395 ff2cf171 2019-07-28 stsp .Dl fetch = +refs/heads/*:refs/remotes/origin/*
2396 469dd726 2020-03-20 stsp .Dl mirror = false
2397 ff2cf171 2019-07-28 stsp .Pp
2398 fe307c9b 2019-07-28 stsp This configuration leaves the local repository's
2399 ff2cf171 2019-07-28 stsp .Dq refs/heads
2400 ff2cf171 2019-07-28 stsp namespace free for use by local branches checked out with
2401 ff2cf171 2019-07-28 stsp .Cm got checkout
2402 ff2cf171 2019-07-28 stsp and, if needed, created with
2403 ff2cf171 2019-07-28 stsp .Cm got branch .
2404 ff2cf171 2019-07-28 stsp .Pp
2405 ff2cf171 2019-07-28 stsp Branches in the
2406 ff2cf171 2019-07-28 stsp .Dq remotes/origin
2407 469dd726 2020-03-20 stsp namespace can now be updated with incoming changes from the remote
2408 ff2cf171 2019-07-28 stsp repository with
2409 469dd726 2020-03-20 stsp .Cm got fetch
2410 469dd726 2020-03-20 stsp or
2411 469dd726 2020-03-20 stsp .Xr git-fetch 1
2412 469dd726 2020-03-20 stsp without extra command line arguments:
2413 ff2cf171 2019-07-28 stsp .Pp
2414 ff2cf171 2019-07-28 stsp .Dl $ cd /var/git/repo
2415 469dd726 2020-03-20 stsp .Dl $ git fetch
2416 ff2cf171 2019-07-28 stsp .Pp
2417 7b0db533 2020-02-04 stsp To make changes fetched from the remote repository appear on the
2418 ff2cf171 2019-07-28 stsp .Dq master
2419 7b0db533 2020-02-04 stsp branch, the
2420 ff2cf171 2019-07-28 stsp .Dq master
2421 ff2cf171 2019-07-28 stsp branch must be rebased onto the
2422 ff2cf171 2019-07-28 stsp .Dq origin/master
2423 7b0db533 2020-02-04 stsp branch.
2424 7b0db533 2020-02-04 stsp This will also merge local changes, if any, with the incoming changes:
2425 ff2cf171 2019-07-28 stsp .Pp
2426 ff2cf171 2019-07-28 stsp .Dl $ got update -b origin/master
2427 ff2cf171 2019-07-28 stsp .Dl $ got rebase master
2428 083957f4 2020-02-24 stsp .Pp
2429 083957f4 2020-02-24 stsp On the
2430 083957f4 2020-02-24 stsp .Dq master
2431 083957f4 2020-02-24 stsp branch, log messages for local changes can now be amended with
2432 083957f4 2020-02-24 stsp .Dq OK
2433 083957f4 2020-02-24 stsp by other developers and any other important new information:
2434 ff2cf171 2019-07-28 stsp .Pp
2435 083957f4 2020-02-24 stsp .Dl $ got update -c origin/master
2436 083957f4 2020-02-24 stsp .Dl $ got histedit -m
2437 083957f4 2020-02-24 stsp .Pp
2438 7b0db533 2020-02-04 stsp Local changes on the
2439 ff2cf171 2019-07-28 stsp .Dq master
2440 ff2cf171 2019-07-28 stsp branch can then be pushed to the remote
2441 ff2cf171 2019-07-28 stsp repository with
2442 ff2cf171 2019-07-28 stsp .Cm git push :
2443 ff2cf171 2019-07-28 stsp .Pp
2444 ff2cf171 2019-07-28 stsp .Dl $ cd /var/git/repo
2445 ff2cf171 2019-07-28 stsp .Dl $ git push origin master
2446 5c860e29 2018-03-12 stsp .Sh SEE ALSO
2447 0a79feb1 2021-04-10 stsp .Xr gotadmin 1 ,
2448 2312fc47 2019-07-15 stsp .Xr tog 1 ,
2449 2312fc47 2019-07-15 stsp .Xr git-repository 5 ,
2450 257add31 2020-09-09 stsp .Xr got-worktree 5 ,
2451 257add31 2020-09-09 stsp .Xr got.conf 5
2452 1a208aaf 2018-04-01 stsp .Sh AUTHORS
2453 1a208aaf 2018-04-01 stsp .An Stefan Sperling Aq Mt stsp@openbsd.org
2454 1a208aaf 2018-04-01 stsp .An Martin Pieuchot Aq Mt mpi@openbsd.org
2455 bc3056e3 2019-08-18 stsp .An Joshua Stein Aq Mt jcs@openbsd.org
2456 83b416ed 2020-03-18 stsp .An Ori Bernstein Aq Mt ori@openbsd.org
2457 fa6e0e48 2019-05-23 stsp .Sh CAVEATS
2458 fa6e0e48 2019-05-23 stsp .Nm
2459 cc63216e 2020-12-26 stsp is a work-in-progress and some features remain to be implemented.
2460 1795b260 2021-04-02 kn .Pp
2461 fa6e0e48 2019-05-23 stsp At present, the user has to fall back on
2462 fa6e0e48 2019-05-23 stsp .Xr git 1
2463 cc63216e 2020-12-26 stsp to perform some tasks.
2464 cc63216e 2020-12-26 stsp In particular:
2465 cc63216e 2020-12-26 stsp .Bl -bullet
2466 cc63216e 2020-12-26 stsp .It
2467 cc63216e 2020-12-26 stsp Reading from remote repositories over HTTP or HTTPS protocols requires
2468 cc63216e 2020-12-26 stsp .Xr git-clone 1
2469 cc63216e 2020-12-26 stsp and
2470 cc63216e 2020-12-26 stsp .Xr git-fetch 1 .
2471 cc63216e 2020-12-26 stsp .It
2472 cc63216e 2020-12-26 stsp Writing to remote repositories, over any protocol, requires
2473 cc63216e 2020-12-26 stsp .Xr git-push 1 .
2474 cc63216e 2020-12-26 stsp .It
2475 cc63216e 2020-12-26 stsp The creation of merge commits, i.e. commits with two or more parent commits,
2476 cc63216e 2020-12-26 stsp requires
2477 cc63216e 2020-12-26 stsp .Xr git-merge 1 .
2478 cc63216e 2020-12-26 stsp .It
2479 cc63216e 2020-12-26 stsp In situations where files or directories were moved around
2480 cc63216e 2020-12-26 stsp .Cm got
2481 cc63216e 2020-12-26 stsp will not automatically merge changes to new locations and
2482 cc63216e 2020-12-26 stsp .Xr git 1
2483 cc63216e 2020-12-26 stsp will usually produce better results.
2484 cc63216e 2020-12-26 stsp .El