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