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