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