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 83cd27f8 2020-01-13 stsp .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 bc26cce8 2019-08-04 stsp .It Cm in
77 bc26cce8 2019-08-04 stsp Short alias for
78 bc26cce8 2019-08-04 stsp .Cm init .
79 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
80 3ce1b845 2019-07-15 stsp Create an initial commit in a repository from the file hierarchy
81 3ce1b845 2019-07-15 stsp within the specified
82 3ce1b845 2019-07-15 stsp .Ar directory .
83 3ce1b845 2019-07-15 stsp The created commit will not have any parent commits, i.e. it will be a
84 3ce1b845 2019-07-15 stsp root commit.
85 3ce1b845 2019-07-15 stsp Also create a new reference which provides a branch name for the newly
86 3ce1b845 2019-07-15 stsp created commit.
87 21a44f98 2019-07-15 stsp Show the path of each imported file to indicate progress.
88 3ce1b845 2019-07-15 stsp .Pp
89 21a44f98 2019-07-15 stsp The
90 21a44f98 2019-07-15 stsp .Cm got import
91 21a44f98 2019-07-15 stsp command requires the
92 21a44f98 2019-07-15 stsp .Ev GOT_AUTHOR
93 aba9c984 2019-09-08 stsp environment variable to be set,
94 aba9c984 2019-09-08 stsp unless Git's
95 aba9c984 2019-09-08 stsp .Dv user.name
96 aba9c984 2019-09-08 stsp and
97 709ae9eb 2019-09-08 stsp .Dv user.email
98 709ae9eb 2019-09-08 stsp configuration settings can be obtained from the repository's
99 aba9c984 2019-09-08 stsp .Pa .git/config
100 c9956ddf 2019-09-08 stsp file or from Git's global
101 c9956ddf 2019-09-08 stsp .Pa ~/.gitconfig
102 c9956ddf 2019-09-08 stsp configuration file.
103 3ce1b845 2019-07-15 stsp .Pp
104 3ce1b845 2019-07-15 stsp The options for
105 3ce1b845 2019-07-15 stsp .Cm got import
106 3ce1b845 2019-07-15 stsp are as follows:
107 3ce1b845 2019-07-15 stsp .Bl -tag -width Ds
108 3ce1b845 2019-07-15 stsp .It Fl b Ar branch
109 3ce1b845 2019-07-15 stsp Create the specified
110 3ce1b845 2019-07-15 stsp .Ar branch
111 3ce1b845 2019-07-15 stsp instead of creating the default branch
112 5d67f40d 2019-11-08 stsp .Dq main .
113 3ce1b845 2019-07-15 stsp Use of this option is required if the
114 5d67f40d 2019-11-08 stsp .Dq main
115 3ce1b845 2019-07-15 stsp branch already exists.
116 3ce1b845 2019-07-15 stsp .It Fl m Ar message
117 3ce1b845 2019-07-15 stsp Use the specified log message when creating the new commit.
118 3ce1b845 2019-07-15 stsp Without the
119 3ce1b845 2019-07-15 stsp .Fl m
120 3ce1b845 2019-07-15 stsp option,
121 3ce1b845 2019-07-15 stsp .Cm got import
122 3ce1b845 2019-07-15 stsp opens a temporary file in an editor where a log message can be written.
123 3ce1b845 2019-07-15 stsp .It Fl r Ar repository-path
124 3ce1b845 2019-07-15 stsp Use the repository at the specified path.
125 3ce1b845 2019-07-15 stsp If not specified, assume the repository is located at or above the current
126 3ce1b845 2019-07-15 stsp working directory.
127 3ce1b845 2019-07-15 stsp .It Fl I Ar pattern
128 3ce1b845 2019-07-15 stsp Ignore files or directories with a name which matches the specified
129 3ce1b845 2019-07-15 stsp .Ar pattern .
130 3ce1b845 2019-07-15 stsp This option may be specified multiple times to build a list of ignore patterns.
131 3ce1b845 2019-07-15 stsp The
132 3ce1b845 2019-07-15 stsp .Ar pattern
133 3ce1b845 2019-07-15 stsp follows the globbing rules documented in
134 3ce1b845 2019-07-15 stsp .Xr glob 7 .
135 3ce1b845 2019-07-15 stsp .El
136 bc26cce8 2019-08-04 stsp .It Cm im
137 bc26cce8 2019-08-04 stsp Short alias for
138 bc26cce8 2019-08-04 stsp .Cm import .
139 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
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 2ab43947 2020-03-18 stsp 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 7848a0e1 2020-03-19 stsp .Pa config
193 7848a0e1 2020-03-19 stsp file of the cloned repository to store the
194 7848a0e1 2020-03-19 stsp .Ar repository-url
195 7848a0e1 2020-03-19 stsp for future use by
196 7848a0e1 2020-03-19 stsp .Cm got fetch
197 7848a0e1 2020-03-19 stsp and
198 7848a0e1 2020-03-19 stsp .Xr git-fetch 1 .
199 7848a0e1 2020-03-19 stsp .Pp
200 2ab43947 2020-03-18 stsp The options for
201 2ab43947 2020-03-18 stsp .Cm got clone
202 2ab43947 2020-03-18 stsp are as follows:
203 2ab43947 2020-03-18 stsp .Bl -tag -width Ds
204 659e7fbd 2020-03-20 stsp .It Fl a
205 1d4b192f 2020-03-21 stsp Fetch all branches from the remote repository's
206 1d4b192f 2020-03-21 stsp .Dq refs/heads/
207 1d4b192f 2020-03-21 stsp reference namespace.
208 4ba14133 2020-03-20 stsp If this option is not specified, a branch resolved via the remote
209 4ba14133 2020-03-20 stsp repository's HEAD reference will be fetched.
210 4ba14133 2020-03-20 stsp Cannot be used together with the
211 4ba14133 2020-03-20 stsp .Fl b
212 4ba14133 2020-03-20 stsp option.
213 4ba14133 2020-03-20 stsp .It Fl b Ar branch
214 4ba14133 2020-03-20 stsp Fetch the specified
215 4ba14133 2020-03-20 stsp .Ar branch
216 1d4b192f 2020-03-21 stsp from the remote repository's
217 1d4b192f 2020-03-21 stsp .Dq refs/heads/
218 1d4b192f 2020-03-21 stsp reference namespace.
219 4ba14133 2020-03-20 stsp This option may be specified multiple times to build a list of branches
220 4ba14133 2020-03-20 stsp to fetch.
221 4ba14133 2020-03-20 stsp If the branch corresponding to the remote repository's HEAD reference is not
222 4ba14133 2020-03-20 stsp in this list, the cloned repository's HEAD reference will be set to the first
223 4ba14133 2020-03-20 stsp branch which was fetched.
224 4ba14133 2020-03-20 stsp If this option is not specified, a branch resolved via the remote
225 4ba14133 2020-03-20 stsp repository's HEAD reference will be fetched.
226 4ba14133 2020-03-20 stsp Cannot be used together with the
227 4ba14133 2020-03-20 stsp .Fl a
228 4ba14133 2020-03-20 stsp option.
229 41b0de12 2020-03-21 stsp .It Fl l
230 41b0de12 2020-03-21 stsp List branches and tags available for cloning from the remote repository
231 41b0de12 2020-03-21 stsp and exit immediately.
232 41b0de12 2020-03-21 stsp Cannot be used together with any of the other options except
233 41b0de12 2020-03-21 stsp .Fl v .
234 469dd726 2020-03-20 stsp .It Fl m
235 469dd726 2020-03-20 stsp Create the cloned repository as a mirror of the original repository.
236 469dd726 2020-03-20 stsp This is useful if the cloned repository will not be used to store
237 469dd726 2020-03-20 stsp local changes as created by
238 469dd726 2020-03-20 stsp .Cm got commit .
239 469dd726 2020-03-20 stsp .Pp
240 469dd726 2020-03-20 stsp The repository's
241 469dd726 2020-03-20 stsp .Pa config
242 469dd726 2020-03-20 stsp file will be set up with the
243 469dd726 2020-03-20 stsp .Dq mirror
244 469dd726 2020-03-20 stsp option enabled, such that
245 469dd726 2020-03-20 stsp .Cm got fetch
246 469dd726 2020-03-20 stsp or
247 469dd726 2020-03-20 stsp .Xr git-fetch 1
248 498ef124 2020-03-21 stsp will write incoming changes directly to local branches in the
249 469dd726 2020-03-20 stsp .Dq refs/heads/
250 469dd726 2020-03-20 stsp reference namespace, rather than to branches in the
251 469dd726 2020-03-20 stsp .Dq refs/remotes/
252 469dd726 2020-03-20 stsp namespace.
253 469dd726 2020-03-20 stsp This avoids the usual requirement of having to run
254 469dd726 2020-03-20 stsp .Cm got rebase
255 469dd726 2020-03-20 stsp after
256 469dd726 2020-03-20 stsp .Cm got fetch
257 498ef124 2020-03-21 stsp in order to make incoming changes appear on local branches.
258 498ef124 2020-03-21 stsp But maintaining local changes in the cloned repository becomes difficult
259 498ef124 2020-03-21 stsp since local changes will be at risk of being discarded whenever incoming
260 498ef124 2020-03-21 stsp changes are fetched.
261 2ab43947 2020-03-18 stsp .It Fl q
262 2ab43947 2020-03-18 stsp Suppress progress reporting output.
263 2ab43947 2020-03-18 stsp The same option will be passed to
264 2ab43947 2020-03-18 stsp .Xr ssh 1
265 2ab43947 2020-03-18 stsp if applicable.
266 2ab43947 2020-03-18 stsp .It Fl v
267 2690194b 2020-03-21 stsp Verbose mode.
268 2690194b 2020-03-21 stsp Causes
269 2690194b 2020-03-21 stsp .Cm got clone
270 2690194b 2020-03-21 stsp to print debugging messages to standard error output.
271 2690194b 2020-03-21 stsp This option will be passed to
272 2ab43947 2020-03-18 stsp .Xr ssh 1
273 2ab43947 2020-03-18 stsp if applicable.
274 2ab43947 2020-03-18 stsp Multiple -v options increase the verbosity.
275 2ab43947 2020-03-18 stsp The maximum is 3.
276 0e4002ca 2020-03-21 stsp .It Fl R Ar reference
277 0e4002ca 2020-03-21 stsp In addition to the branches and tags that will be fetched, fetch an arbitrary
278 0e4002ca 2020-03-21 stsp .Ar reference
279 0e4002ca 2020-03-21 stsp from the remote repository's
280 0e4002ca 2020-03-21 stsp .Dq refs/
281 0e4002ca 2020-03-21 stsp namespace.
282 0e4002ca 2020-03-21 stsp This option may be specified multiple times to build a list of additional
283 0e4002ca 2020-03-21 stsp references to fetch.
284 0e4002ca 2020-03-21 stsp .Pp
285 0e4002ca 2020-03-21 stsp The references will be mapped into the cloned repository's
286 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
287 0e4002ca 2020-03-21 stsp namespace, unless the
288 0e4002ca 2020-03-21 stsp .Fl m
289 0e4002ca 2020-03-21 stsp option is used to mirror references directly into the cloned repository's
290 0e4002ca 2020-03-21 stsp .Dq refs/
291 0e4002ca 2020-03-21 stsp namespace.
292 0e4002ca 2020-03-21 stsp .Pp
293 0e4002ca 2020-03-21 stsp .Cm got clone
294 0e4002ca 2020-03-21 stsp will refuse to fetch references from the remote repository's
295 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
296 0e4002ca 2020-03-21 stsp or
297 0e4002ca 2020-03-21 stsp .Dq refs/got/
298 0e4002ca 2020-03-21 stsp namespace.
299 2ab43947 2020-03-18 stsp .El
300 267fe567 2020-03-18 stsp .It Cm cl
301 267fe567 2020-03-18 stsp Short alias for
302 267fe567 2020-03-18 stsp .Cm clone .
303 db6d8ad8 2020-03-21 stsp .It Cm fetch Oo Fl a Oc Oo Fl b Ar branch Oc Oo Fl d Oc Oo Fl l Oc Oo Fl r Ar repository-path Oc Oo Fl t Oc Oo Fl q Oc Oo Fl v Oc Op Ar remote-repository
304 7848a0e1 2020-03-19 stsp Fetch new changes from a remote repository.
305 7848a0e1 2020-03-19 stsp If no
306 4ba14133 2020-03-20 stsp .Ar remote-repository
307 4ba14133 2020-03-20 stsp is specified,
308 7848a0e1 2020-03-19 stsp .Dq origin
309 7848a0e1 2020-03-19 stsp will be used.
310 7848a0e1 2020-03-19 stsp The remote repository's URL is obtained from the corresponding entry in the
311 7848a0e1 2020-03-19 stsp .Pa config
312 f8ab0c60 2020-03-20 stsp file of the local repository, as created by
313 7848a0e1 2020-03-19 stsp .Cm got clone .
314 7848a0e1 2020-03-19 stsp .Pp
315 89c3c67b 2020-03-20 stsp New changes will be stored in a separate pack file downloaded from the server.
316 89c3c67b 2020-03-20 stsp Optionally, separate pack files stored in the repository can be combined with
317 89c3c67b 2020-03-20 stsp .Xr git-repack 1 .
318 89c3c67b 2020-03-20 stsp .Pp
319 498ef124 2020-03-21 stsp By default, branch references in the
320 7848a0e1 2020-03-19 stsp .Dq refs/remotes/
321 498ef124 2020-03-21 stsp reference namespace will be updated to point at the newly fetched commits.
322 498ef124 2020-03-21 stsp The
323 498ef124 2020-03-21 stsp .Cm got rebase
324 498ef124 2020-03-21 stsp command can then be used to make new changes visible on local branches in the
325 7848a0e1 2020-03-19 stsp .Dq refs/heads/
326 498ef124 2020-03-21 stsp namespace, merging incoming changes with local changes as necessary.
327 7848a0e1 2020-03-19 stsp .Pp
328 498ef124 2020-03-21 stsp If the repository was created as a mirror with
329 498ef124 2020-03-21 stsp .Cm got clone -m
330 498ef124 2020-03-21 stsp then all branches in the
331 469dd726 2020-03-20 stsp .Dq refs/heads/
332 498ef124 2020-03-21 stsp namespace will be updated directly to match the corresponding branches in
333 498ef124 2020-03-21 stsp the remote repository.
334 175367bd 2020-03-20 stsp If those branches contained local commits, these commits will no longer be
335 175367bd 2020-03-20 stsp reachable via a reference and will therefore be at risk of being discarded
336 175367bd 2020-03-20 stsp by Git's garbage collector.
337 498ef124 2020-03-21 stsp Maintaining local changes in a mirror repository is therefore discouraged.
338 469dd726 2020-03-20 stsp .Pp
339 db6d8ad8 2020-03-21 stsp In any case, references in the
340 7848a0e1 2020-03-19 stsp .Dq refs/tags/
341 db6d8ad8 2020-03-21 stsp namespace will always be fetched and mapped directly to local references
342 db6d8ad8 2020-03-21 stsp in the same namespace.
343 7848a0e1 2020-03-19 stsp .Pp
344 7848a0e1 2020-03-19 stsp The options for
345 7848a0e1 2020-03-19 stsp .Cm got fetch
346 7848a0e1 2020-03-19 stsp are as follows:
347 7848a0e1 2020-03-19 stsp .Bl -tag -width Ds
348 659e7fbd 2020-03-20 stsp .It Fl a
349 1d4b192f 2020-03-21 stsp Fetch all branches from the remote repository's
350 1d4b192f 2020-03-21 stsp .Dq refs/heads/
351 1d4b192f 2020-03-21 stsp reference namespace.
352 4ba14133 2020-03-20 stsp If this option is not specified, a branch resolved via the remote
353 4ba14133 2020-03-20 stsp repository's HEAD reference will be fetched.
354 4ba14133 2020-03-20 stsp Cannot be used together with the
355 4ba14133 2020-03-20 stsp .Fl b
356 4ba14133 2020-03-20 stsp option.
357 4ba14133 2020-03-20 stsp .It Fl b Ar branch
358 4ba14133 2020-03-20 stsp Fetch the specified
359 4ba14133 2020-03-20 stsp .Ar branch
360 1d4b192f 2020-03-21 stsp from the remote repository's
361 1d4b192f 2020-03-21 stsp .Dq refs/heads/
362 1d4b192f 2020-03-21 stsp reference namespace.
363 4ba14133 2020-03-20 stsp This option may be specified multiple times to build a list of branches
364 4ba14133 2020-03-20 stsp to fetch.
365 4ba14133 2020-03-20 stsp If this option is not specified, a branch resolved via the remote
366 4ba14133 2020-03-20 stsp repository's HEAD reference will be fetched.
367 4ba14133 2020-03-20 stsp Cannot be used together with the
368 4ba14133 2020-03-20 stsp .Fl a
369 4ba14133 2020-03-20 stsp option.
370 f21ec2f0 2020-03-21 stsp .It Fl d
371 f21ec2f0 2020-03-21 stsp Delete branches and tags from the local repository which are no longer
372 f21ec2f0 2020-03-21 stsp present in the remote repository.
373 f21ec2f0 2020-03-21 stsp Only references are deleted.
374 239821eb 2020-03-21 stsp Any commit, tree, tag, and blob objects belonging to deleted branches or
375 f21ec2f0 2020-03-21 stsp tags remain in the repository and may be removed separately with
376 f21ec2f0 2020-03-21 stsp Git's garbage collector.
377 41b0de12 2020-03-21 stsp .It Fl l
378 41b0de12 2020-03-21 stsp List branches and tags available for fetching from the remote repository
379 41b0de12 2020-03-21 stsp and exit immediately.
380 41b0de12 2020-03-21 stsp Cannot be used together with any of the other options except
381 41b0de12 2020-03-21 stsp .Fl v
382 41b0de12 2020-03-21 stsp and
383 41b0de12 2020-03-21 stsp .Fl r .
384 db6d8ad8 2020-03-21 stsp .It Fl t
385 db6d8ad8 2020-03-21 stsp Allow existing references in the
386 db6d8ad8 2020-03-21 stsp .Dq refs/tags
387 db6d8ad8 2020-03-21 stsp namespace to be updated if they have changed on the server.
388 db6d8ad8 2020-03-21 stsp If not specified, only new tag references will be created.
389 7848a0e1 2020-03-19 stsp .It Fl r Ar repository-path
390 7848a0e1 2020-03-19 stsp Use the repository at the specified path.
391 7848a0e1 2020-03-19 stsp If not specified, assume the repository is located at or above the current
392 7848a0e1 2020-03-19 stsp working directory.
393 7848a0e1 2020-03-19 stsp If this directory is a
394 7848a0e1 2020-03-19 stsp .Nm
395 7848a0e1 2020-03-19 stsp work tree, use the repository path associated with this work tree.
396 7848a0e1 2020-03-19 stsp .It Fl q
397 7848a0e1 2020-03-19 stsp Suppress progress reporting output.
398 7848a0e1 2020-03-19 stsp The same option will be passed to
399 7848a0e1 2020-03-19 stsp .Xr ssh 1
400 7848a0e1 2020-03-19 stsp if applicable.
401 7848a0e1 2020-03-19 stsp .It Fl v
402 2690194b 2020-03-21 stsp Verbose mode.
403 2690194b 2020-03-21 stsp Causes
404 2690194b 2020-03-21 stsp .Cm got fetch
405 2690194b 2020-03-21 stsp to print debugging messages to standard error output.
406 7848a0e1 2020-03-19 stsp The same option will be passed to
407 7848a0e1 2020-03-19 stsp .Xr ssh 1
408 7848a0e1 2020-03-19 stsp if applicable.
409 7848a0e1 2020-03-19 stsp Multiple -v options increase the verbosity.
410 7848a0e1 2020-03-19 stsp The maximum is 3.
411 0e4002ca 2020-03-21 stsp .It Fl R Ar reference
412 0e4002ca 2020-03-21 stsp In addition to the branches and tags that will be fetched, fetch an arbitrary
413 0e4002ca 2020-03-21 stsp .Ar reference
414 0e4002ca 2020-03-21 stsp from the remote repository's
415 0e4002ca 2020-03-21 stsp .Dq refs/
416 0e4002ca 2020-03-21 stsp namespace.
417 0e4002ca 2020-03-21 stsp This option may be specified multiple times to build a list of additional
418 0e4002ca 2020-03-21 stsp references to fetch.
419 0e4002ca 2020-03-21 stsp .Pp
420 0e4002ca 2020-03-21 stsp Each reference will be mapped into the local repository's
421 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
422 0e4002ca 2020-03-21 stsp namespace, unless the local repository was created as a mirror with
423 0e4002ca 2020-03-21 stsp .Cm got clone -m .
424 0e4002ca 2020-03-21 stsp Once a reference has been fetched, a local branch based on it can be
425 0e4002ca 2020-03-21 stsp created with
426 0e4002ca 2020-03-21 stsp .Cm got branch
427 0e4002ca 2020-03-21 stsp if needed.
428 0e4002ca 2020-03-21 stsp .Pp
429 0e4002ca 2020-03-21 stsp .Cm got fetch
430 0e4002ca 2020-03-21 stsp will refuse to fetch references from the remote repository's
431 0e4002ca 2020-03-21 stsp .Dq refs/remotes/
432 0e4002ca 2020-03-21 stsp or
433 0e4002ca 2020-03-21 stsp .Dq refs/got/
434 0e4002ca 2020-03-21 stsp namespace.
435 7848a0e1 2020-03-19 stsp .El
436 7848a0e1 2020-03-19 stsp .It Cm fe
437 7848a0e1 2020-03-19 stsp Short alias for
438 7848a0e1 2020-03-19 stsp .Cm fetch .
439 74daf7cb 2020-01-27 stsp .It Cm checkout Oo Fl E Oc Oo Fl b Ar branch Oc Oo Fl c Ar commit Oc Oo Fl p Ar path-prefix Oc Ar repository-path Op Ar work-tree-path
440 0bb8a95e 2018-03-12 stsp Copy files from a repository into a new work tree.
441 bb51a5b4 2020-01-13 stsp Show the status of each affected file, using the following status codes:
442 bb51a5b4 2020-01-13 stsp .Bl -column YXZ description
443 bb51a5b4 2020-01-13 stsp .It A Ta new file was added
444 bb51a5b4 2020-01-13 stsp .It E Ta file already exists in work tree's meta-data
445 bb51a5b4 2020-01-13 stsp .El
446 bb51a5b4 2020-01-13 stsp .Pp
447 5d7c1dab 2018-04-01 stsp If the
448 5d7c1dab 2018-04-01 stsp .Ar work tree path
449 c844a238 2019-02-06 stsp is not specified, either use the last component of
450 5d7c1dab 2018-04-01 stsp .Ar repository path ,
451 5d7c1dab 2018-04-01 stsp or if a
452 5d7c1dab 2018-04-01 stsp .Ar path prefix
453 c844a238 2019-02-06 stsp was specified use the last component of
454 5d7c1dab 2018-04-01 stsp .Ar path prefix .
455 38e11793 2018-06-13 stsp .Pp
456 38e11793 2018-06-13 stsp The options for
457 38e11793 2018-06-13 stsp .Cm got checkout
458 38e11793 2018-06-13 stsp are as follows:
459 38e11793 2018-06-13 stsp .Bl -tag -width Ds
460 bb51a5b4 2020-01-13 stsp .It Fl E
461 bb51a5b4 2020-01-13 stsp Proceed with the checkout operation even if the directory at
462 bb51a5b4 2020-01-13 stsp .Ar work-tree-path
463 bb51a5b4 2020-01-13 stsp is not empty.
464 bb51a5b4 2020-01-13 stsp Existing files will be left intact.
465 08573d5b 2019-05-14 stsp .It Fl b Ar branch
466 3c575567 2019-07-28 stsp Check out files from a commit on the specified
467 08573d5b 2019-05-14 stsp .Ar branch .
468 08573d5b 2019-05-14 stsp If this option is not specified, a branch resolved via the repository's HEAD
469 08573d5b 2019-05-14 stsp reference will be used.
470 8069f636 2019-01-12 stsp .It Fl c Ar commit
471 8069f636 2019-01-12 stsp Check out files from the specified
472 3c575567 2019-07-28 stsp .Ar commit
473 3c575567 2019-07-28 stsp on the selected branch.
474 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
475 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
476 0e1b0230 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
477 0e1b0230 2019-07-07 stsp automatically, provided the abbreviation is unique.
478 08573d5b 2019-05-14 stsp If this option is not specified, the most recent commit on the selected
479 08573d5b 2019-05-14 stsp branch will be used.
480 4b6c9460 2020-03-05 stsp .Pp
481 4b6c9460 2020-03-05 stsp If the specified
482 4b6c9460 2020-03-05 stsp .Ar commit
483 4b6c9460 2020-03-05 stsp is not contained in the selected branch, a different branch which contains
484 4b6c9460 2020-03-05 stsp this commit must be specified with the
485 4b6c9460 2020-03-05 stsp .Fl b
486 4b6c9460 2020-03-05 stsp option.
487 4b6c9460 2020-03-05 stsp If no such branch is known a new branch must be created for this
488 4b6c9460 2020-03-05 stsp commit with
489 4b6c9460 2020-03-05 stsp .Cm got branch
490 4b6c9460 2020-03-05 stsp before
491 4b6c9460 2020-03-05 stsp .Cm got checkout
492 4b6c9460 2020-03-05 stsp can be used.
493 4b6c9460 2020-03-05 stsp Checking out work trees with an unknown branch is intentionally not supported.
494 38e11793 2018-06-13 stsp .It Fl p Ar path-prefix
495 38e11793 2018-06-13 stsp Restrict the work tree to a subset of the repository's tree hierarchy.
496 38e11793 2018-06-13 stsp Only files beneath the specified
497 38e11793 2018-06-13 stsp .Ar path-prefix
498 38e11793 2018-06-13 stsp will be checked out.
499 38e11793 2018-06-13 stsp .El
500 97b3a7be 2019-07-09 stsp .It Cm co
501 97b3a7be 2019-07-09 stsp Short alias for
502 97b3a7be 2019-07-09 stsp .Cm checkout .
503 dfc23429 2019-08-11 stsp .It Cm update Oo Fl b Ar branch Oc Oo Fl c Ar commit Oc Op Ar path ...
504 024e9686 2019-05-14 stsp Update an existing work tree to a different commit.
505 7f838b36 2019-02-08 stsp Show the status of each affected file, using the following status codes:
506 7f838b36 2019-02-08 stsp .Bl -column YXZ description
507 7f838b36 2019-02-08 stsp .It U Ta file was updated and contained no local changes
508 7f838b36 2019-02-08 stsp .It G Ta file was updated and local changes were merged cleanly
509 7f838b36 2019-02-08 stsp .It C Ta file was updated and conflicts occurred during merge
510 7f838b36 2019-02-08 stsp .It D Ta file was deleted
511 7f838b36 2019-02-08 stsp .It A Ta new file was added
512 1dd86744 2019-08-12 anthony .It \(a~ Ta versioned file is obstructed by a non-regular file
513 a378724f 2019-02-10 stsp .It ! Ta a missing versioned file was restored
514 7f838b36 2019-02-08 stsp .El
515 7f838b36 2019-02-08 stsp .Pp
516 f2ea84fa 2019-07-27 stsp If no
517 c4cdcb68 2019-04-03 stsp .Ar path
518 f2ea84fa 2019-07-27 stsp is specified, update the entire work tree.
519 f2ea84fa 2019-07-27 stsp Otherwise, restrict the update operation to files at or within the
520 f2ea84fa 2019-07-27 stsp specified paths.
521 f2ea84fa 2019-07-27 stsp Each path is required to exist in the update operation's target commit.
522 f2ea84fa 2019-07-27 stsp Files in the work tree outside specified paths will remain unchanged and
523 f2ea84fa 2019-07-27 stsp will retain their previously recorded base commit.
524 f2cf8fbb 2019-04-04 stsp Some
525 f2cf8fbb 2019-04-04 stsp .Nm
526 f2cf8fbb 2019-04-04 stsp commands may refuse to run while the work tree contains files from
527 c4cdcb68 2019-04-03 stsp multiple base commits.
528 f2cf8fbb 2019-04-04 stsp The base commit of such a work tree can be made consistent by running
529 47ec7be7 2019-05-12 stsp .Cm got update
530 47ec7be7 2019-05-12 stsp across the entire work tree.
531 024e9686 2019-05-14 stsp Specifying a
532 024e9686 2019-05-14 stsp .Ar path
533 024e9686 2019-05-14 stsp is incompatible with the
534 024e9686 2019-05-14 stsp .Fl b
535 024e9686 2019-05-14 stsp option.
536 7f838b36 2019-02-08 stsp .Pp
537 4ed9f614 2019-08-04 stsp .Cm got update
538 4ed9f614 2019-08-04 stsp cannot update paths with staged changes.
539 4ed9f614 2019-08-04 stsp If changes have been staged with
540 4ed9f614 2019-08-04 stsp .Cm got stage ,
541 bc3056e3 2019-08-18 stsp these changes must first be committed with
542 4ed9f614 2019-08-04 stsp .Cm got commit
543 4ed9f614 2019-08-04 stsp or unstaged with
544 4ed9f614 2019-08-04 stsp .Cm got unstage .
545 4ed9f614 2019-08-04 stsp .Pp
546 507dc3bb 2018-12-29 stsp The options for
547 507dc3bb 2018-12-29 stsp .Cm got update
548 507dc3bb 2018-12-29 stsp are as follows:
549 507dc3bb 2018-12-29 stsp .Bl -tag -width Ds
550 024e9686 2019-05-14 stsp .It Fl b Ar branch
551 024e9686 2019-05-14 stsp Switch the work tree's branch reference to the specified
552 024e9686 2019-05-14 stsp .Ar branch
553 024e9686 2019-05-14 stsp before updating the work tree.
554 024e9686 2019-05-14 stsp This option requires that all paths in the work tree are updated.
555 507dc3bb 2018-12-29 stsp .It Fl c Ar commit
556 507dc3bb 2018-12-29 stsp Update the work tree to the specified
557 507dc3bb 2018-12-29 stsp .Ar commit .
558 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
559 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
560 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
561 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
562 024e9686 2019-05-14 stsp If this option is not specified, the most recent commit on the work tree's
563 024e9686 2019-05-14 stsp branch will be used.
564 507dc3bb 2018-12-29 stsp .El
565 97b3a7be 2019-07-09 stsp .It Cm up
566 97b3a7be 2019-07-09 stsp Short alias for
567 97b3a7be 2019-07-09 stsp .Cm update .
568 dfc23429 2019-08-11 stsp .It Cm status Op Ar path ...
569 6cd959e6 2019-03-26 stsp Show the current modification status of files in a work tree,
570 6bad629b 2019-02-04 stsp using the following status codes:
571 6bad629b 2019-02-04 stsp .Bl -column YXZ description
572 6bad629b 2019-02-04 stsp .It M Ta modified file
573 079890a9 2019-03-26 stsp .It A Ta file scheduled for addition in next commit
574 079890a9 2019-03-26 stsp .It D Ta file scheduled for deletion in next commit
575 7154f6ce 2019-03-27 stsp .It C Ta modified or added file which contains merge conflicts
576 6bad629b 2019-02-04 stsp .It ! Ta versioned file was expected on disk but is missing
577 1dd86744 2019-08-12 anthony .It \(a~ Ta versioned file is obstructed by a non-regular file
578 6bad629b 2019-02-04 stsp .It ? Ta unversioned item not tracked by
579 6bad629b 2019-02-04 stsp .Nm
580 1ebedb77 2019-10-19 stsp .It m Ta modified file modes (executable bit only)
581 2a06fe5f 2019-08-24 stsp .It N Ta non-existent
582 2a06fe5f 2019-08-24 stsp .Ar path
583 2a06fe5f 2019-08-24 stsp specified on the command line
584 6bad629b 2019-02-04 stsp .El
585 6bad629b 2019-02-04 stsp .Pp
586 72ea6654 2019-07-27 stsp If no
587 927df6b7 2019-02-10 stsp .Ar path
588 72ea6654 2019-07-27 stsp is specified, show modifications in the entire work tree.
589 72ea6654 2019-07-27 stsp Otherwise, show modifications at or within the specified paths.
590 4ed9f614 2019-08-04 stsp .Pp
591 4ed9f614 2019-08-04 stsp If changes have been staged with
592 4ed9f614 2019-08-04 stsp .Cm got stage ,
593 4ed9f614 2019-08-04 stsp staged changes are shown in the second output column, using the following
594 4ed9f614 2019-08-04 stsp status codes:
595 4ed9f614 2019-08-04 stsp .Bl -column YXZ description
596 4ed9f614 2019-08-04 stsp .It M Ta file modification is staged
597 4ed9f614 2019-08-04 stsp .It A Ta file addition is staged
598 4ed9f614 2019-08-04 stsp .It D Ta file deletion is staged
599 4ed9f614 2019-08-04 stsp .El
600 4ed9f614 2019-08-04 stsp .Pp
601 95ac67f0 2019-08-08 stsp Changes created on top of staged changes are indicated in the first column:
602 4ed9f614 2019-08-04 stsp .Bl -column YXZ description
603 95ac67f0 2019-08-08 stsp .It MM Ta file was modified after earlier changes have been staged
604 95ac67f0 2019-08-08 stsp .It MA Ta file was modified after having been staged for addition
605 4ed9f614 2019-08-04 stsp .El
606 6841da00 2019-08-08 stsp .Pp
607 6841da00 2019-08-08 stsp For compatibility with
608 bd8de430 2019-10-04 stsp .Xr cvs 1
609 bd8de430 2019-10-04 stsp and
610 bd8de430 2019-10-04 stsp .Xr git 1 ,
611 6841da00 2019-08-08 stsp .Cm got status
612 bd8de430 2019-10-04 stsp reads
613 bd8de430 2019-10-04 stsp .Xr glob 7
614 bd8de430 2019-10-04 stsp patterns from
615 6841da00 2019-08-08 stsp .Pa .cvsignore
616 bd8de430 2019-10-04 stsp and
617 bd8de430 2019-10-04 stsp .Pa .gitignore
618 6841da00 2019-08-08 stsp files in each traversed directory and will not display unversioned files
619 bd8de430 2019-10-04 stsp which match these patterns.
620 bd8de430 2019-10-04 stsp As an extension to
621 6841da00 2019-08-08 stsp .Xr glob 7
622 bd8de430 2019-10-04 stsp matching rules,
623 bd8de430 2019-10-04 stsp .Cm got status
624 bd8de430 2019-10-04 stsp supports consecutive asterisks,
625 bd8de430 2019-10-04 stsp .Dq ** ,
626 bd8de430 2019-10-04 stsp which will match an arbitrary amount of directories.
627 6841da00 2019-08-08 stsp Unlike
628 6841da00 2019-08-08 stsp .Xr cvs 1 ,
629 6841da00 2019-08-08 stsp .Cm got status
630 6841da00 2019-08-08 stsp only supports a single ignore pattern per line.
631 bd8de430 2019-10-04 stsp Unlike
632 bd8de430 2019-10-04 stsp .Xr git 1 ,
633 bd8de430 2019-10-04 stsp .Cm got status
634 bd8de430 2019-10-04 stsp does not support negated ignore patterns prefixed with
635 bd8de430 2019-10-04 stsp .Dq \&! ,
636 bd8de430 2019-10-04 stsp and gives no special significance to the location of path component separators,
637 bd8de430 2019-10-04 stsp .Dq / ,
638 bd8de430 2019-10-04 stsp in a pattern.
639 97b3a7be 2019-07-09 stsp .It Cm st
640 97b3a7be 2019-07-09 stsp Short alias for
641 97b3a7be 2019-07-09 stsp .Cm status .
642 48c8c60d 2020-01-27 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 s Ar search-pattern Oc Oo Fl r Ar repository-path Oc Op Ar path
643 38e11793 2018-06-13 stsp Display history of a repository.
644 04ca23f4 2018-07-16 stsp If a
645 04ca23f4 2018-07-16 stsp .Ar path
646 04ca23f4 2018-07-16 stsp is specified, show only commits which modified this path.
647 dc990cbf 2020-02-22 stsp If invoked in a work tree, the
648 dc990cbf 2020-02-22 stsp .Ar path
649 dc990cbf 2020-02-22 stsp is interpreted relative to the current working directory,
650 dc990cbf 2020-02-22 stsp and the work tree's path prefix is implicitly prepended.
651 dc990cbf 2020-02-22 stsp Otherwise, the path is interpreted relative to the repository root.
652 38e11793 2018-06-13 stsp .Pp
653 38e11793 2018-06-13 stsp The options for
654 38e11793 2018-06-13 stsp .Cm got log
655 38e11793 2018-06-13 stsp are as follows:
656 38e11793 2018-06-13 stsp .Bl -tag -width Ds
657 48c8c60d 2020-01-27 stsp .It Fl b
658 1137e0ae 2020-01-27 stsp Display individual commits which were merged into the current branch
659 1137e0ae 2020-01-27 stsp from other branches.
660 48c8c60d 2020-01-27 stsp By default,
661 48c8c60d 2020-01-27 stsp .Cm got log
662 48c8c60d 2020-01-27 stsp shows the linear history of the current branch only.
663 38e11793 2018-06-13 stsp .It Fl c Ar commit
664 38e11793 2018-06-13 stsp Start traversing history at the specified
665 38e11793 2018-06-13 stsp .Ar commit .
666 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
667 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
668 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
669 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
670 1cc14b9f 2019-05-14 stsp If this option is not specified, default to the work tree's current branch
671 1cc14b9f 2019-05-14 stsp if invoked in a work tree, or to the repository's HEAD reference.
672 c0cc5c62 2018-10-18 stsp .It Fl C Ar number
673 c0cc5c62 2018-10-18 stsp Set the number of context lines shown in diffs with
674 c0cc5c62 2018-10-18 stsp .Fl p .
675 c0cc5c62 2018-10-18 stsp By default, 3 lines of context are shown.
676 6238ee32 2018-06-13 stsp .It Fl l Ar N
677 6238ee32 2018-06-13 stsp Limit history traversal to a given number of commits.
678 b1ebc001 2019-08-13 stsp If this option is not specified, a default limit value of zero is used,
679 b1ebc001 2019-08-13 stsp which is treated as an unbounded limit.
680 b1ebc001 2019-08-13 stsp The
681 b1ebc001 2019-08-13 stsp .Ev GOT_LOG_DEFAULT_LIMIT
682 b1ebc001 2019-08-13 stsp environment variable may be set to change this default value.
683 6238ee32 2018-06-13 stsp .It Fl p
684 6238ee32 2018-06-13 stsp Display the patch of modifications made in each commit.
685 44392932 2019-08-25 stsp If a
686 44392932 2019-08-25 stsp .Ar path
687 44392932 2019-08-25 stsp is specified, only show the patch of modifications at or within this path.
688 c6390436 2019-11-29 kn .It Fl s Ar search-pattern
689 c6390436 2019-11-29 kn If specified, show only commits with a log message matched by the extended
690 6841bf13 2019-11-29 kn regular expression
691 6841bf13 2019-11-29 kn .Ar search-pattern .
692 6841bf13 2019-11-29 kn Regular expression syntax is documented in
693 6841bf13 2019-11-29 kn .Xr re_format 7 .
694 04ca23f4 2018-07-16 stsp .It Fl r Ar repository-path
695 04ca23f4 2018-07-16 stsp Use the repository at the specified path.
696 04ca23f4 2018-07-16 stsp If not specified, assume the repository is located at or above the current
697 04ca23f4 2018-07-16 stsp working directory.
698 e9cf2e30 2019-02-05 stsp If this directory is a
699 e9cf2e30 2019-02-05 stsp .Nm
700 e9cf2e30 2019-02-05 stsp work tree, use the repository path associated with this work tree.
701 38e11793 2018-06-13 stsp .El
702 63035f9f 2019-10-06 stsp .It Cm diff Oo Fl C Ar number Oc Oo Fl r Ar repository-path Oc Oo Fl s Oc Oo Fl w Oc Op Ar object1 Ar object2 | Ar path
703 927df6b7 2019-02-10 stsp When invoked within a work tree with less than two arguments, display
704 927df6b7 2019-02-10 stsp uncommitted changes in the work tree.
705 927df6b7 2019-02-10 stsp If a
706 927df6b7 2019-02-10 stsp .Ar path
707 927df6b7 2019-02-10 stsp is specified, only show changes within this path.
708 927df6b7 2019-02-10 stsp .Pp
709 d24820bf 2019-08-11 stsp If two arguments are provided, treat each argument as a reference, a tag
710 d24820bf 2019-08-11 stsp name, or an object ID SHA1 hash, and display differences between the
711 d24820bf 2019-08-11 stsp corresponding objects.
712 3f8b7d6a 2018-04-01 stsp Both objects must be of the same type (blobs, trees, or commits).
713 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
714 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
715 c0cc5c62 2018-10-18 stsp .Pp
716 c0cc5c62 2018-10-18 stsp The options for
717 c0cc5c62 2018-10-18 stsp .Cm got diff
718 c0cc5c62 2018-10-18 stsp are as follows:
719 c0cc5c62 2018-10-18 stsp .Bl -tag -width Ds
720 c0cc5c62 2018-10-18 stsp .It Fl C Ar number
721 c0cc5c62 2018-10-18 stsp Set the number of context lines shown in the diff.
722 c0cc5c62 2018-10-18 stsp By default, 3 lines of context are shown.
723 b72f483a 2019-02-05 stsp .It Fl r Ar repository-path
724 b72f483a 2019-02-05 stsp Use the repository at the specified path.
725 b72f483a 2019-02-05 stsp If not specified, assume the repository is located at or above the current
726 b72f483a 2019-02-05 stsp working directory.
727 b72f483a 2019-02-05 stsp If this directory is a
728 b72f483a 2019-02-05 stsp .Nm
729 b72f483a 2019-02-05 stsp work tree, use the repository path associated with this work tree.
730 4ed9f614 2019-08-04 stsp .It Fl s
731 4ed9f614 2019-08-04 stsp Show changes staged with
732 4ed9f614 2019-08-04 stsp .Cm got stage
733 4ed9f614 2019-08-04 stsp instead of showing local changes.
734 4ed9f614 2019-08-04 stsp This option is only valid when
735 4ed9f614 2019-08-04 stsp .Cm got diff
736 4ed9f614 2019-08-04 stsp is invoked in a work tree.
737 63035f9f 2019-10-06 stsp .It Fl w
738 63035f9f 2019-10-06 stsp Ignore whitespace-only changes.
739 c0cc5c62 2018-10-18 stsp .El
740 bc26cce8 2019-08-04 stsp .It Cm di
741 bc26cce8 2019-08-04 stsp Short alias for
742 bc26cce8 2019-08-04 stsp .Cm diff .
743 dfc23429 2019-08-11 stsp .It Cm blame Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Ar path
744 1ff8e573 2018-08-02 stsp Display line-by-line history of a file at the specified path.
745 1ff8e573 2018-08-02 stsp .Pp
746 1ff8e573 2018-08-02 stsp The options for
747 1ff8e573 2018-08-02 stsp .Cm got blame
748 1ff8e573 2018-08-02 stsp are as follows:
749 1ff8e573 2018-08-02 stsp .Bl -tag -width Ds
750 1ff8e573 2018-08-02 stsp .It Fl c Ar commit
751 1ff8e573 2018-08-02 stsp Start traversing history at the specified
752 1ff8e573 2018-08-02 stsp .Ar commit .
753 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
754 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
755 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
756 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
757 1ff8e573 2018-08-02 stsp .It Fl r Ar repository-path
758 1ff8e573 2018-08-02 stsp Use the repository at the specified path.
759 1ff8e573 2018-08-02 stsp If not specified, assume the repository is located at or above the current
760 1ff8e573 2018-08-02 stsp working directory.
761 0c06baac 2019-02-05 stsp If this directory is a
762 0c06baac 2019-02-05 stsp .Nm
763 0c06baac 2019-02-05 stsp work tree, use the repository path associated with this work tree.
764 5c860e29 2018-03-12 stsp .El
765 bc26cce8 2019-08-04 stsp .It Cm bl
766 bc26cce8 2019-08-04 stsp Short alias for
767 bc26cce8 2019-08-04 stsp .Cm blame .
768 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
769 5de5890b 2018-10-18 stsp Display a listing of files and directories at the specified
770 5de5890b 2018-10-18 stsp directory path in the repository.
771 db0c2996 2019-02-10 stsp Entries shown in this listing may carry one of the following trailing
772 db0c2996 2019-02-10 stsp annotations:
773 db0c2996 2019-02-10 stsp .Bl -column YXZ description
774 848d6979 2019-08-12 stsp .It @ Ta entry is a symbolic link
775 db0c2996 2019-02-10 stsp .It / Ta entry is a directory
776 db0c2996 2019-02-10 stsp .It * Ta entry is an executable file
777 63c5ca5d 2019-08-24 stsp .It $ Ta entry is a Git submodule
778 db0c2996 2019-02-10 stsp .El
779 db0c2996 2019-02-10 stsp .Pp
780 0c849583 2019-02-05 stsp If no
781 0c849583 2019-02-05 stsp .Ar path
782 0c849583 2019-02-05 stsp is specified, list the repository path corresponding to the current
783 0c849583 2019-02-05 stsp directory of the work tree, or the root directory of the repository
784 0c849583 2019-02-05 stsp if there is no work tree.
785 5de5890b 2018-10-18 stsp .Pp
786 5de5890b 2018-10-18 stsp The options for
787 5de5890b 2018-10-18 stsp .Cm got tree
788 5de5890b 2018-10-18 stsp are as follows:
789 5de5890b 2018-10-18 stsp .Bl -tag -width Ds
790 5de5890b 2018-10-18 stsp .It Fl c Ar commit
791 5de5890b 2018-10-18 stsp List files and directories as they appear in the specified
792 5de5890b 2018-10-18 stsp .Ar commit .
793 30837e32 2019-07-25 stsp The expected argument is a commit ID SHA1 hash or an existing reference
794 303e2782 2019-08-09 stsp or tag name which will be resolved to a commit ID.
795 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
796 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
797 5de5890b 2018-10-18 stsp .It Fl r Ar repository-path
798 5de5890b 2018-10-18 stsp Use the repository at the specified path.
799 5de5890b 2018-10-18 stsp If not specified, assume the repository is located at or above the current
800 5de5890b 2018-10-18 stsp working directory.
801 0c849583 2019-02-05 stsp If this directory is a
802 0c849583 2019-02-05 stsp .Nm
803 0c849583 2019-02-05 stsp work tree, use the repository path associated with this work tree.
804 5de5890b 2018-10-18 stsp .It Fl i
805 5de5890b 2018-10-18 stsp Show object IDs of files (blob objects) and directories (tree objects).
806 c1669e2e 2019-01-09 stsp .It Fl R
807 0c849583 2019-02-05 stsp Recurse into sub-directories in the repository.
808 d0eebce4 2019-03-11 stsp .El
809 bc26cce8 2019-08-04 stsp .It Cm tr
810 bc26cce8 2019-08-04 stsp Short alias for
811 bc26cce8 2019-08-04 stsp .Cm tree .
812 c55aa27e 2019-08-12 stsp .It Cm ref Oo Fl r Ar repository-path Oc Oo Fl l Oc Oo Fl d Ar name Oc Oo Fl s Oc Op Ar name Ar target
813 d0eebce4 2019-03-11 stsp Manage references in a repository.
814 d0eebce4 2019-03-11 stsp .Pp
815 d0eebce4 2019-03-11 stsp If no options are passed, expect two arguments and attempt to create,
816 d0eebce4 2019-03-11 stsp or update, the reference with the given
817 d0eebce4 2019-03-11 stsp .Ar name ,
818 d0eebce4 2019-03-11 stsp and make it point at the given
819 d83d9d5c 2019-05-13 stsp .Ar target .
820 f16e4044 2019-10-09 stsp The name must be an absolute reference name, i.e. it must begin with
821 f16e4044 2019-10-09 stsp .Dq refs/ .
822 a54b6686 2019-06-28 stsp The target may be an object ID SHA1 hash or an existing reference which
823 a54b6686 2019-06-28 stsp will be resolved to an object ID.
824 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
825 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
826 d0eebce4 2019-03-11 stsp .Pp
827 d0eebce4 2019-03-11 stsp The options for
828 d0eebce4 2019-03-11 stsp .Cm got ref
829 d0eebce4 2019-03-11 stsp are as follows:
830 d0eebce4 2019-03-11 stsp .Bl -tag -width Ds
831 d0eebce4 2019-03-11 stsp .It Fl r Ar repository-path
832 d0eebce4 2019-03-11 stsp Use the repository at the specified path.
833 d0eebce4 2019-03-11 stsp If not specified, assume the repository is located at or above the current
834 d0eebce4 2019-03-11 stsp working directory.
835 d0eebce4 2019-03-11 stsp If this directory is a
836 d0eebce4 2019-03-11 stsp .Nm
837 d0eebce4 2019-03-11 stsp work tree, use the repository path associated with this work tree.
838 d0eebce4 2019-03-11 stsp .It Fl l
839 d0eebce4 2019-03-11 stsp List all existing references in the repository.
840 d0eebce4 2019-03-11 stsp .It Fl d Ar name
841 d0eebce4 2019-03-11 stsp Delete the reference with the specified name from the repository.
842 d1c1ae5f 2019-08-12 stsp .It Fl s
843 d1c1ae5f 2019-08-12 stsp Create a symbolic reference pointing at the specified
844 d1c1ae5f 2019-08-12 stsp .Ar target ,
845 d1c1ae5f 2019-08-12 stsp which must be an existing reference.
846 d1c1ae5f 2019-08-12 stsp Care should be taken not to create loops between references when
847 d1c1ae5f 2019-08-12 stsp this option is used.
848 4e759de4 2019-06-26 stsp .El
849 da76fce2 2020-02-24 stsp .It Cm branch Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Oo Fl l Oc Oo Fl d Ar name Oc Oo Fl n Oc Op Ar name
850 da76fce2 2020-02-24 stsp Create, list, or delete branches.
851 4e759de4 2019-06-26 stsp .Pp
852 4e759de4 2019-06-26 stsp Branches are managed via references which live in the
853 4e759de4 2019-06-26 stsp .Dq refs/heads/
854 4e759de4 2019-06-26 stsp reference namespace.
855 4e759de4 2019-06-26 stsp The
856 4e759de4 2019-06-26 stsp .Cm got branch
857 4e759de4 2019-06-26 stsp command operates on references in this namespace only.
858 4e759de4 2019-06-26 stsp .Pp
859 ad89fa31 2019-10-04 stsp If invoked in a work tree without any arguments, print the name of the
860 ad89fa31 2019-10-04 stsp work tree's current branch.
861 da76fce2 2020-02-24 stsp .Pp
862 a74f7e83 2019-11-10 stsp If a
863 a74f7e83 2019-11-10 stsp .Ar name
864 a74f7e83 2019-11-10 stsp argument is passed, attempt to create a branch reference with the given name.
865 a74f7e83 2019-11-10 stsp By default the new branch reference will point at the latest commit on the
866 a74f7e83 2019-11-10 stsp work tree's current branch if invoked in a work tree, and otherwise to a commit
867 a74f7e83 2019-11-10 stsp resolved via the repository's HEAD reference.
868 4e759de4 2019-06-26 stsp .Pp
869 da76fce2 2020-02-24 stsp If invoked in a work tree, once the branch was created successfully
870 da76fce2 2020-02-24 stsp switch the work tree's head reference to the newly created branch and
871 da76fce2 2020-02-24 stsp update files across the entire work tree, just like
872 da76fce2 2020-02-24 stsp .Cm got update -b Ar name
873 da76fce2 2020-02-24 stsp would do.
874 da76fce2 2020-02-24 stsp Show the status of each affected file, using the following status codes:
875 da76fce2 2020-02-24 stsp .Bl -column YXZ description
876 da76fce2 2020-02-24 stsp .It U Ta file was updated and contained no local changes
877 da76fce2 2020-02-24 stsp .It G Ta file was updated and local changes were merged cleanly
878 da76fce2 2020-02-24 stsp .It C Ta file was updated and conflicts occurred during merge
879 da76fce2 2020-02-24 stsp .It D Ta file was deleted
880 da76fce2 2020-02-24 stsp .It A Ta new file was added
881 da76fce2 2020-02-24 stsp .It \(a~ Ta versioned file is obstructed by a non-regular file
882 da76fce2 2020-02-24 stsp .It ! Ta a missing versioned file was restored
883 da76fce2 2020-02-24 stsp .El
884 da76fce2 2020-02-24 stsp .Pp
885 4e759de4 2019-06-26 stsp The options for
886 4e759de4 2019-06-26 stsp .Cm got branch
887 4e759de4 2019-06-26 stsp are as follows:
888 4e759de4 2019-06-26 stsp .Bl -tag -width Ds
889 a74f7e83 2019-11-10 stsp .It Fl c Ar commit
890 a74f7e83 2019-11-10 stsp Make a newly created branch reference point at the specified
891 a74f7e83 2019-11-10 stsp .Ar commit .
892 a74f7e83 2019-11-10 stsp The expected
893 a74f7e83 2019-11-10 stsp .Ar commit
894 a74f7e83 2019-11-10 stsp argument is a commit ID SHA1 hash or an existing reference
895 a74f7e83 2019-11-10 stsp or tag name which will be resolved to a commit ID.
896 4e759de4 2019-06-26 stsp .It Fl r Ar repository-path
897 4e759de4 2019-06-26 stsp Use the repository at the specified path.
898 4e759de4 2019-06-26 stsp If not specified, assume the repository is located at or above the current
899 4e759de4 2019-06-26 stsp working directory.
900 4e759de4 2019-06-26 stsp If this directory is a
901 4e759de4 2019-06-26 stsp .Nm
902 4e759de4 2019-06-26 stsp work tree, use the repository path associated with this work tree.
903 4e759de4 2019-06-26 stsp .It Fl l
904 4e759de4 2019-06-26 stsp List all existing branches in the repository.
905 ba882ee3 2019-07-11 stsp If invoked in a work tree, the work tree's current branch is shown
906 ba882ee3 2019-07-11 stsp with one the following annotations:
907 ba882ee3 2019-07-11 stsp .Bl -column YXZ description
908 ba882ee3 2019-07-11 stsp .It * Ta work tree's base commit matches the branch tip
909 1dd86744 2019-08-12 anthony .It \(a~ Ta work tree's base commit is out-of-date
910 ba882ee3 2019-07-11 stsp .El
911 4e759de4 2019-06-26 stsp .It Fl d Ar name
912 4e759de4 2019-06-26 stsp Delete the branch with the specified name from the repository.
913 7acfb25b 2019-07-11 stsp Only the branch reference is deleted.
914 7acfb25b 2019-07-11 stsp Any commit, tree, and blob objects belonging to the branch
915 74d012d1 2019-07-11 stsp remain in the repository and may be removed separately with
916 ce33d90e 2019-07-14 stsp Git's garbage collector.
917 da76fce2 2020-02-24 stsp .It Fl n
918 da76fce2 2020-02-24 stsp Do not switch and update the work tree after creating a new branch.
919 5de5890b 2018-10-18 stsp .El
920 97b3a7be 2019-07-09 stsp .It Cm br
921 97b3a7be 2019-07-09 stsp Short alias for
922 97b3a7be 2019-07-09 stsp .Cm branch .
923 80106605 2020-02-24 stsp .It Cm tag Oo Fl c Ar commit Oc Oo Fl m Ar message Oc Oo Fl r Ar repository-path Oc Oo Fl l Oc Ar name
924 8e7bd50a 2019-08-22 stsp Manage tags in a repository.
925 8e7bd50a 2019-08-22 stsp .Pp
926 8e7bd50a 2019-08-22 stsp Tags are managed via references which live in the
927 8e7bd50a 2019-08-22 stsp .Dq refs/tags/
928 8e7bd50a 2019-08-22 stsp reference namespace.
929 8e7bd50a 2019-08-22 stsp The
930 8e7bd50a 2019-08-22 stsp .Cm got tag
931 8e7bd50a 2019-08-22 stsp command operates on references in this namespace only.
932 b3cd068e 2019-08-22 stsp References in this namespace point at tag objects which contain a pointer
933 b3cd068e 2019-08-22 stsp to another object, a tag message, as well as author and timestamp information.
934 8e7bd50a 2019-08-22 stsp .Pp
935 80106605 2020-02-24 stsp Attempt to create a tag with the given
936 8e7bd50a 2019-08-22 stsp .Ar name ,
937 8e7bd50a 2019-08-22 stsp and make this tag point at the given
938 8e7bd50a 2019-08-22 stsp .Ar commit .
939 8e7bd50a 2019-08-22 stsp If no commit is specified, default to the latest commit on the work tree's
940 8e7bd50a 2019-08-22 stsp current branch if invoked in a work tree, and to a commit resolved via
941 8e7bd50a 2019-08-22 stsp the repository's HEAD reference otherwise.
942 8e7bd50a 2019-08-22 stsp .Pp
943 8e7bd50a 2019-08-22 stsp The options for
944 8e7bd50a 2019-08-22 stsp .Cm got tag
945 8e7bd50a 2019-08-22 stsp are as follows:
946 8e7bd50a 2019-08-22 stsp .Bl -tag -width Ds
947 80106605 2020-02-24 stsp .It Fl c Ar commit
948 80106605 2020-02-24 stsp Make the newly created tag reference point at the specified
949 80106605 2020-02-24 stsp .Ar commit .
950 80106605 2020-02-24 stsp The expected
951 80106605 2020-02-24 stsp .Ar commit
952 80106605 2020-02-24 stsp argument is a commit ID SHA1 hash or an existing reference or tag name which
953 80106605 2020-02-24 stsp will be resolved to a commit ID.
954 80106605 2020-02-24 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
955 80106605 2020-02-24 stsp automatically, provided the abbreviation is unique.
956 8e7bd50a 2019-08-22 stsp .It Fl m Ar message
957 80106605 2020-02-24 stsp Use the specified tag message when creating the new tag.
958 8e7bd50a 2019-08-22 stsp Without the
959 8e7bd50a 2019-08-22 stsp .Fl m
960 8e7bd50a 2019-08-22 stsp option,
961 3a62228f 2019-11-08 stsp .Cm got tag
962 8e7bd50a 2019-08-22 stsp opens a temporary file in an editor where a tag message can be written.
963 8e7bd50a 2019-08-22 stsp .It Fl r Ar repository-path
964 8e7bd50a 2019-08-22 stsp Use the repository at the specified path.
965 8e7bd50a 2019-08-22 stsp If not specified, assume the repository is located at or above the current
966 8e7bd50a 2019-08-22 stsp working directory.
967 8e7bd50a 2019-08-22 stsp If this directory is a
968 8e7bd50a 2019-08-22 stsp .Nm
969 8e7bd50a 2019-08-22 stsp work tree, use the repository path associated with this work tree.
970 8e7bd50a 2019-08-22 stsp .It Fl l
971 8e7bd50a 2019-08-22 stsp List all existing tags in the repository instead of creating a new tag.
972 8e7bd50a 2019-08-22 stsp If this option is used, no other command-line arguments are allowed.
973 8e7bd50a 2019-08-22 stsp .El
974 8e7bd50a 2019-08-22 stsp .Pp
975 8e7bd50a 2019-08-22 stsp By design, the
976 8e7bd50a 2019-08-22 stsp .Cm got tag
977 8e7bd50a 2019-08-22 stsp command will not delete tags or change existing tags.
978 8e7bd50a 2019-08-22 stsp If a tag must be deleted, the
979 8e7bd50a 2019-08-22 stsp .Cm got ref
980 8e7bd50a 2019-08-22 stsp command may be used to delete a tag's reference.
981 8e7bd50a 2019-08-22 stsp This should only be done if the tag has not already been copied to
982 8e7bd50a 2019-08-22 stsp another repository.
983 022fae89 2019-12-06 tracey .It Cm add Oo Fl R Oc Oo Fl I Oc Ar path ...
984 8125ddca 2019-05-11 stsp Schedule unversioned files in a work tree for addition to the
985 d00136be 2019-03-26 stsp repository in the next commit.
986 4e68cba3 2019-11-23 stsp .Pp
987 4e68cba3 2019-11-23 stsp The options for
988 4e68cba3 2019-11-23 stsp .Cm got add
989 4e68cba3 2019-11-23 stsp are as follows:
990 4e68cba3 2019-11-23 stsp .Bl -tag -width Ds
991 4e68cba3 2019-11-23 stsp .It Fl R
992 4e68cba3 2019-11-23 stsp Permit recursion into directories.
993 4e68cba3 2019-11-23 stsp If this option is not specified,
994 4e68cba3 2019-11-23 stsp .Cm got add
995 4e68cba3 2019-11-23 stsp will refuse to run if a specified
996 4e68cba3 2019-11-23 stsp .Ar path
997 4e68cba3 2019-11-23 stsp is a directory.
998 022fae89 2019-12-06 tracey .It Fl I
999 022fae89 2019-12-06 tracey With -R, add files even if they match a
1000 022fae89 2019-12-06 tracey .Cm got status
1001 022fae89 2019-12-06 tracey ignore pattern.
1002 4e68cba3 2019-11-23 stsp .El
1003 c29c428a 2019-12-16 stsp .It Cm remove Oo Fl f Oc Oo Fl k Oc Oo Fl R Oc Ar path ...
1004 17ed4618 2019-06-02 stsp Remove versioned files from a work tree and schedule them for deletion
1005 2ec1f75b 2019-03-26 stsp from the repository in the next commit.
1006 2ec1f75b 2019-03-26 stsp .Pp
1007 2ec1f75b 2019-03-26 stsp The options for
1008 86d25a1b 2019-07-11 stsp .Cm got remove
1009 2ec1f75b 2019-03-26 stsp are as follows:
1010 2ec1f75b 2019-03-26 stsp .Bl -tag -width Ds
1011 2ec1f75b 2019-03-26 stsp .It Fl f
1012 17ed4618 2019-06-02 stsp Perform the operation even if a file contains uncommitted modifications.
1013 70e3e7f5 2019-12-13 tracey .It Fl k
1014 70e3e7f5 2019-12-13 tracey Keep affected files on disk.
1015 f2a9dc41 2019-12-13 tracey .It Fl R
1016 f2a9dc41 2019-12-13 tracey Permit recursion into directories.
1017 f2a9dc41 2019-12-13 tracey If this option is not specified,
1018 f2a9dc41 2019-12-13 tracey .Cm got remove
1019 f2a9dc41 2019-12-13 tracey will refuse to run if a specified
1020 f2a9dc41 2019-12-13 tracey .Ar path
1021 f2a9dc41 2019-12-13 tracey is a directory.
1022 d0eebce4 2019-03-11 stsp .El
1023 648e4ef7 2019-07-09 stsp .It Cm rm
1024 648e4ef7 2019-07-09 stsp Short alias for
1025 648e4ef7 2019-07-09 stsp .Cm remove .
1026 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 ...
1027 bc3056e3 2019-08-18 stsp Revert any uncommitted changes in files at the specified paths.
1028 a129376b 2019-03-28 stsp File contents will be overwritten with those contained in the
1029 1dd86744 2019-08-12 anthony work tree's base commit.
1030 1dd86744 2019-08-12 anthony There is no way to bring discarded changes back after
1031 a129376b 2019-03-28 stsp .Cm got revert !
1032 a129376b 2019-03-28 stsp .Pp
1033 e20a8b6f 2019-06-04 stsp If a file was added with
1034 a129376b 2019-03-28 stsp .Cm got add
1035 a129376b 2019-03-28 stsp it will become an unversioned file again.
1036 e20a8b6f 2019-06-04 stsp If a file was deleted with
1037 86d25a1b 2019-07-11 stsp .Cm got remove
1038 a129376b 2019-03-28 stsp it will be restored.
1039 0f6d7415 2019-08-08 stsp .Pp
1040 0f6d7415 2019-08-08 stsp The options for
1041 0f6d7415 2019-08-08 stsp .Cm got revert
1042 0f6d7415 2019-08-08 stsp are as follows:
1043 0f6d7415 2019-08-08 stsp .Bl -tag -width Ds
1044 33aa809d 2019-08-08 stsp .It Fl p
1045 33aa809d 2019-08-08 stsp Instead of reverting all changes in files, interactively select or reject
1046 33aa809d 2019-08-08 stsp changes to revert based on
1047 33aa809d 2019-08-08 stsp .Dq y
1048 33aa809d 2019-08-08 stsp (revert change),
1049 33aa809d 2019-08-08 stsp .Dq n
1050 33aa809d 2019-08-08 stsp (keep change), and
1051 33aa809d 2019-08-08 stsp .Dq q
1052 33aa809d 2019-08-08 stsp (quit reverting this file) responses.
1053 33aa809d 2019-08-08 stsp If a file is in modified status, individual patches derived from the
1054 33aa809d 2019-08-08 stsp modified file content can be reverted.
1055 33aa809d 2019-08-08 stsp Files in added or deleted status may only be reverted in their entirety.
1056 33aa809d 2019-08-08 stsp .It Fl F Ar response-script
1057 33aa809d 2019-08-08 stsp With the
1058 33aa809d 2019-08-08 stsp .Fl p
1059 33aa809d 2019-08-08 stsp option, read
1060 33aa809d 2019-08-08 stsp .Dq y ,
1061 33aa809d 2019-08-08 stsp .Dq n ,
1062 33aa809d 2019-08-08 stsp and
1063 33aa809d 2019-08-08 stsp .Dq q
1064 33aa809d 2019-08-08 stsp responses line-by-line from the specified
1065 33aa809d 2019-08-08 stsp .Ar response-script
1066 33aa809d 2019-08-08 stsp file instead of prompting interactively.
1067 0f6d7415 2019-08-08 stsp .It Fl R
1068 0f6d7415 2019-08-08 stsp Permit recursion into directories.
1069 0f6d7415 2019-08-08 stsp If this option is not specified,
1070 0f6d7415 2019-08-08 stsp .Cm got revert
1071 0f6d7415 2019-08-08 stsp will refuse to run if a specified
1072 0f6d7415 2019-08-08 stsp .Ar path
1073 0f6d7415 2019-08-08 stsp is a directory.
1074 0f6d7415 2019-08-08 stsp .El
1075 97b3a7be 2019-07-09 stsp .It Cm rv
1076 97b3a7be 2019-07-09 stsp Short alias for
1077 97b3a7be 2019-07-09 stsp .Cm revert .
1078 dfc23429 2019-08-11 stsp .It Cm commit Oo Fl m Ar message Oc Op Ar path ...
1079 4ed9f614 2019-08-04 stsp Create a new commit in the repository from changes in a work tree
1080 15cd91f7 2019-05-12 stsp and use this commit as the new base commit for the work tree.
1081 5c1e53bc 2019-07-28 stsp If no
1082 90e8619e 2019-07-25 stsp .Ar path
1083 4ed9f614 2019-08-04 stsp is specified, commit all changes in the work tree.
1084 4ed9f614 2019-08-04 stsp Otherwise, commit changes at or within the specified paths.
1085 15cd91f7 2019-05-12 stsp .Pp
1086 4ed9f614 2019-08-04 stsp If changes have been explicitly staged for commit with
1087 1dd86744 2019-08-12 anthony .Cm got stage ,
1088 4ed9f614 2019-08-04 stsp only commit staged changes and reject any specified paths which
1089 4ed9f614 2019-08-04 stsp have not been staged.
1090 4ed9f614 2019-08-04 stsp .Pp
1091 15cd91f7 2019-05-12 stsp Show the status of each affected file, using the following status codes:
1092 15cd91f7 2019-05-12 stsp .Bl -column YXZ description
1093 15cd91f7 2019-05-12 stsp .It M Ta modified file
1094 15cd91f7 2019-05-12 stsp .It D Ta file was deleted
1095 15cd91f7 2019-05-12 stsp .It A Ta new file was added
1096 1ebedb77 2019-10-19 stsp .It m Ta modified file modes (executable bit only)
1097 15cd91f7 2019-05-12 stsp .El
1098 15cd91f7 2019-05-12 stsp .Pp
1099 996d5ccd 2019-08-05 stsp Files which are not part of the new commit will retain their previously
1100 996d5ccd 2019-08-05 stsp recorded base commit.
1101 15cd91f7 2019-05-12 stsp Some
1102 15cd91f7 2019-05-12 stsp .Nm
1103 15cd91f7 2019-05-12 stsp commands may refuse to run while the work tree contains files from
1104 15cd91f7 2019-05-12 stsp multiple base commits.
1105 15cd91f7 2019-05-12 stsp The base commit of such a work tree can be made consistent by running
1106 47ec7be7 2019-05-12 stsp .Cm got update
1107 47ec7be7 2019-05-12 stsp across the entire work tree.
1108 15cd91f7 2019-05-12 stsp .Pp
1109 15cd91f7 2019-05-12 stsp The
1110 15cd91f7 2019-05-12 stsp .Cm got commit
1111 15cd91f7 2019-05-12 stsp command requires the
1112 74416c47 2019-05-09 stsp .Ev GOT_AUTHOR
1113 aba9c984 2019-09-08 stsp environment variable to be set,
1114 aba9c984 2019-09-08 stsp unless Git's
1115 aba9c984 2019-09-08 stsp .Dv user.name
1116 aba9c984 2019-09-08 stsp and
1117 709ae9eb 2019-09-08 stsp .Dv user.email
1118 709ae9eb 2019-09-08 stsp configuration settings can be
1119 aba9c984 2019-09-08 stsp obtained from the repository's
1120 aba9c984 2019-09-08 stsp .Pa .git/config
1121 c9956ddf 2019-09-08 stsp file or from Git's global
1122 c9956ddf 2019-09-08 stsp .Pa ~/.gitconfig
1123 c9956ddf 2019-09-08 stsp configuration file.
1124 74416c47 2019-05-09 stsp .Pp
1125 74416c47 2019-05-09 stsp The options for
1126 74416c47 2019-05-09 stsp .Cm got commit
1127 74416c47 2019-05-09 stsp are as follows:
1128 74416c47 2019-05-09 stsp .Bl -tag -width Ds
1129 74ff3f23 2019-07-07 stsp .It Fl m Ar message
1130 74416c47 2019-05-09 stsp Use the specified log message when creating the new commit.
1131 23594da9 2019-05-13 stsp Without the
1132 23594da9 2019-05-13 stsp .Fl m
1133 23594da9 2019-05-13 stsp option,
1134 23594da9 2019-05-13 stsp .Cm got commit
1135 23594da9 2019-05-13 stsp opens a temporary file in an editor where a log message can be written.
1136 2ec1f75b 2019-03-26 stsp .El
1137 cfce0458 2019-07-28 stsp .Pp
1138 cfce0458 2019-07-28 stsp .Cm got commit
1139 cfce0458 2019-07-28 stsp will refuse to run if certain preconditions are not met.
1140 916f288c 2019-07-30 stsp If the work tree's current branch is not in the
1141 916f288c 2019-07-30 stsp .Dq refs/heads/
1142 916f288c 2019-07-30 stsp reference namespace, new commits may not be created on this branch.
1143 cfce0458 2019-07-28 stsp Local changes may only be committed if they are based on file content
1144 cfce0458 2019-07-28 stsp found in the most recent commit on the work tree's branch.
1145 cfce0458 2019-07-28 stsp If a path is found to be out of date,
1146 cfce0458 2019-07-28 stsp .Cm got update
1147 cfce0458 2019-07-28 stsp must be used first in order to merge local changes with changes made
1148 cfce0458 2019-07-28 stsp in the repository.
1149 97b3a7be 2019-07-09 stsp .It Cm ci
1150 97b3a7be 2019-07-09 stsp Short alias for
1151 97b3a7be 2019-07-09 stsp .Cm commit .
1152 234035bc 2019-06-01 stsp .It Cm cherrypick Ar commit
1153 234035bc 2019-06-01 stsp Merge changes from a single
1154 234035bc 2019-06-01 stsp .Ar commit
1155 234035bc 2019-06-01 stsp into the work tree.
1156 234035bc 2019-06-01 stsp The specified
1157 234035bc 2019-06-01 stsp .Ar commit
1158 234035bc 2019-06-01 stsp must be on a different branch than the work tree's base commit.
1159 a54b6686 2019-06-28 stsp The expected argument is a reference or a commit ID SHA1 hash.
1160 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1161 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
1162 234035bc 2019-06-01 stsp .Pp
1163 234035bc 2019-06-01 stsp Show the status of each affected file, using the following status codes:
1164 234035bc 2019-06-01 stsp .Bl -column YXZ description
1165 234035bc 2019-06-01 stsp .It G Ta file was merged
1166 234035bc 2019-06-01 stsp .It C Ta file was merged and conflicts occurred during merge
1167 234035bc 2019-06-01 stsp .It ! Ta changes destined for a missing file were not merged
1168 234035bc 2019-06-01 stsp .It D Ta file was deleted
1169 2b92fad7 2019-06-02 stsp .It d Ta file's deletion was obstructed by local modifications
1170 234035bc 2019-06-01 stsp .It A Ta new file was added
1171 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1172 74416c47 2019-05-09 stsp .El
1173 234035bc 2019-06-01 stsp .Pp
1174 234035bc 2019-06-01 stsp The merged changes will appear as local changes in the work tree, which
1175 234035bc 2019-06-01 stsp may be viewed with
1176 234035bc 2019-06-01 stsp .Cm got diff ,
1177 234035bc 2019-06-01 stsp amended manually or with further
1178 234035bc 2019-06-01 stsp .Cm got cherrypick
1179 bc3056e3 2019-08-18 stsp commands,
1180 234035bc 2019-06-01 stsp committed with
1181 234035bc 2019-06-01 stsp .Cm got commit ,
1182 234035bc 2019-06-01 stsp or discarded again with
1183 234035bc 2019-06-01 stsp .Cm got revert .
1184 234035bc 2019-06-01 stsp .Pp
1185 234035bc 2019-06-01 stsp .Cm got cherrypick
1186 234035bc 2019-06-01 stsp will refuse to run if certain preconditions are not met.
1187 234035bc 2019-06-01 stsp If the work tree contains multiple base commits it must first be updated
1188 234035bc 2019-06-01 stsp to a single base commit with
1189 234035bc 2019-06-01 stsp .Cm got update .
1190 234035bc 2019-06-01 stsp If the work tree already contains files with merge conflicts, these
1191 234035bc 2019-06-01 stsp conflicts must be resolved first.
1192 016477fd 2019-07-09 stsp .It Cm cy
1193 97b3a7be 2019-07-09 stsp Short alias for
1194 97b3a7be 2019-07-09 stsp .Cm cherrypick .
1195 5ef14e63 2019-06-02 stsp .It Cm backout Ar commit
1196 5ef14e63 2019-06-02 stsp Reverse-merge changes from a single
1197 5ef14e63 2019-06-02 stsp .Ar commit
1198 5ef14e63 2019-06-02 stsp into the work tree.
1199 5ef14e63 2019-06-02 stsp The specified
1200 5ef14e63 2019-06-02 stsp .Ar commit
1201 5ef14e63 2019-06-02 stsp must be on the same branch as the work tree's base commit.
1202 a54b6686 2019-06-28 stsp The expected argument is a reference or a commit ID SHA1 hash.
1203 0db75f06 2019-07-07 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1204 0db75f06 2019-07-07 stsp automatically, provided the abbreviation is unique.
1205 5ef14e63 2019-06-02 stsp .Pp
1206 5ef14e63 2019-06-02 stsp Show the status of each affected file, using the following status codes:
1207 5ef14e63 2019-06-02 stsp .Bl -column YXZ description
1208 5ef14e63 2019-06-02 stsp .It G Ta file was merged
1209 5ef14e63 2019-06-02 stsp .It C Ta file was merged and conflicts occurred during merge
1210 5ef14e63 2019-06-02 stsp .It ! Ta changes destined for a missing file were not merged
1211 5ef14e63 2019-06-02 stsp .It D Ta file was deleted
1212 5ef14e63 2019-06-02 stsp .It d Ta file's deletion was obstructed by local modifications
1213 5ef14e63 2019-06-02 stsp .It A Ta new file was added
1214 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1215 234035bc 2019-06-01 stsp .El
1216 5ef14e63 2019-06-02 stsp .Pp
1217 5ef14e63 2019-06-02 stsp The reverse-merged changes will appear as local changes in the work tree,
1218 5ef14e63 2019-06-02 stsp which may be viewed with
1219 5ef14e63 2019-06-02 stsp .Cm got diff ,
1220 5ef14e63 2019-06-02 stsp amended manually or with further
1221 778a73c2 2019-07-12 stsp .Cm got backout
1222 bc3056e3 2019-08-18 stsp commands,
1223 5ef14e63 2019-06-02 stsp committed with
1224 5ef14e63 2019-06-02 stsp .Cm got commit ,
1225 5ef14e63 2019-06-02 stsp or discarded again with
1226 5ef14e63 2019-06-02 stsp .Cm got revert .
1227 5ef14e63 2019-06-02 stsp .Pp
1228 92228c38 2019-06-02 stsp .Cm got backout
1229 92228c38 2019-06-02 stsp will refuse to run if certain preconditions are not met.
1230 92228c38 2019-06-02 stsp If the work tree contains multiple base commits it must first be updated
1231 92228c38 2019-06-02 stsp to a single base commit with
1232 92228c38 2019-06-02 stsp .Cm got update .
1233 92228c38 2019-06-02 stsp If the work tree already contains files with merge conflicts, these
1234 92228c38 2019-06-02 stsp conflicts must be resolved first.
1235 97b3a7be 2019-07-09 stsp .It Cm bo
1236 97b3a7be 2019-07-09 stsp Short alias for
1237 97b3a7be 2019-07-09 stsp .Cm backout .
1238 dfc23429 2019-08-11 stsp .It Cm rebase Oo Fl a Oc Oo Fl c Oc Op Ar branch
1239 818c7501 2019-07-11 stsp Rebase commits on the specified
1240 818c7501 2019-07-11 stsp .Ar branch
1241 818c7501 2019-07-11 stsp onto the tip of the current branch of the work tree.
1242 818c7501 2019-07-11 stsp The
1243 818c7501 2019-07-11 stsp .Ar branch
1244 818c7501 2019-07-11 stsp must share common ancestry with the work tree's current branch.
1245 bc3056e3 2019-08-18 stsp Rebasing begins with the first descendant commit of the youngest
1246 f09e2405 2019-07-11 stsp common ancestor commit shared by the specified
1247 818c7501 2019-07-11 stsp .Ar branch
1248 818c7501 2019-07-11 stsp and the work tree's current branch, and stops once the tip commit
1249 f09e2405 2019-07-11 stsp of the specified
1250 818c7501 2019-07-11 stsp .Ar branch
1251 f09e2405 2019-07-11 stsp has been rebased.
1252 818c7501 2019-07-11 stsp .Pp
1253 2b6826ba 2020-02-24 stsp When
1254 2b6826ba 2020-02-24 stsp .Cm got rebase
1255 2b6826ba 2020-02-24 stsp is used as intended, the specified
1256 2b6826ba 2020-02-24 stsp .Ar branch
1257 c10890ce 2020-02-25 stsp represents a local commit history and may already contain changes
1258 c10890ce 2020-02-25 stsp that are not yet visible in any other repositories.
1259 2b6826ba 2020-02-24 stsp The work tree's current branch, which must be set with
1260 2b6826ba 2020-02-24 stsp .Cm got update -b
1261 2b6826ba 2020-02-24 stsp before starting the
1262 2b6826ba 2020-02-24 stsp .Cm rebase
1263 2b6826ba 2020-02-24 stsp operation, represents a branch from a remote repository which shares
1264 2b6826ba 2020-02-24 stsp a common history with the specified
1265 2b6826ba 2020-02-24 stsp .Ar branch
1266 c10890ce 2020-02-25 stsp but has progressed, and perhaps diverged, due to commits added to the
1267 c10890ce 2020-02-25 stsp remote repository.
1268 2b6826ba 2020-02-24 stsp .Pp
1269 c6b4581b 2019-07-28 stsp Rebased commits are accumulated on a temporary branch which the work tree
1270 c6b4581b 2019-07-28 stsp will remain switched to throughout the entire rebase operation.
1271 c6b4581b 2019-07-28 stsp Commits on this branch represent the same changes with the same log
1272 c6b4581b 2019-07-28 stsp messages as their counterparts on the original
1273 818c7501 2019-07-11 stsp .Ar branch ,
1274 818c7501 2019-07-11 stsp but with different commit IDs.
1275 818c7501 2019-07-11 stsp Once rebasing has completed successfully, the temporary branch becomes
1276 f09e2405 2019-07-11 stsp the new version of the specified
1277 818c7501 2019-07-11 stsp .Ar branch
1278 818c7501 2019-07-11 stsp and the work tree is automatically switched to it.
1279 818c7501 2019-07-11 stsp .Pp
1280 818c7501 2019-07-11 stsp While rebasing commits, show the status of each affected file,
1281 818c7501 2019-07-11 stsp using the following status codes:
1282 818c7501 2019-07-11 stsp .Bl -column YXZ description
1283 818c7501 2019-07-11 stsp .It G Ta file was merged
1284 818c7501 2019-07-11 stsp .It C Ta file was merged and conflicts occurred during merge
1285 818c7501 2019-07-11 stsp .It ! Ta changes destined for a missing file were not merged
1286 818c7501 2019-07-11 stsp .It D Ta file was deleted
1287 818c7501 2019-07-11 stsp .It d Ta file's deletion was obstructed by local modifications
1288 818c7501 2019-07-11 stsp .It A Ta new file was added
1289 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1290 5ef14e63 2019-06-02 stsp .El
1291 818c7501 2019-07-11 stsp .Pp
1292 f09e2405 2019-07-11 stsp If merge conflicts occur the rebase operation is interrupted and may
1293 f09e2405 2019-07-11 stsp be continued once conflicts have been resolved.
1294 818c7501 2019-07-11 stsp Alternatively, the rebase operation may be aborted which will leave
1295 818c7501 2019-07-11 stsp .Ar branch
1296 818c7501 2019-07-11 stsp unmodified and the work tree switched back to its original branch.
1297 818c7501 2019-07-11 stsp .Pp
1298 ff0d2220 2019-07-11 stsp If a merge conflict is resolved in a way which renders the merged
1299 f09e2405 2019-07-11 stsp change into a no-op change, the corresponding commit will be elided
1300 f09e2405 2019-07-11 stsp when the rebase operation continues.
1301 ff0d2220 2019-07-11 stsp .Pp
1302 818c7501 2019-07-11 stsp .Cm got rebase
1303 818c7501 2019-07-11 stsp will refuse to run if certain preconditions are not met.
1304 a85446b2 2020-01-04 stsp If the work tree is not yet fully updated to the tip commit of its
1305 a85446b2 2020-01-04 stsp branch then the work tree must first be updated with
1306 818c7501 2019-07-11 stsp .Cm got update .
1307 4ed9f614 2019-08-04 stsp If changes have been staged with
1308 4ed9f614 2019-08-04 stsp .Cm got stage ,
1309 bc3056e3 2019-08-18 stsp these changes must first be committed with
1310 4ed9f614 2019-08-04 stsp .Cm got commit
1311 4ed9f614 2019-08-04 stsp or unstaged with
1312 4ed9f614 2019-08-04 stsp .Cm got unstage .
1313 f09e2405 2019-07-11 stsp If the work tree contains local changes, these changes must first be
1314 f09e2405 2019-07-11 stsp committed with
1315 f09e2405 2019-07-11 stsp .Cm got commit
1316 f09e2405 2019-07-11 stsp or reverted with
1317 f09e2405 2019-07-11 stsp .Cm got revert .
1318 64c6d990 2019-07-11 stsp If the
1319 64c6d990 2019-07-11 stsp .Ar branch
1320 64c6d990 2019-07-11 stsp contains changes to files outside of the work tree's path prefix,
1321 64c6d990 2019-07-11 stsp the work tree cannot be used to rebase this branch.
1322 818c7501 2019-07-11 stsp .Pp
1323 7d5807f4 2019-07-11 stsp The
1324 7d5807f4 2019-07-11 stsp .Cm got update
1325 7d5807f4 2019-07-11 stsp and
1326 7d5807f4 2019-07-11 stsp .Cm got commit
1327 7d5807f4 2019-07-11 stsp commands will refuse to run while a rebase operation is in progress.
1328 7d5807f4 2019-07-11 stsp Other commands which manipulate the work tree may be used for
1329 7d5807f4 2019-07-11 stsp conflict resolution purposes.
1330 818c7501 2019-07-11 stsp .Pp
1331 818c7501 2019-07-11 stsp The options for
1332 818c7501 2019-07-11 stsp .Cm got rebase
1333 818c7501 2019-07-11 stsp are as follows:
1334 818c7501 2019-07-11 stsp .Bl -tag -width Ds
1335 818c7501 2019-07-11 stsp .It Fl a
1336 818c7501 2019-07-11 stsp Abort an interrupted rebase operation.
1337 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
1338 818c7501 2019-07-11 stsp .It Fl c
1339 06067b48 2019-07-11 stsp Continue an interrupted rebase operation.
1340 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
1341 818c7501 2019-07-11 stsp .El
1342 818c7501 2019-07-11 stsp .It Cm rb
1343 818c7501 2019-07-11 stsp Short alias for
1344 818c7501 2019-07-11 stsp .Cm rebase .
1345 083957f4 2020-02-24 stsp .It Cm histedit Oo Fl a Oc Oo Fl c Oc Oo Fl F Ar histedit-script Oc Oo Fl m Oc
1346 0ebf8283 2019-07-24 stsp Edit commit history between the work tree's current base commit and
1347 0ebf8283 2019-07-24 stsp the tip commit of the work tree's current branch.
1348 6e54d307 2020-02-24 stsp .Pp
1349 6e54d307 2020-02-24 stsp Before starting a
1350 6e54d307 2020-02-24 stsp .Cm histedit
1351 6e54d307 2020-02-24 stsp operation the work tree's current branch must be set with
1352 6e54d307 2020-02-24 stsp .Cm got update -b
1353 6e54d307 2020-02-24 stsp to the branch which should be edited, unless this branch is already the
1354 6e54d307 2020-02-24 stsp current branch of the work tree.
1355 6e54d307 2020-02-24 stsp The tip of this branch represents the upper bound (inclusive) of commits
1356 6e54d307 2020-02-24 stsp touched by the
1357 6e54d307 2020-02-24 stsp .Cm histedit
1358 6e54d307 2020-02-24 stsp operation.
1359 0ebf8283 2019-07-24 stsp .Pp
1360 6e54d307 2020-02-24 stsp Furthermore, the work tree's base commit
1361 6e54d307 2020-02-24 stsp must be set with
1362 6e54d307 2020-02-24 stsp .Cm got update -c
1363 6e54d307 2020-02-24 stsp to a point in this branch's commit history where editing should begin.
1364 6e54d307 2020-02-24 stsp This commit represents the lower bound (non-inclusive) of commits touched
1365 6e54d307 2020-02-24 stsp by the
1366 6e54d307 2020-02-24 stsp .Cm histedit
1367 6e54d307 2020-02-24 stsp operation.
1368 6e54d307 2020-02-24 stsp .Pp
1369 0ebf8283 2019-07-24 stsp Editing of commit history is controlled via a
1370 0ebf8283 2019-07-24 stsp .Ar histedit script
1371 46fa4c83 2020-02-24 stsp which can be written in an editor based on a template, passed on the
1372 46fa4c83 2020-02-24 stsp command line, or generated with the
1373 083957f4 2020-02-24 stsp .Fl m
1374 083957f4 2020-02-24 stsp option if only log messages need to be edited.
1375 083957f4 2020-02-24 stsp .Pp
1376 0ebf8283 2019-07-24 stsp The format of the histedit script is line-based.
1377 0ebf8283 2019-07-24 stsp Each line in the script begins with a command name, followed by
1378 0ebf8283 2019-07-24 stsp whitespace and an argument.
1379 0ebf8283 2019-07-24 stsp For most commands, the expected argument is a commit ID SHA1 hash.
1380 0ebf8283 2019-07-24 stsp Any remaining text on the line is ignored.
1381 0ebf8283 2019-07-24 stsp Lines which begin with the
1382 0ebf8283 2019-07-24 stsp .Sq #
1383 0ebf8283 2019-07-24 stsp character are ignored entirely.
1384 0ebf8283 2019-07-24 stsp .Pp
1385 0ebf8283 2019-07-24 stsp The available commands are as follows:
1386 0ebf8283 2019-07-24 stsp .Bl -column YXZ pick-commit
1387 0ebf8283 2019-07-24 stsp .It pick Ar commit Ta Use the specified commit as it is.
1388 a698f62e 2019-07-25 stsp .It edit Ar commit Ta Use the specified commit but once changes have been
1389 0ebf8283 2019-07-24 stsp merged into the work tree interrupt the histedit operation for amending.
1390 0ebf8283 2019-07-24 stsp .It fold Ar commit Ta Combine the specified commit with the next commit
1391 0ebf8283 2019-07-24 stsp listed further below that will be used.
1392 0ebf8283 2019-07-24 stsp .It drop Ar commit Ta Remove this commit from the edited history.
1393 0ebf8283 2019-07-24 stsp .It mesg Ar log-message Ta Use the specified single-line log message for
1394 0ebf8283 2019-07-24 stsp the commit on the previous line.
1395 0ebf8283 2019-07-24 stsp If the log message argument is left empty, open an editor where a new
1396 0ebf8283 2019-07-24 stsp log message can be written.
1397 0ebf8283 2019-07-24 stsp .El
1398 0ebf8283 2019-07-24 stsp .Pp
1399 ba67992e 2019-07-25 stsp Every commit in the history being edited must be mentioned in the script.
1400 0ebf8283 2019-07-24 stsp Lines may be re-ordered to change the order of commits in the edited history.
1401 5b87815e 2020-03-05 stsp No commit may be listed more than once.
1402 0ebf8283 2019-07-24 stsp .Pp
1403 c6b4581b 2019-07-28 stsp Edited commits are accumulated on a temporary branch which the work tree
1404 c6b4581b 2019-07-28 stsp will remain switched to throughout the entire histedit operation.
1405 0ebf8283 2019-07-24 stsp Once history editing has completed successfully, the temporary branch becomes
1406 498a90b7 2019-07-25 stsp the new version of the work tree's branch and the work tree is automatically
1407 498a90b7 2019-07-25 stsp switched to it.
1408 0ebf8283 2019-07-24 stsp .Pp
1409 0ebf8283 2019-07-24 stsp While merging commits, show the status of each affected file,
1410 0ebf8283 2019-07-24 stsp using the following status codes:
1411 0ebf8283 2019-07-24 stsp .Bl -column YXZ description
1412 0ebf8283 2019-07-24 stsp .It G Ta file was merged
1413 0ebf8283 2019-07-24 stsp .It C Ta file was merged and conflicts occurred during merge
1414 0ebf8283 2019-07-24 stsp .It ! Ta changes destined for a missing file were not merged
1415 0ebf8283 2019-07-24 stsp .It D Ta file was deleted
1416 0ebf8283 2019-07-24 stsp .It d Ta file's deletion was obstructed by local modifications
1417 0ebf8283 2019-07-24 stsp .It A Ta new file was added
1418 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1419 0ebf8283 2019-07-24 stsp .El
1420 0ebf8283 2019-07-24 stsp .Pp
1421 0ebf8283 2019-07-24 stsp If merge conflicts occur the histedit operation is interrupted and may
1422 0ebf8283 2019-07-24 stsp be continued once conflicts have been resolved.
1423 0ebf8283 2019-07-24 stsp Alternatively, the histedit operation may be aborted which will leave
1424 0ebf8283 2019-07-24 stsp the work tree switched back to its original branch.
1425 0ebf8283 2019-07-24 stsp .Pp
1426 0ebf8283 2019-07-24 stsp If a merge conflict is resolved in a way which renders the merged
1427 0ebf8283 2019-07-24 stsp change into a no-op change, the corresponding commit will be elided
1428 0ebf8283 2019-07-24 stsp when the histedit operation continues.
1429 0ebf8283 2019-07-24 stsp .Pp
1430 0ebf8283 2019-07-24 stsp .Cm got histedit
1431 0ebf8283 2019-07-24 stsp will refuse to run if certain preconditions are not met.
1432 c7d20a3f 2019-07-30 stsp If the work tree's current branch is not in the
1433 c7d20a3f 2019-07-30 stsp .Dq refs/heads/
1434 c7d20a3f 2019-07-30 stsp reference namespace, the history of the branch may not be edited.
1435 0ebf8283 2019-07-24 stsp If the work tree contains multiple base commits it must first be updated
1436 0ebf8283 2019-07-24 stsp to a single base commit with
1437 0ebf8283 2019-07-24 stsp .Cm got update .
1438 4ed9f614 2019-08-04 stsp If changes have been staged with
1439 4ed9f614 2019-08-04 stsp .Cm got stage ,
1440 bc3056e3 2019-08-18 stsp these changes must first be committed with
1441 4ed9f614 2019-08-04 stsp .Cm got commit
1442 4ed9f614 2019-08-04 stsp or unstaged with
1443 4ed9f614 2019-08-04 stsp .Cm got unstage .
1444 0ebf8283 2019-07-24 stsp If the work tree contains local changes, these changes must first be
1445 0ebf8283 2019-07-24 stsp committed with
1446 0ebf8283 2019-07-24 stsp .Cm got commit
1447 0ebf8283 2019-07-24 stsp or reverted with
1448 0ebf8283 2019-07-24 stsp .Cm got revert .
1449 0ebf8283 2019-07-24 stsp If the edited history contains changes to files outside of the work tree's
1450 0ebf8283 2019-07-24 stsp path prefix, the work tree cannot be used to edit the history of this branch.
1451 0ebf8283 2019-07-24 stsp .Pp
1452 0ebf8283 2019-07-24 stsp The
1453 7ef62c4e 2020-02-24 stsp .Cm got update ,
1454 7ef62c4e 2020-02-24 stsp .Cm got rebase ,
1455 65db4ffb 2020-02-24 stsp and
1456 65db4ffb 2020-02-24 stsp .Cm got integrate
1457 65db4ffb 2020-02-24 stsp commands will refuse to run while a histedit operation is in progress.
1458 a698f62e 2019-07-25 stsp Other commands which manipulate the work tree may be used, and the
1459 0ebf8283 2019-07-24 stsp .Cm got commit
1460 a698f62e 2019-07-25 stsp command may be used to commit arbitrary changes to the temporary branch
1461 a698f62e 2019-07-25 stsp while the histedit operation is interrupted.
1462 0ebf8283 2019-07-24 stsp .Pp
1463 0ebf8283 2019-07-24 stsp The options for
1464 0ebf8283 2019-07-24 stsp .Cm got histedit
1465 0ebf8283 2019-07-24 stsp are as follows:
1466 0ebf8283 2019-07-24 stsp .Bl -tag -width Ds
1467 0ebf8283 2019-07-24 stsp .It Fl a
1468 0ebf8283 2019-07-24 stsp Abort an interrupted histedit operation.
1469 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
1470 0ebf8283 2019-07-24 stsp .It Fl c
1471 0ebf8283 2019-07-24 stsp Continue an interrupted histedit operation.
1472 c478f6d8 2019-08-08 stsp If this option is used, no other command-line arguments are allowed.
1473 ddbfac99 2020-02-24 stsp .It Fl F Ar histedit-script
1474 ddbfac99 2020-02-24 stsp Use the specified
1475 ddbfac99 2020-02-24 stsp .Ar histedit-script
1476 ddbfac99 2020-02-24 stsp instead of opening a temporary file in an editor where a histedit script
1477 ddbfac99 2020-02-24 stsp can be written.
1478 083957f4 2020-02-24 stsp .It Fl m
1479 083957f4 2020-02-24 stsp Edit log messages only.
1480 083957f4 2020-02-24 stsp This option is a quick equivalent to a histedit script which edits
1481 2bdefe56 2020-02-24 tracey only log messages but otherwise leaves every picked commit as-is.
1482 083957f4 2020-02-24 stsp The
1483 083957f4 2020-02-24 stsp .Fl m
1484 083957f4 2020-02-24 stsp option can only be used when starting a new histedit operation.
1485 083957f4 2020-02-24 stsp If this option is used, no other command-line arguments are allowed.
1486 818c7501 2019-07-11 stsp .El
1487 0ebf8283 2019-07-24 stsp .It Cm he
1488 0ebf8283 2019-07-24 stsp Short alias for
1489 0ebf8283 2019-07-24 stsp .Cm histedit .
1490 2822a352 2019-10-15 stsp .It Cm integrate Ar branch
1491 2822a352 2019-10-15 stsp Integrate the specified
1492 2822a352 2019-10-15 stsp .Ar branch
1493 2822a352 2019-10-15 stsp into the work tree's current branch.
1494 2822a352 2019-10-15 stsp Files in the work tree are updated to match the contents on the integrated
1495 2822a352 2019-10-15 stsp .Ar branch ,
1496 2822a352 2019-10-15 stsp and the reference of the work tree's branch is changed to point at the
1497 2822a352 2019-10-15 stsp head commit of the integrated
1498 2822a352 2019-10-15 stsp .Ar branch .
1499 2822a352 2019-10-15 stsp .Pp
1500 2822a352 2019-10-15 stsp Both branches can be considered equivalent after integration since they
1501 2822a352 2019-10-15 stsp will be pointing at the same commit.
1502 2822a352 2019-10-15 stsp Both branches remain available for future work, if desired.
1503 2822a352 2019-10-15 stsp In case the integrated
1504 2822a352 2019-10-15 stsp .Ar branch
1505 2822a352 2019-10-15 stsp is no longer needed it may be deleted with
1506 2822a352 2019-10-15 stsp .Cm got branch -d .
1507 2822a352 2019-10-15 stsp .Pp
1508 2822a352 2019-10-15 stsp Show the status of each affected file, using the following status codes:
1509 2822a352 2019-10-15 stsp .Bl -column YXZ description
1510 2822a352 2019-10-15 stsp .It U Ta file was updated
1511 2822a352 2019-10-15 stsp .It D Ta file was deleted
1512 2822a352 2019-10-15 stsp .It A Ta new file was added
1513 2822a352 2019-10-15 stsp .It \(a~ Ta versioned file is obstructed by a non-regular file
1514 2822a352 2019-10-15 stsp .It ! Ta a missing versioned file was restored
1515 2822a352 2019-10-15 stsp .El
1516 2822a352 2019-10-15 stsp .Pp
1517 2822a352 2019-10-15 stsp .Cm got integrate
1518 2822a352 2019-10-15 stsp will refuse to run if certain preconditions are not met.
1519 2822a352 2019-10-15 stsp Most importantly, the
1520 2822a352 2019-10-15 stsp .Ar branch
1521 2822a352 2019-10-15 stsp must have been rebased onto the work tree's current branch with
1522 2822a352 2019-10-15 stsp .Cm got rebase
1523 2822a352 2019-10-15 stsp before it can be integrated, in order to linearize commit history and
1524 2822a352 2019-10-15 stsp resolve merge conflicts.
1525 2822a352 2019-10-15 stsp If the work tree contains multiple base commits it must first be updated
1526 2822a352 2019-10-15 stsp to a single base commit with
1527 2822a352 2019-10-15 stsp .Cm got update .
1528 2822a352 2019-10-15 stsp If changes have been staged with
1529 2822a352 2019-10-15 stsp .Cm got stage ,
1530 2822a352 2019-10-15 stsp these changes must first be committed with
1531 2822a352 2019-10-15 stsp .Cm got commit
1532 2822a352 2019-10-15 stsp or unstaged with
1533 2822a352 2019-10-15 stsp .Cm got unstage .
1534 2822a352 2019-10-15 stsp If the work tree contains local changes, these changes must first be
1535 2822a352 2019-10-15 stsp committed with
1536 2822a352 2019-10-15 stsp .Cm got commit
1537 2822a352 2019-10-15 stsp or reverted with
1538 2822a352 2019-10-15 stsp .Cm got revert .
1539 2822a352 2019-10-15 stsp .It Cm ig
1540 2822a352 2019-10-15 stsp Short alias for
1541 2822a352 2019-10-15 stsp .Cm integrate .
1542 dfc23429 2019-08-11 stsp .It Cm stage Oo Fl l Oc Oo Fl p Oc Oo Fl F Ar response-script Oc Op Ar path ...
1543 2db2652d 2019-08-07 stsp Stage local changes for inclusion in the next commit.
1544 2db2652d 2019-08-07 stsp If no
1545 2db2652d 2019-08-07 stsp .Ar path
1546 2db2652d 2019-08-07 stsp is specified, stage all changes in the work tree.
1547 2db2652d 2019-08-07 stsp Otherwise, stage changes at or within the specified paths.
1548 4ed9f614 2019-08-04 stsp Paths may be staged if they are added, modified, or deleted according to
1549 4ed9f614 2019-08-04 stsp .Cm got status .
1550 4ed9f614 2019-08-04 stsp .Pp
1551 9d8b19a4 2019-08-04 stsp Show the status of each affected file, using the following status codes:
1552 9d8b19a4 2019-08-04 stsp .Bl -column YXZ description
1553 9d8b19a4 2019-08-04 stsp .It A Ta file addition has been staged
1554 9d8b19a4 2019-08-04 stsp .It M Ta file modification has been staged
1555 9d8b19a4 2019-08-04 stsp .It D Ta file deletion has been staged
1556 9d8b19a4 2019-08-04 stsp .El
1557 9d8b19a4 2019-08-04 stsp .Pp
1558 9d8b19a4 2019-08-04 stsp Staged file contents are saved in newly created blob objects in the repository.
1559 52c8d4ac 2019-08-04 stsp These blobs will be referred to by tree objects once staged changes have been
1560 9d8b19a4 2019-08-04 stsp committed.
1561 9d8b19a4 2019-08-04 stsp .Pp
1562 890ea719 2019-08-04 stsp Staged changes affect the behaviour of
1563 4ed9f614 2019-08-04 stsp .Cm got commit ,
1564 4ed9f614 2019-08-04 stsp .Cm got status ,
1565 4ed9f614 2019-08-04 stsp and
1566 4ed9f614 2019-08-04 stsp .Cm got diff .
1567 4ed9f614 2019-08-04 stsp While paths with staged changes exist, the
1568 4ed9f614 2019-08-04 stsp .Cm got commit
1569 4ed9f614 2019-08-04 stsp command will refuse to commit any paths which do not have staged changes.
1570 4ed9f614 2019-08-04 stsp Local changes created on top of staged changes can only be committed if
1571 4ed9f614 2019-08-04 stsp the path is staged again, or if the staged changes are committed first.
1572 4ed9f614 2019-08-04 stsp The
1573 4ed9f614 2019-08-04 stsp .Cm got status
1574 4ed9f614 2019-08-04 stsp command will show both local changes and staged changes.
1575 4ed9f614 2019-08-04 stsp The
1576 4ed9f614 2019-08-04 stsp .Cm got diff
1577 ecf14362 2019-08-04 stsp command is able to display local changes relative to staged changes,
1578 ecf14362 2019-08-04 stsp and to display staged changes relative to the repository.
1579 4ed9f614 2019-08-04 stsp The
1580 4ed9f614 2019-08-04 stsp .Cm got revert
1581 4ed9f614 2019-08-04 stsp command cannot revert staged changes but may be used to revert
1582 4f2494e6 2019-08-08 stsp local changes created on top of staged changes.
1583 4ed9f614 2019-08-04 stsp .Pp
1584 4ed9f614 2019-08-04 stsp The options for
1585 4ed9f614 2019-08-04 stsp .Cm got stage
1586 4ed9f614 2019-08-04 stsp are as follows:
1587 4ed9f614 2019-08-04 stsp .Bl -tag -width Ds
1588 4ed9f614 2019-08-04 stsp .It Fl l
1589 4ed9f614 2019-08-04 stsp Instead of staging new changes, list paths which are already staged,
1590 9d8b19a4 2019-08-04 stsp along with the IDs of staged blob objects and stage status codes.
1591 9d8b19a4 2019-08-04 stsp If paths were provided in the command line show the staged paths
1592 1dd86744 2019-08-12 anthony among the specified paths.
1593 1dd86744 2019-08-12 anthony Otherwise, show all staged paths.
1594 dc424a06 2019-08-07 stsp .It Fl p
1595 dc424a06 2019-08-07 stsp Instead of staging the entire content of a changed file, interactively
1596 dc424a06 2019-08-07 stsp select or reject changes for staging based on
1597 dc424a06 2019-08-07 stsp .Dq y
1598 6d23ec10 2019-08-08 stsp (stage change),
1599 dc424a06 2019-08-07 stsp .Dq n
1600 6d23ec10 2019-08-08 stsp (reject change), and
1601 b353a198 2019-08-07 stsp .Dq q
1602 6d23ec10 2019-08-08 stsp (quit staging this file) responses.
1603 dc424a06 2019-08-07 stsp If a file is in modified status, individual patches derived from the
1604 dc424a06 2019-08-07 stsp modified file content can be staged.
1605 6d23ec10 2019-08-08 stsp Files in added or deleted status may only be staged or rejected in
1606 6d23ec10 2019-08-08 stsp their entirety.
1607 3a070a2b 2019-08-07 stsp .It Fl F Ar response-script
1608 dc424a06 2019-08-07 stsp With the
1609 dc424a06 2019-08-07 stsp .Fl p
1610 3a070a2b 2019-08-07 stsp option, read
1611 3a070a2b 2019-08-07 stsp .Dq y ,
1612 3a070a2b 2019-08-07 stsp .Dq n ,
1613 3a070a2b 2019-08-07 stsp and
1614 3a070a2b 2019-08-07 stsp .Dq q
1615 0e2f5884 2019-08-07 stsp responses line-by-line from the specified
1616 0e2f5884 2019-08-07 stsp .Ar response-script
1617 0e2f5884 2019-08-07 stsp file instead of prompting interactively.
1618 4ed9f614 2019-08-04 stsp .El
1619 4ed9f614 2019-08-04 stsp .Pp
1620 4ed9f614 2019-08-04 stsp .Cm got stage
1621 4ed9f614 2019-08-04 stsp will refuse to run if certain preconditions are not met.
1622 4ed9f614 2019-08-04 stsp If a file contains merge conflicts, these conflicts must be resolved first.
1623 4ed9f614 2019-08-04 stsp If a file is found to be out of date relative to the head commit on the
1624 4ed9f614 2019-08-04 stsp work tree's current branch, the file must be updated with
1625 4ed9f614 2019-08-04 stsp .Cm got update
1626 4ed9f614 2019-08-04 stsp before it can be staged (however, this does not prevent the file from
1627 4ed9f614 2019-08-04 stsp becoming out-of-date at some point after having been staged).
1628 4ed9f614 2019-08-04 stsp .Pp
1629 4ed9f614 2019-08-04 stsp The
1630 4ed9f614 2019-08-04 stsp .Cm got update ,
1631 4ed9f614 2019-08-04 stsp .Cm got rebase ,
1632 4ed9f614 2019-08-04 stsp and
1633 4ed9f614 2019-08-04 stsp .Cm got histedit
1634 4ed9f614 2019-08-04 stsp commands will refuse to run while staged changes exist.
1635 4ed9f614 2019-08-04 stsp If staged changes cannot be committed because a staged path
1636 4ed9f614 2019-08-04 stsp is out of date, the path must be unstaged with
1637 4ed9f614 2019-08-04 stsp .Cm got unstage
1638 4ed9f614 2019-08-04 stsp before it can be updated with
1639 4ed9f614 2019-08-04 stsp .Cm got update ,
1640 4ed9f614 2019-08-04 stsp and may then be staged again if necessary.
1641 4ed9f614 2019-08-04 stsp .It Cm sg
1642 4ed9f614 2019-08-04 stsp Short alias for
1643 4ed9f614 2019-08-04 stsp .Cm stage .
1644 dfc23429 2019-08-11 stsp .It Cm unstage Oo Fl p Oc Oo Fl F Ar response-script Oc Op Ar path ...
1645 4ed9f614 2019-08-04 stsp Merge staged changes back into the work tree and put affected paths
1646 4ed9f614 2019-08-04 stsp back into non-staged status.
1647 4ed9f614 2019-08-04 stsp If no
1648 4ed9f614 2019-08-04 stsp .Ar path
1649 4ed9f614 2019-08-04 stsp is specified, unstage all staged changes across the entire work tree.
1650 2db2652d 2019-08-07 stsp Otherwise, unstage changes at or within the specified paths.
1651 4ed9f614 2019-08-04 stsp .Pp
1652 4ed9f614 2019-08-04 stsp Show the status of each affected file, using the following status codes:
1653 4ed9f614 2019-08-04 stsp .Bl -column YXZ description
1654 4ed9f614 2019-08-04 stsp .It G Ta file was unstaged
1655 4ed9f614 2019-08-04 stsp .It C Ta file was unstaged and conflicts occurred during merge
1656 4ed9f614 2019-08-04 stsp .It ! Ta changes destined for a missing file were not merged
1657 4ed9f614 2019-08-04 stsp .It D Ta file was staged as deleted and still is deleted
1658 4ed9f614 2019-08-04 stsp .It d Ta file's deletion was obstructed by local modifications
1659 1dd86744 2019-08-12 anthony .It \(a~ Ta changes destined for a non-regular file were not merged
1660 4ed9f614 2019-08-04 stsp .El
1661 2e1f37b0 2019-08-08 stsp .Pp
1662 2e1f37b0 2019-08-08 stsp The options for
1663 2e1f37b0 2019-08-08 stsp .Cm got unstage
1664 2e1f37b0 2019-08-08 stsp are as follows:
1665 2e1f37b0 2019-08-08 stsp .Bl -tag -width Ds
1666 2e1f37b0 2019-08-08 stsp .It Fl p
1667 2e1f37b0 2019-08-08 stsp Instead of unstaging the entire content of a changed file, interactively
1668 2e1f37b0 2019-08-08 stsp select or reject changes for unstaging based on
1669 2e1f37b0 2019-08-08 stsp .Dq y
1670 2e1f37b0 2019-08-08 stsp (unstage change),
1671 2e1f37b0 2019-08-08 stsp .Dq n
1672 2e1f37b0 2019-08-08 stsp (keep change staged), and
1673 2e1f37b0 2019-08-08 stsp .Dq q
1674 2e1f37b0 2019-08-08 stsp (quit unstaging this file) responses.
1675 2e1f37b0 2019-08-08 stsp If a file is staged in modified status, individual patches derived from the
1676 2e1f37b0 2019-08-08 stsp staged file content can be unstaged.
1677 2e1f37b0 2019-08-08 stsp Files staged in added or deleted status may only be unstaged in their entirety.
1678 2e1f37b0 2019-08-08 stsp .It Fl F Ar response-script
1679 2e1f37b0 2019-08-08 stsp With the
1680 2e1f37b0 2019-08-08 stsp .Fl p
1681 2e1f37b0 2019-08-08 stsp option, read
1682 2e1f37b0 2019-08-08 stsp .Dq y ,
1683 2e1f37b0 2019-08-08 stsp .Dq n ,
1684 2e1f37b0 2019-08-08 stsp and
1685 2e1f37b0 2019-08-08 stsp .Dq q
1686 2e1f37b0 2019-08-08 stsp responses line-by-line from the specified
1687 2e1f37b0 2019-08-08 stsp .Ar response-script
1688 2e1f37b0 2019-08-08 stsp file instead of prompting interactively.
1689 2e1f37b0 2019-08-08 stsp .El
1690 4ed9f614 2019-08-04 stsp .It Cm ug
1691 4ed9f614 2019-08-04 stsp Short alias for
1692 4ed9f614 2019-08-04 stsp .Cm unstage .
1693 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 ...
1694 896e9b6f 2019-08-26 stsp Parse and print contents of objects to standard output in a line-based
1695 896e9b6f 2019-08-26 stsp text format.
1696 896e9b6f 2019-08-26 stsp Content of commit, tree, and tag objects is printed in a way similar
1697 896e9b6f 2019-08-26 stsp to the actual content stored in such objects.
1698 896e9b6f 2019-08-26 stsp Blob object contents are printed as they would appear in files on disk.
1699 896e9b6f 2019-08-26 stsp .Pp
1700 896e9b6f 2019-08-26 stsp Attempt to interpret each argument as a reference, a tag name, or
1701 896e9b6f 2019-08-26 stsp an object ID SHA1 hash.
1702 01073a5d 2019-08-22 stsp References will be resolved to an object ID.
1703 01073a5d 2019-08-22 stsp Tag names will resolved to a tag object.
1704 01073a5d 2019-08-22 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1705 01073a5d 2019-08-22 stsp automatically, provided the abbreviation is unique.
1706 01073a5d 2019-08-22 stsp .Pp
1707 896e9b6f 2019-08-26 stsp If none of the above interpretations produce a valid result, or if the
1708 896e9b6f 2019-08-26 stsp .Fl P
1709 896e9b6f 2019-08-26 stsp option is used, attempt to interpret the argument as a path which will
1710 896e9b6f 2019-08-26 stsp be resolved to the ID of an object found at this path in the repository.
1711 896e9b6f 2019-08-26 stsp .Pp
1712 01073a5d 2019-08-22 stsp The options for
1713 01073a5d 2019-08-22 stsp .Cm got cat
1714 01073a5d 2019-08-22 stsp are as follows:
1715 01073a5d 2019-08-22 stsp .Bl -tag -width Ds
1716 896e9b6f 2019-08-26 stsp .It Fl c Ar commit
1717 896e9b6f 2019-08-26 stsp Look up paths in the specified
1718 896e9b6f 2019-08-26 stsp .Ar commit .
1719 896e9b6f 2019-08-26 stsp If this option is not used, paths are looked up in the commit resolved
1720 896e9b6f 2019-08-26 stsp via the repository's HEAD reference.
1721 896e9b6f 2019-08-26 stsp The expected argument is a commit ID SHA1 hash or an existing reference
1722 896e9b6f 2019-08-26 stsp or tag name which will be resolved to a commit ID.
1723 896e9b6f 2019-08-26 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1724 896e9b6f 2019-08-26 stsp automatically, provided the abbreviation is unique.
1725 01073a5d 2019-08-22 stsp .It Fl r Ar repository-path
1726 01073a5d 2019-08-22 stsp Use the repository at the specified path.
1727 01073a5d 2019-08-22 stsp If not specified, assume the repository is located at or above the current
1728 01073a5d 2019-08-22 stsp working directory.
1729 01073a5d 2019-08-22 stsp If this directory is a
1730 01073a5d 2019-08-22 stsp .Nm
1731 01073a5d 2019-08-22 stsp work tree, use the repository path associated with this work tree.
1732 896e9b6f 2019-08-26 stsp .It Fl P
1733 896e9b6f 2019-08-26 stsp Interpret all arguments as paths only.
1734 896e9b6f 2019-08-26 stsp This option can be used to resolve ambiguity in cases where paths
1735 896e9b6f 2019-08-26 stsp look like tag names, reference names, or object IDs.
1736 4ed9f614 2019-08-04 stsp .El
1737 01073a5d 2019-08-22 stsp .El
1738 74416c47 2019-05-09 stsp .Sh ENVIRONMENT
1739 74416c47 2019-05-09 stsp .Bl -tag -width GOT_AUTHOR
1740 74416c47 2019-05-09 stsp .It Ev GOT_AUTHOR
1741 74416c47 2019-05-09 stsp The author's name and email address for
1742 21a44f98 2019-07-15 stsp .Cm got commit
1743 21a44f98 2019-07-15 stsp and
1744 21a44f98 2019-07-15 stsp .Cm got import ,
1745 74416c47 2019-05-09 stsp for example:
1746 aba9c984 2019-09-08 stsp .Dq An Flan Hacker Aq Mt flan_hacker@openbsd.org .
1747 84792843 2019-08-09 stsp Because
1748 0e444aba 2019-08-08 stsp .Xr git 1
1749 84792843 2019-08-09 stsp may fail to parse commits without an email address in author data,
1750 0e444aba 2019-08-08 stsp .Nm
1751 84792843 2019-08-09 stsp attempts to reject
1752 0e444aba 2019-08-08 stsp .Ev GOT_AUTHOR
1753 84792843 2019-08-09 stsp environment variables with a missing email address.
1754 c9956ddf 2019-09-08 stsp .Pp
1755 c9956ddf 2019-09-08 stsp If present, Git's
1756 aba9c984 2019-09-08 stsp .Dv user.name
1757 aba9c984 2019-09-08 stsp and
1758 709ae9eb 2019-09-08 stsp .Dv user.email
1759 709ae9eb 2019-09-08 stsp configuration settings in the repository's
1760 aba9c984 2019-09-08 stsp .Pa .git/config
1761 aba9c984 2019-09-08 stsp file will override the value of
1762 aba9c984 2019-09-08 stsp .Ev GOT_AUTHOR .
1763 c9956ddf 2019-09-08 stsp However, the
1764 c9956ddf 2019-09-08 stsp .Dv user.name
1765 c9956ddf 2019-09-08 stsp and
1766 c9956ddf 2019-09-08 stsp .Dv user.email
1767 c9956ddf 2019-09-08 stsp configuration settings contained in Git's global
1768 c9956ddf 2019-09-08 stsp .Pa ~/.gitconfig
1769 c9956ddf 2019-09-08 stsp configuration file will be used only if the
1770 c9956ddf 2019-09-08 stsp .Ev GOT_AUTHOR
1771 c9956ddf 2019-09-08 stsp environment variable is
1772 c9956ddf 2019-09-08 stsp .Em not
1773 c9956ddf 2019-09-08 stsp set.
1774 1dd86744 2019-08-12 anthony .It Ev VISUAL , EDITOR
1775 23594da9 2019-05-13 stsp The editor spawned by
1776 8e7bd50a 2019-08-22 stsp .Cm got commit ,
1777 8e7bd50a 2019-08-22 stsp .Cm got import ,
1778 8e7bd50a 2019-08-22 stsp or
1779 8e7bd50a 2019-08-22 stsp .Cm got tag .
1780 b1ebc001 2019-08-13 stsp .It Ev GOT_LOG_DEFAULT_LIMIT
1781 b1ebc001 2019-08-13 stsp The default limit on the number of commits traversed by
1782 b1ebc001 2019-08-13 stsp .Cm got log .
1783 b1ebc001 2019-08-13 stsp If set to zero, the limit is unbounded.
1784 b1ebc001 2019-08-13 stsp This variable will be silently ignored if it is set to a non-numeric value.
1785 74416c47 2019-05-09 stsp .El
1786 5c860e29 2018-03-12 stsp .Sh EXIT STATUS
1787 5c860e29 2018-03-12 stsp .Ex -std got
1788 97925469 2018-03-17 stsp .Sh EXAMPLES
1789 fa6e0e48 2019-05-23 stsp Clone an existing Git repository for use with
1790 fa6e0e48 2019-05-23 stsp .Nm .
1791 fd039d72 2020-03-18 stsp .Pp
1792 fd039d72 2020-03-18 stsp .Dl $ cd /var/git/
1793 fd039d72 2020-03-18 stsp .Dl $ got clone ssh://git@github.com/openbsd/src.git
1794 fd039d72 2020-03-18 stsp .Pp
1795 fd039d72 2020-03-18 stsp Use of HTTP URLs currently requires
1796 fa6e0e48 2019-05-23 stsp .Xr git 1 :
1797 d83d9d5c 2019-05-13 stsp .Pp
1798 fa6e0e48 2019-05-23 stsp .Dl $ cd /var/git/
1799 fa6e0e48 2019-05-23 stsp .Dl $ git clone --bare https://github.com/openbsd/src.git
1800 fa6e0e48 2019-05-23 stsp .Pp
1801 3ce1b845 2019-07-15 stsp Alternatively, for quick and dirty local testing of
1802 3ce1b845 2019-07-15 stsp .Nm
1803 3ce1b845 2019-07-15 stsp a new Git repository could be created and populated with files,
1804 3ce1b845 2019-07-15 stsp e.g. from a temporary CVS checkout located at
1805 3ce1b845 2019-07-15 stsp .Pa /tmp/src :
1806 fa6e0e48 2019-05-23 stsp .Pp
1807 3ce1b845 2019-07-15 stsp .Dl $ got init /var/git/src.git
1808 2930ef13 2019-07-15 stsp .Dl $ got import -r /var/git/src.git -I CVS -I obj /tmp/src
1809 3ce1b845 2019-07-15 stsp .Pp
1810 3ce1b845 2019-07-15 stsp Check out a work tree from the Git repository to /usr/src:
1811 3ce1b845 2019-07-15 stsp .Pp
1812 fa6e0e48 2019-05-23 stsp .Dl $ got checkout /var/git/src.git /usr/src
1813 fa6e0e48 2019-05-23 stsp .Pp
1814 e70c17ce 2019-05-22 stsp View local changes in a work tree directory:
1815 e70c17ce 2019-05-22 stsp .Pp
1816 e70c17ce 2019-05-22 stsp .Dl $ got status
1817 e70c17ce 2019-05-22 stsp .Dl $ got diff | less
1818 33aa809d 2019-08-08 stsp .Pp
1819 33aa809d 2019-08-08 stsp Interactively revert selected local changes in a work tree directory:
1820 e70c17ce 2019-05-22 stsp .Pp
1821 33aa809d 2019-08-08 stsp .Dl $ got revert -p -R\ .
1822 33aa809d 2019-08-08 stsp .Pp
1823 e70c17ce 2019-05-22 stsp In a work tree or a git repository directory, list all branch references:
1824 e70c17ce 2019-05-22 stsp .Pp
1825 4e759de4 2019-06-26 stsp .Dl $ got branch -l
1826 e70c17ce 2019-05-22 stsp .Pp
1827 fa6e0e48 2019-05-23 stsp In a work tree or a git repository directory, create a new branch called
1828 e70c17ce 2019-05-22 stsp .Dq unified-buffer-cache
1829 d83d9d5c 2019-05-13 stsp which is forked off the
1830 d83d9d5c 2019-05-13 stsp .Dq master
1831 d83d9d5c 2019-05-13 stsp branch:
1832 d83d9d5c 2019-05-13 stsp .Pp
1833 4e759de4 2019-06-26 stsp .Dl $ got branch unified-buffer-cache master
1834 e70c17ce 2019-05-22 stsp .Pp
1835 e70c17ce 2019-05-22 stsp Switch an existing work tree to the branch
1836 e70c17ce 2019-05-22 stsp .Dq unified-buffer-cache .
1837 e70c17ce 2019-05-22 stsp Local changes in the work tree will be preserved and merged if necessary:
1838 e70c17ce 2019-05-22 stsp .Pp
1839 e70c17ce 2019-05-22 stsp .Dl $ got update -b unified-buffer-cache
1840 e70c17ce 2019-05-22 stsp .Pp
1841 fa6e0e48 2019-05-23 stsp Create a new commit from local changes in a work tree directory.
1842 fa6e0e48 2019-05-23 stsp This new commit will become the head commit of the work tree's current branch:
1843 fa6e0e48 2019-05-23 stsp .Pp
1844 fa6e0e48 2019-05-23 stsp .Dl $ got commit
1845 fa6e0e48 2019-05-23 stsp .Pp
1846 fa6e0e48 2019-05-23 stsp In a work tree or a git repository directory, view changes committed in
1847 fa6e0e48 2019-05-23 stsp the 3 most recent commits to the work tree's branch, or the branch resolved
1848 fa6e0e48 2019-05-23 stsp via the repository's HEAD reference, respectively:
1849 fa6e0e48 2019-05-23 stsp .Pp
1850 48c8c60d 2020-01-27 stsp .Dl $ got log -p -l 3
1851 5b666081 2020-02-24 stsp .Pp
1852 5b666081 2020-02-24 stsp In a work tree or a git repository directory, log the history of a subdirectory:
1853 5b666081 2020-02-24 stsp .Pp
1854 5b666081 2020-02-24 stsp .Dl $ got log sys/uvm
1855 5b666081 2020-02-24 stsp .Pp
1856 5b666081 2020-02-24 stsp While operating inside a work tree, paths are specified relative to the current
1857 5b666081 2020-02-24 stsp working directory, so this command will log the subdirectory
1858 5b666081 2020-02-24 stsp .Pa sys/uvm :
1859 fa6e0e48 2019-05-23 stsp .Pp
1860 5b666081 2020-02-24 stsp .Dl $ cd sys/uvm && got log '.'
1861 5b666081 2020-02-24 stsp .Pp
1862 5b666081 2020-02-24 stsp And this command has the same effect:
1863 5b666081 2020-02-24 stsp .Pp
1864 5b666081 2020-02-24 stsp .Dl $ cd sys/dev/usb && got log ../../uvm
1865 5b666081 2020-02-24 stsp .Pp
1866 e70c17ce 2019-05-22 stsp Add new files and remove obsolete files in a work tree directory:
1867 e70c17ce 2019-05-22 stsp .Pp
1868 fa6e0e48 2019-05-23 stsp .Dl $ got add sys/uvm/uvm_ubc.c
1869 86d25a1b 2019-07-11 stsp .Dl $ got remove sys/uvm/uvm_vnode.c
1870 e70c17ce 2019-05-22 stsp .Pp
1871 e70c17ce 2019-05-22 stsp Create a new commit from local changes in a work tree directory
1872 e70c17ce 2019-05-22 stsp with a pre-defined log message.
1873 e70c17ce 2019-05-22 stsp .Pp
1874 e70c17ce 2019-05-22 stsp .Dl $ got commit -m 'unify the buffer cache'
1875 95fc3404 2019-07-15 stsp .Pp
1876 95fc3404 2019-07-15 stsp Update any work tree checked out from the
1877 95fc3404 2019-07-15 stsp .Dq unified-buffer-cache
1878 95fc3404 2019-07-15 stsp branch to the latest commit on this branch:
1879 95fc3404 2019-07-15 stsp .Pp
1880 95fc3404 2019-07-15 stsp .Dl $ got update
1881 ac90e726 2019-07-15 stsp .Pp
1882 c991308a 2019-07-15 stsp Roll file content on the unified-buffer-cache branch back by one commit,
1883 c991308a 2019-07-15 stsp and then fetch the rolled-back change into the work tree as a local change
1884 ac90e726 2019-07-15 stsp to be amended and perhaps committed again:
1885 e70c17ce 2019-05-22 stsp .Pp
1886 ac90e726 2019-07-15 stsp .Dl $ got backout unified-buffer-cache
1887 ac90e726 2019-07-15 stsp .Dl $ got commit -m 'roll back previous'
1888 59d52b88 2019-07-15 stsp .Dl $ # now back out the previous backout :-)
1889 ac90e726 2019-07-15 stsp .Dl $ got backout unified-buffer-cache
1890 ac90e726 2019-07-15 stsp .Pp
1891 469dd726 2020-03-20 stsp Fetch new upstream commits into the local repository's
1892 469dd726 2020-03-20 stsp .Dq origin/master
1893 469dd726 2020-03-20 stsp branch:
1894 fa6e0e48 2019-05-23 stsp .Pp
1895 469dd726 2020-03-20 stsp .Dl $ cd /usr/src
1896 469dd726 2020-03-20 stsp .Dl $ got fetch
1897 469dd726 2020-03-20 stsp .Pp
1898 469dd726 2020-03-20 stsp In a repository created with a HTTP URL and
1899 469dd726 2020-03-20 stsp .Cm git clone --bare
1900 469dd726 2020-03-20 stsp the
1901 469dd726 2020-03-20 stsp .Xr git-fetch 1
1902 469dd726 2020-03-20 stsp command must be used instead:
1903 469dd726 2020-03-20 stsp .Pp
1904 fa6e0e48 2019-05-23 stsp .Dl $ cd /var/git/src.git
1905 469dd726 2020-03-20 stsp .Dl $ git fetch origin master:refs/remotes/origin/master
1906 fa6e0e48 2019-05-23 stsp .Pp
1907 469dd726 2020-03-20 stsp Rebase the local
1908 469dd726 2020-03-20 stsp .Dq master
1909 469dd726 2020-03-20 stsp branch to merge the new changes that are now visible on the
1910 469dd726 2020-03-20 stsp .Dq origin/master
1911 469dd726 2020-03-20 stsp branch:
1912 469dd726 2020-03-20 stsp .Pp
1913 469dd726 2020-03-20 stsp .Dl $ cd /usr/src
1914 469dd726 2020-03-20 stsp .Dl $ got update -b origin/master
1915 469dd726 2020-03-20 stsp .Dl $ got rebase master
1916 469dd726 2020-03-20 stsp .Pp
1917 fa6e0e48 2019-05-23 stsp Rebase the
1918 fa6e0e48 2019-05-23 stsp .Dq unified-buffer-cache
1919 fa6e0e48 2019-05-23 stsp branch on top of the new head commit of the
1920 fa6e0e48 2019-05-23 stsp .Dq master
1921 fa6e0e48 2019-05-23 stsp branch.
1922 fa6e0e48 2019-05-23 stsp .Pp
1923 818c7501 2019-07-11 stsp .Dl $ got update -b master
1924 818c7501 2019-07-11 stsp .Dl $ got rebase unified-buffer-cache
1925 7d7ffedb 2019-07-14 stsp .Pp
1926 7d7ffedb 2019-07-14 stsp Create a patch from all changes on the unified-buffer-cache branch.
1927 1dd86744 2019-08-12 anthony The patch can be mailed out for review and applied to
1928 1dd86744 2019-08-12 anthony .Ox Ns 's
1929 1dd86744 2019-08-12 anthony CVS tree:
1930 7d7ffedb 2019-07-14 stsp .Pp
1931 7d7ffedb 2019-07-14 stsp .Dl $ got diff master unified-buffer-cache > /tmp/ubc.diff
1932 7d7ffedb 2019-07-14 stsp .Pp
1933 0ebf8283 2019-07-24 stsp Edit the entire commit history of the
1934 0ebf8283 2019-07-24 stsp .Dq unified-buffer-cache
1935 0ebf8283 2019-07-24 stsp branch:
1936 0ebf8283 2019-07-24 stsp .Pp
1937 0ebf8283 2019-07-24 stsp .Dl $ got update -b unified-buffer-cache
1938 0ebf8283 2019-07-24 stsp .Dl $ got update -c master
1939 0ebf8283 2019-07-24 stsp .Dl $ got histedit
1940 bf390dec 2020-03-20 stsp .Pp
1941 bf390dec 2020-03-20 stsp In order to merge changes committed to the
1942 bf390dec 2020-03-20 stsp .Dq unified-buffer-cache
1943 bf390dec 2020-03-20 stsp branch back into the
1944 bf390dec 2020-03-20 stsp .Dq master
1945 bf390dec 2020-03-20 stsp branch, the
1946 bf390dec 2020-03-20 stsp .Dq unified-buffer-cache
1947 bf390dec 2020-03-20 stsp branch must first be rebased onto the
1948 bf390dec 2020-03-20 stsp .Dq master
1949 bf390dec 2020-03-20 stsp branch:
1950 bf390dec 2020-03-20 stsp .Pp
1951 bf390dec 2020-03-20 stsp .Dl $ got update -b master
1952 bf390dec 2020-03-20 stsp .Dl $ got rebase unified-buffer-cache
1953 bf390dec 2020-03-20 stsp .Pp
1954 bf390dec 2020-03-20 stsp Changes on the
1955 bf390dec 2020-03-20 stsp .Dq unified-buffer-cache
1956 bf390dec 2020-03-20 stsp branch can now be made visible on the
1957 bf390dec 2020-03-20 stsp .Dq master
1958 bf390dec 2020-03-20 stsp branch with
1959 bf390dec 2020-03-20 stsp .Cm got integrate .
1960 bf390dec 2020-03-20 stsp Because the rebase operation switched the work tree to the
1961 bf390dec 2020-03-20 stsp .Dq unified-buffer-cache
1962 bf390dec 2020-03-20 stsp branch, the work tree must be switched back to the
1963 bf390dec 2020-03-20 stsp .Dq master
1964 bf390dec 2020-03-20 stsp branch before the
1965 bf390dec 2020-03-20 stsp .Dq unified-buffer-cache
1966 bf390dec 2020-03-20 stsp branch can be integrated into
1967 bf390dec 2020-03-20 stsp .Dq master :
1968 ff2cf171 2019-07-28 stsp .Pp
1969 bf390dec 2020-03-20 stsp .Dl $ got update -b master
1970 bf390dec 2020-03-20 stsp .Dl $ got integrate unified-buffer-cache
1971 469dd726 2020-03-20 stsp .Pp
1972 469dd726 2020-03-20 stsp Additional steps may be necessary if local changes need to be pushed back
1973 7b3fde24 2019-07-28 stsp to the remote repository, which currently requires
1974 7b3fde24 2019-07-28 stsp .Cm git push .
1975 ff2cf171 2019-07-28 stsp Before working against existing branches in a repository cloned with
1976 469dd726 2020-03-20 stsp .Cm git clone --bare
1977 7848a0e1 2020-03-19 stsp instead of
1978 7848a0e1 2020-03-19 stsp .Cm got clone ,
1979 ff2cf171 2019-07-28 stsp a Git
1980 ff2cf171 2019-07-28 stsp .Dq refspec
1981 ff2cf171 2019-07-28 stsp must be configured to map all references in the remote repository
1982 ff2cf171 2019-07-28 stsp into the
1983 ff2cf171 2019-07-28 stsp .Dq refs/remotes
1984 ff2cf171 2019-07-28 stsp namespace of the local repository.
1985 ff2cf171 2019-07-28 stsp This can achieved by setting Git's
1986 ff2cf171 2019-07-28 stsp .Pa remote.origin.fetch
1987 ff2cf171 2019-07-28 stsp configuration variable to the value
1988 ff2cf171 2019-07-28 stsp .Dq +refs/heads/*:refs/remotes/origin/*
1989 ff2cf171 2019-07-28 stsp with the
1990 ff2cf171 2019-07-28 stsp .Cm git config
1991 ff2cf171 2019-07-28 stsp command:
1992 ff2cf171 2019-07-28 stsp .Pp
1993 ff2cf171 2019-07-28 stsp .Dl $ cd /var/git/repo
1994 ff2cf171 2019-07-28 stsp .Dl $ git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
1995 469dd726 2020-03-20 stsp Additionally, the
1996 469dd726 2020-03-20 stsp .Dq mirror
1997 469dd726 2020-03-20 stsp option must be disabled:
1998 ff2cf171 2019-07-28 stsp .Pp
1999 469dd726 2020-03-20 stsp .Dl $ cd /var/git/repo
2000 469dd726 2020-03-20 stsp .Dl $ git config remote.origin.mirror false
2001 469dd726 2020-03-20 stsp .Pp
2002 ff2cf171 2019-07-28 stsp Alternatively, the following
2003 469dd726 2020-03-20 stsp .Xr git-fetch 1
2004 ff2cf171 2019-07-28 stsp configuration item can be added manually to the Git repository's
2005 ff2cf171 2019-07-28 stsp .Pa config
2006 ff2cf171 2019-07-28 stsp file:
2007 0ebf8283 2019-07-24 stsp .Pp
2008 ff2cf171 2019-07-28 stsp .Dl [remote "origin"]
2009 ff2cf171 2019-07-28 stsp .Dl url = ...
2010 ff2cf171 2019-07-28 stsp .Dl fetch = +refs/heads/*:refs/remotes/origin/*
2011 469dd726 2020-03-20 stsp .Dl mirror = false
2012 ff2cf171 2019-07-28 stsp .Pp
2013 fe307c9b 2019-07-28 stsp This configuration leaves the local repository's
2014 ff2cf171 2019-07-28 stsp .Dq refs/heads
2015 ff2cf171 2019-07-28 stsp namespace free for use by local branches checked out with
2016 ff2cf171 2019-07-28 stsp .Cm got checkout
2017 ff2cf171 2019-07-28 stsp and, if needed, created with
2018 ff2cf171 2019-07-28 stsp .Cm got branch .
2019 ff2cf171 2019-07-28 stsp .Pp
2020 ff2cf171 2019-07-28 stsp Branches in the
2021 ff2cf171 2019-07-28 stsp .Dq remotes/origin
2022 469dd726 2020-03-20 stsp namespace can now be updated with incoming changes from the remote
2023 ff2cf171 2019-07-28 stsp repository with
2024 469dd726 2020-03-20 stsp .Cm got fetch
2025 469dd726 2020-03-20 stsp or
2026 469dd726 2020-03-20 stsp .Xr git-fetch 1
2027 469dd726 2020-03-20 stsp without extra command line arguments:
2028 ff2cf171 2019-07-28 stsp .Pp
2029 ff2cf171 2019-07-28 stsp .Dl $ cd /var/git/repo
2030 469dd726 2020-03-20 stsp .Dl $ git fetch
2031 ff2cf171 2019-07-28 stsp .Pp
2032 7b0db533 2020-02-04 stsp To make changes fetched from the remote repository appear on the
2033 ff2cf171 2019-07-28 stsp .Dq master
2034 7b0db533 2020-02-04 stsp branch, the
2035 ff2cf171 2019-07-28 stsp .Dq master
2036 ff2cf171 2019-07-28 stsp branch must be rebased onto the
2037 ff2cf171 2019-07-28 stsp .Dq origin/master
2038 7b0db533 2020-02-04 stsp branch.
2039 7b0db533 2020-02-04 stsp This will also merge local changes, if any, with the incoming changes:
2040 ff2cf171 2019-07-28 stsp .Pp
2041 ff2cf171 2019-07-28 stsp .Dl $ got update -b origin/master
2042 ff2cf171 2019-07-28 stsp .Dl $ got rebase master
2043 083957f4 2020-02-24 stsp .Pp
2044 083957f4 2020-02-24 stsp On the
2045 083957f4 2020-02-24 stsp .Dq master
2046 083957f4 2020-02-24 stsp branch, log messages for local changes can now be amended with
2047 083957f4 2020-02-24 stsp .Dq OK
2048 083957f4 2020-02-24 stsp by other developers and any other important new information:
2049 ff2cf171 2019-07-28 stsp .Pp
2050 083957f4 2020-02-24 stsp .Dl $ got update -c origin/master
2051 083957f4 2020-02-24 stsp .Dl $ got histedit -m
2052 083957f4 2020-02-24 stsp .Pp
2053 7b0db533 2020-02-04 stsp Local changes on the
2054 ff2cf171 2019-07-28 stsp .Dq master
2055 ff2cf171 2019-07-28 stsp branch can then be pushed to the remote
2056 ff2cf171 2019-07-28 stsp repository with
2057 ff2cf171 2019-07-28 stsp .Cm git push :
2058 ff2cf171 2019-07-28 stsp .Pp
2059 ff2cf171 2019-07-28 stsp .Dl $ cd /var/git/repo
2060 ff2cf171 2019-07-28 stsp .Dl $ git push origin master
2061 5c860e29 2018-03-12 stsp .Sh SEE ALSO
2062 2312fc47 2019-07-15 stsp .Xr tog 1 ,
2063 2312fc47 2019-07-15 stsp .Xr git-repository 5 ,
2064 285dc8a4 2018-03-13 stsp .Xr got-worktree 5
2065 1a208aaf 2018-04-01 stsp .Sh AUTHORS
2066 1a208aaf 2018-04-01 stsp .An Stefan Sperling Aq Mt stsp@openbsd.org
2067 1a208aaf 2018-04-01 stsp .An Martin Pieuchot Aq Mt mpi@openbsd.org
2068 bc3056e3 2019-08-18 stsp .An Joshua Stein Aq Mt jcs@openbsd.org
2069 83b416ed 2020-03-18 stsp .An Ori Bernstein Aq Mt ori@openbsd.org
2070 fa6e0e48 2019-05-23 stsp .Sh CAVEATS
2071 fa6e0e48 2019-05-23 stsp .Nm
2072 fa6e0e48 2019-05-23 stsp is a work-in-progress and many commands remain to be implemented.
2073 fa6e0e48 2019-05-23 stsp At present, the user has to fall back on
2074 fa6e0e48 2019-05-23 stsp .Xr git 1
2075 ff2cf171 2019-07-28 stsp to perform many tasks, in particular tasks related to repository
2076 ff2cf171 2019-07-28 stsp administration and tasks which require a network connection.