2 624411d2 2023-07-08 jrick .\" Copyright (c) 2017 Martin Pieuchot
3 624411d2 2023-07-08 jrick .\" Copyright (c) 2018, 2019, 2020 Stefan Sperling
5 624411d2 2023-07-08 jrick .\" Permission to use, copy, modify, and distribute this software for any
6 624411d2 2023-07-08 jrick .\" purpose with or without fee is hereby granted, provided that the above
7 624411d2 2023-07-08 jrick .\" copyright notice and this permission notice appear in all copies.
9 624411d2 2023-07-08 jrick .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 624411d2 2023-07-08 jrick .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 624411d2 2023-07-08 jrick .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 624411d2 2023-07-08 jrick .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 624411d2 2023-07-08 jrick .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 624411d2 2023-07-08 jrick .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 624411d2 2023-07-08 jrick .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 624411d2 2023-07-08 jrick .Dd $Mdocdate$
22 10a2e35a 2023-07-08 stsp .Nd CVS-like Git client
23 624411d2 2023-07-08 jrick .Sh SYNOPSIS
26 624411d2 2023-07-08 jrick .Ar command
27 624411d2 2023-07-08 jrick .Op Ar arg ...
28 624411d2 2023-07-08 jrick .Sh DESCRIPTION
30 10a2e35a 2023-07-08 stsp is a Git-compatible version control system with a user interface
35 10a2e35a 2023-07-08 stsp supports local and remote Git repositories.
36 10a2e35a 2023-07-08 stsp The Git repository format is described in
37 10a2e35a 2023-07-08 stsp .Xr git-repository 5 .
39 624411d2 2023-07-08 jrick Files managed by
41 624411d2 2023-07-08 jrick must be checked out from the repository for modification.
42 624411d2 2023-07-08 jrick Checked out files are stored in a
43 624411d2 2023-07-08 jrick .Em work tree
44 624411d2 2023-07-08 jrick which can be placed at an arbitrary directory in the filesystem hierarchy.
45 624411d2 2023-07-08 jrick The on-disk format of this work tree is described in
46 10a2e35a 2023-07-08 stsp .Xr cvg-worktree 5 .
49 624411d2 2023-07-08 jrick provides global and command-specific options.
50 624411d2 2023-07-08 jrick Global options must precede the command name, and are as follows:
51 624411d2 2023-07-08 jrick .Bl -tag -width tenletters
53 624411d2 2023-07-08 jrick Display usage information and exit immediately.
54 624411d2 2023-07-08 jrick .It Fl V , -version
55 624411d2 2023-07-08 jrick Display program version and exit immediately.
58 624411d2 2023-07-08 jrick The commands for
60 624411d2 2023-07-08 jrick are as follows:
61 624411d2 2023-07-08 jrick .Bl -tag -width checkout
65 624411d2 2023-07-08 jrick .Op Fl b Ar branch
66 624411d2 2023-07-08 jrick .Op Fl I Ar pattern
67 624411d2 2023-07-08 jrick .Op Fl m Ar message
68 624411d2 2023-07-08 jrick .Op Fl r Ar repository-path
69 624411d2 2023-07-08 jrick .Ar directory
71 624411d2 2023-07-08 jrick .Dl Pq alias: Cm im
72 624411d2 2023-07-08 jrick Create an initial commit in a repository from the file hierarchy
73 624411d2 2023-07-08 jrick within the specified
74 624411d2 2023-07-08 jrick .Ar directory .
75 624411d2 2023-07-08 jrick The created commit will not have any parent commits, i.e. it will be a
76 624411d2 2023-07-08 jrick root commit.
77 624411d2 2023-07-08 jrick Also create a new reference which provides a branch name for the newly
78 624411d2 2023-07-08 jrick created commit.
79 624411d2 2023-07-08 jrick Show the path of each imported file to indicate progress.
82 624411d2 2023-07-08 jrick .Cm got import
83 624411d2 2023-07-08 jrick command requires the
84 624411d2 2023-07-08 jrick .Ev GOT_AUTHOR
85 624411d2 2023-07-08 jrick environment variable to be set,
86 624411d2 2023-07-08 jrick unless an author has been configured in
87 624411d2 2023-07-08 jrick .Xr got.conf 5
89 624411d2 2023-07-08 jrick .Dv user.name
91 624411d2 2023-07-08 jrick .Dv user.email
92 624411d2 2023-07-08 jrick configuration settings can be obtained from the repository's
93 624411d2 2023-07-08 jrick .Pa .git/config
94 624411d2 2023-07-08 jrick file or from Git's global
95 624411d2 2023-07-08 jrick .Pa ~/.gitconfig
96 624411d2 2023-07-08 jrick configuration file.
98 624411d2 2023-07-08 jrick The options for
99 624411d2 2023-07-08 jrick .Cm got import
100 624411d2 2023-07-08 jrick are as follows:
101 624411d2 2023-07-08 jrick .Bl -tag -width Ds
102 624411d2 2023-07-08 jrick .It Fl b Ar branch
103 624411d2 2023-07-08 jrick Create the specified
104 624411d2 2023-07-08 jrick .Ar branch .
105 624411d2 2023-07-08 jrick If this option is not specified, a branch corresponding to the repository's
106 624411d2 2023-07-08 jrick HEAD reference will be used.
107 624411d2 2023-07-08 jrick Use of this option is required if the branch resolved via the repository's
108 624411d2 2023-07-08 jrick HEAD reference already exists.
109 624411d2 2023-07-08 jrick .It Fl I Ar pattern
110 624411d2 2023-07-08 jrick Ignore files or directories with a name which matches the specified
111 624411d2 2023-07-08 jrick .Ar pattern .
112 624411d2 2023-07-08 jrick This option may be specified multiple times to build a list of ignore patterns.
114 624411d2 2023-07-08 jrick .Ar pattern
115 624411d2 2023-07-08 jrick follows the globbing rules documented in
116 624411d2 2023-07-08 jrick .Xr glob 7 .
117 624411d2 2023-07-08 jrick Ignore patterns which end with a slash,
119 624411d2 2023-07-08 jrick will only match directories.
120 624411d2 2023-07-08 jrick .It Fl m Ar message
121 624411d2 2023-07-08 jrick Use the specified log message when creating the new commit.
122 624411d2 2023-07-08 jrick Without the
125 624411d2 2023-07-08 jrick .Cm got import
126 624411d2 2023-07-08 jrick opens a temporary file in an editor where a log message can be written.
127 ee27b57e 2023-07-15 naddy Quitting the editor without saving the file will abort the import operation.
128 624411d2 2023-07-08 jrick .It Fl r Ar repository-path
129 624411d2 2023-07-08 jrick Use the repository at the specified path.
130 624411d2 2023-07-08 jrick If not specified, assume the repository is located at or above the current
131 624411d2 2023-07-08 jrick working directory.
136 624411d2 2023-07-08 jrick .Op Fl almqv
137 624411d2 2023-07-08 jrick .Op Fl b Ar branch
138 624411d2 2023-07-08 jrick .Op Fl R Ar reference
139 624411d2 2023-07-08 jrick .Ar repository-URL
140 624411d2 2023-07-08 jrick .Op Ar directory
142 624411d2 2023-07-08 jrick .Dl Pq alias: Cm cl
143 624411d2 2023-07-08 jrick Clone a Git repository at the specified
144 624411d2 2023-07-08 jrick .Ar repository-URL
145 624411d2 2023-07-08 jrick into the specified
146 624411d2 2023-07-08 jrick .Ar directory .
148 624411d2 2023-07-08 jrick .Ar directory
149 624411d2 2023-07-08 jrick is specified, the directory name will be derived from the name of the
150 624411d2 2023-07-08 jrick cloned repository.
151 624411d2 2023-07-08 jrick .Cm got clone
152 624411d2 2023-07-08 jrick will refuse to run if the
153 624411d2 2023-07-08 jrick .Ar directory
154 624411d2 2023-07-08 jrick already exists.
157 624411d2 2023-07-08 jrick .Ar repository-URL
158 624411d2 2023-07-08 jrick specifies a protocol scheme, a server hostname, an optional port number
159 624411d2 2023-07-08 jrick separated from the hostname by a colon, and a path to the repository on
160 624411d2 2023-07-08 jrick the server:
161 624411d2 2023-07-08 jrick .Lk scheme://hostname:port/path/to/repository
163 624411d2 2023-07-08 jrick The following protocol schemes are supported:
164 624411d2 2023-07-08 jrick .Bl -tag -width git+ssh
166 624411d2 2023-07-08 jrick The Git protocol as implemented by the
167 624411d2 2023-07-08 jrick .Xr git-daemon 1
169 624411d2 2023-07-08 jrick Use of this protocol is discouraged since it supports neither authentication
170 624411d2 2023-07-08 jrick nor encryption.
171 624411d2 2023-07-08 jrick .It git+ssh
172 624411d2 2023-07-08 jrick The Git protocol wrapped in an authenticated and encrypted
175 624411d2 2023-07-08 jrick With this protocol the hostname may contain an embedded username for
178 624411d2 2023-07-08 jrick .Mt user@hostname
180 624411d2 2023-07-08 jrick Short alias for git+ssh.
183 624411d2 2023-07-08 jrick Objects in the cloned repository are stored in a pack file which is downloaded
184 624411d2 2023-07-08 jrick from the server.
185 624411d2 2023-07-08 jrick This pack file will then be indexed to facilitate access to the objects stored
187 624411d2 2023-07-08 jrick If any objects in the pack file are stored in deltified form, all deltas will
188 624411d2 2023-07-08 jrick be fully resolved in order to compute the ID of such objects.
189 624411d2 2023-07-08 jrick This can take some time.
190 624411d2 2023-07-08 jrick More details about the pack file format are documented in
191 624411d2 2023-07-08 jrick .Xr git-repository 5 .
193 624411d2 2023-07-08 jrick .Cm got clone
194 624411d2 2023-07-08 jrick creates a remote repository entry in the
195 624411d2 2023-07-08 jrick .Xr got.conf 5
197 624411d2 2023-07-08 jrick .Pa config
198 624411d2 2023-07-08 jrick files of the cloned repository to store the
199 624411d2 2023-07-08 jrick .Ar repository-url
201 624411d2 2023-07-08 jrick .Ar branch
203 624411d2 2023-07-08 jrick .Ar reference
204 624411d2 2023-07-08 jrick arguments for future use by
205 624411d2 2023-07-08 jrick .Cm got fetch
207 624411d2 2023-07-08 jrick .Xr git-fetch 1 .
209 624411d2 2023-07-08 jrick The options for
210 624411d2 2023-07-08 jrick .Cm got clone
211 624411d2 2023-07-08 jrick are as follows:
212 624411d2 2023-07-08 jrick .Bl -tag -width Ds
214 624411d2 2023-07-08 jrick Fetch all branches from the remote repository's
215 624411d2 2023-07-08 jrick .Dq refs/heads/
216 624411d2 2023-07-08 jrick reference namespace and set
217 624411d2 2023-07-08 jrick .Cm fetch_all_branches
218 624411d2 2023-07-08 jrick in the cloned repository's
219 624411d2 2023-07-08 jrick .Xr got.conf 5
220 624411d2 2023-07-08 jrick file for future use by
221 624411d2 2023-07-08 jrick .Cm got fetch .
222 624411d2 2023-07-08 jrick If this option is not specified, a branch resolved via the remote
223 624411d2 2023-07-08 jrick repository's HEAD reference will be fetched.
224 624411d2 2023-07-08 jrick Cannot be used together with the
227 624411d2 2023-07-08 jrick .It Fl b Ar branch
228 624411d2 2023-07-08 jrick Fetch the specified
229 624411d2 2023-07-08 jrick .Ar branch
230 624411d2 2023-07-08 jrick from the remote repository's
231 624411d2 2023-07-08 jrick .Dq refs/heads/
232 624411d2 2023-07-08 jrick reference namespace.
233 624411d2 2023-07-08 jrick This option may be specified multiple times to build a list of branches
235 624411d2 2023-07-08 jrick If the branch corresponding to the remote repository's HEAD reference is not
236 624411d2 2023-07-08 jrick in this list, the cloned repository's HEAD reference will be set to the first
237 624411d2 2023-07-08 jrick branch which was fetched.
238 624411d2 2023-07-08 jrick If this option is not specified, a branch resolved via the remote
239 624411d2 2023-07-08 jrick repository's HEAD reference will be fetched.
240 624411d2 2023-07-08 jrick Cannot be used together with the
244 624411d2 2023-07-08 jrick List branches and tags available for fetching from the remote repository
245 624411d2 2023-07-08 jrick and exit immediately.
246 624411d2 2023-07-08 jrick Cannot be used together with any of the other options except
251 624411d2 2023-07-08 jrick Create the cloned repository as a mirror of the original repository.
252 624411d2 2023-07-08 jrick This is useful if the cloned repository will not be used to store
253 624411d2 2023-07-08 jrick locally created commits.
255 624411d2 2023-07-08 jrick The repository's
256 624411d2 2023-07-08 jrick .Xr got.conf 5
258 624411d2 2023-07-08 jrick .Pa config
259 624411d2 2023-07-08 jrick files will be set up with the
260 624411d2 2023-07-08 jrick .Dq mirror
261 624411d2 2023-07-08 jrick option enabled, such that
262 624411d2 2023-07-08 jrick .Cm got fetch
264 624411d2 2023-07-08 jrick .Xr git-fetch 1
265 624411d2 2023-07-08 jrick will write incoming changes directly to branches in the
266 624411d2 2023-07-08 jrick .Dq refs/heads/
267 624411d2 2023-07-08 jrick reference namespace, rather than to branches in the
268 624411d2 2023-07-08 jrick .Dq refs/remotes/
269 624411d2 2023-07-08 jrick namespace.
270 624411d2 2023-07-08 jrick This avoids the usual requirement of having to run
271 624411d2 2023-07-08 jrick .Cm got rebase
273 624411d2 2023-07-08 jrick .Cm got merge
275 624411d2 2023-07-08 jrick .Cm got fetch
276 624411d2 2023-07-08 jrick in order to make incoming changes appear on branches in the
277 624411d2 2023-07-08 jrick .Dq refs/heads/
278 624411d2 2023-07-08 jrick namespace.
279 624411d2 2023-07-08 jrick But maintaining custom changes in the cloned repository becomes difficult
280 624411d2 2023-07-08 jrick since such changes will be at risk of being discarded whenever incoming
281 624411d2 2023-07-08 jrick changes are fetched.
283 624411d2 2023-07-08 jrick Suppress progress reporting output.
284 624411d2 2023-07-08 jrick The same option will be passed to
286 624411d2 2023-07-08 jrick if applicable.
287 624411d2 2023-07-08 jrick .It Fl R Ar reference
288 624411d2 2023-07-08 jrick In addition to the branches and tags that will be fetched, fetch an arbitrary
289 624411d2 2023-07-08 jrick .Ar reference
290 624411d2 2023-07-08 jrick from the remote repository's
292 624411d2 2023-07-08 jrick namespace.
293 624411d2 2023-07-08 jrick This option may be specified multiple times to build a list of additional
294 624411d2 2023-07-08 jrick references to fetch.
295 624411d2 2023-07-08 jrick The specified
296 624411d2 2023-07-08 jrick .Ar reference
297 624411d2 2023-07-08 jrick may either be a path to a specific reference, or a reference namespace
298 624411d2 2023-07-08 jrick which will cause all references in this namespace to be fetched.
300 624411d2 2023-07-08 jrick Each reference will be mapped into the cloned repository's
301 624411d2 2023-07-08 jrick .Dq refs/remotes/
302 624411d2 2023-07-08 jrick namespace, unless the
304 624411d2 2023-07-08 jrick option is used to mirror references directly into the cloned repository's
306 624411d2 2023-07-08 jrick namespace.
308 624411d2 2023-07-08 jrick .Cm got clone
309 624411d2 2023-07-08 jrick will refuse to fetch references from the remote repository's
310 624411d2 2023-07-08 jrick .Dq refs/remotes/
312 624411d2 2023-07-08 jrick .Dq refs/got/
313 624411d2 2023-07-08 jrick namespace.
315 624411d2 2023-07-08 jrick Verbose mode.
317 624411d2 2023-07-08 jrick .Cm got clone
318 624411d2 2023-07-08 jrick to print debugging messages to standard error output.
319 624411d2 2023-07-08 jrick This option will be passed to
321 624411d2 2023-07-08 jrick if applicable.
322 624411d2 2023-07-08 jrick Multiple -v options increase the verbosity.
323 624411d2 2023-07-08 jrick The maximum is 3.
327 624411d2 2023-07-08 jrick .Cm checkout
329 624411d2 2023-07-08 jrick .Op Fl b Ar branch
330 624411d2 2023-07-08 jrick .Op Fl c Ar commit
331 624411d2 2023-07-08 jrick .Op Fl p Ar path-prefix
332 624411d2 2023-07-08 jrick .Ar repository-path
333 624411d2 2023-07-08 jrick .Op Ar work-tree-path
335 624411d2 2023-07-08 jrick .Dl Pq alias: Cm co
336 624411d2 2023-07-08 jrick Copy files from a repository into a new work tree.
337 624411d2 2023-07-08 jrick Show the status of each affected file, using the following status codes:
338 624411d2 2023-07-08 jrick .Bl -column YXZ description
339 624411d2 2023-07-08 jrick .It A Ta new file was added
340 624411d2 2023-07-08 jrick .It E Ta file already exists in work tree's meta-data
344 624411d2 2023-07-08 jrick .Ar work tree path
345 624411d2 2023-07-08 jrick is not specified, either use the last component of
346 624411d2 2023-07-08 jrick .Ar repository path ,
348 624411d2 2023-07-08 jrick .Ar path prefix
349 624411d2 2023-07-08 jrick was specified use the last component of
350 624411d2 2023-07-08 jrick .Ar path prefix .
352 624411d2 2023-07-08 jrick The options for
353 624411d2 2023-07-08 jrick .Cm got checkout
354 624411d2 2023-07-08 jrick are as follows:
355 624411d2 2023-07-08 jrick .Bl -tag -width Ds
356 624411d2 2023-07-08 jrick .It Fl b Ar branch
357 624411d2 2023-07-08 jrick Check out files from a commit on the specified
358 624411d2 2023-07-08 jrick .Ar branch .
359 624411d2 2023-07-08 jrick If this option is not specified, a branch resolved via the repository's HEAD
360 624411d2 2023-07-08 jrick reference will be used.
361 624411d2 2023-07-08 jrick .It Fl c Ar commit
362 624411d2 2023-07-08 jrick Check out files from the specified
363 624411d2 2023-07-08 jrick .Ar commit
364 624411d2 2023-07-08 jrick on the selected branch.
365 624411d2 2023-07-08 jrick The expected argument is a commit ID SHA1 hash or an existing reference
366 624411d2 2023-07-08 jrick or tag name which will be resolved to a commit ID.
367 624411d2 2023-07-08 jrick An abbreviated hash argument will be expanded to a full SHA1 hash
368 624411d2 2023-07-08 jrick automatically, provided the abbreviation is unique.
369 624411d2 2023-07-08 jrick If this option is not specified, the most recent commit on the selected
370 624411d2 2023-07-08 jrick branch will be used.
372 624411d2 2023-07-08 jrick If the specified
373 624411d2 2023-07-08 jrick .Ar commit
374 624411d2 2023-07-08 jrick is not contained in the selected branch, a different branch which contains
375 624411d2 2023-07-08 jrick this commit must be specified with the
378 624411d2 2023-07-08 jrick If no such branch is known, a new branch must be created for this
379 624411d2 2023-07-08 jrick commit with
380 624411d2 2023-07-08 jrick .Cm got branch
382 624411d2 2023-07-08 jrick .Cm got checkout
383 624411d2 2023-07-08 jrick can be used.
384 624411d2 2023-07-08 jrick Checking out work trees with an unknown branch is intentionally not supported.
386 624411d2 2023-07-08 jrick Proceed with the checkout operation even if the directory at
387 624411d2 2023-07-08 jrick .Ar work-tree-path
388 624411d2 2023-07-08 jrick is not empty.
389 624411d2 2023-07-08 jrick Existing files will be left intact.
390 624411d2 2023-07-08 jrick .It Fl p Ar path-prefix
391 624411d2 2023-07-08 jrick Restrict the work tree to a subset of the repository's tree hierarchy.
392 624411d2 2023-07-08 jrick Only files beneath the specified
393 624411d2 2023-07-08 jrick .Ar path-prefix
394 624411d2 2023-07-08 jrick will be checked out.
396 624411d2 2023-07-08 jrick Silence progress output.
400 624411d2 2023-07-08 jrick .Cm update
402 624411d2 2023-07-08 jrick .Op Fl b Ar branch
403 624411d2 2023-07-08 jrick .Op Fl c Ar commit
404 624411d2 2023-07-08 jrick .Op Ar path ...
406 624411d2 2023-07-08 jrick .Dl Pq alias: Cm up
407 624411d2 2023-07-08 jrick Update an existing work tree to a different
408 624411d2 2023-07-08 jrick .Ar commit .
409 624411d2 2023-07-08 jrick Change existing files in the work tree as necessary to match file contents
410 624411d2 2023-07-08 jrick of this commit.
411 624411d2 2023-07-08 jrick Preserve any local changes in the work tree and merge them with the
412 624411d2 2023-07-08 jrick incoming changes.
414 624411d2 2023-07-08 jrick Files which already contain merge conflicts will not be updated to avoid
415 624411d2 2023-07-08 jrick further complications.
416 624411d2 2023-07-08 jrick Such files will be updated when
417 624411d2 2023-07-08 jrick .Cm got update
418 624411d2 2023-07-08 jrick is run again after merge conflicts have been resolved.
419 624411d2 2023-07-08 jrick If the conflicting changes are no longer needed, affected files can be
420 624411d2 2023-07-08 jrick reverted with
421 624411d2 2023-07-08 jrick .Cm got revert
422 624411d2 2023-07-08 jrick before running
423 624411d2 2023-07-08 jrick .Cm got update
426 624411d2 2023-07-08 jrick Show the status of each affected file, using the following status codes:
427 624411d2 2023-07-08 jrick .Bl -column YXZ description
428 624411d2 2023-07-08 jrick .It U Ta file was updated and contained no local changes
429 624411d2 2023-07-08 jrick .It G Ta file was updated and local changes were merged cleanly
430 624411d2 2023-07-08 jrick .It C Ta file was updated and conflicts occurred during merge
431 624411d2 2023-07-08 jrick .It D Ta file was deleted
432 624411d2 2023-07-08 jrick .It d Ta file's deletion was prevented by local modifications
433 624411d2 2023-07-08 jrick .It A Ta new file was added
434 624411d2 2023-07-08 jrick .It \(a~ Ta versioned file is obstructed by a non-regular file
435 624411d2 2023-07-08 jrick .It ! Ta a missing versioned file was restored
436 624411d2 2023-07-08 jrick .It # Ta file was not updated because it contains merge conflicts
437 624411d2 2023-07-08 jrick .It ? Ta changes destined for an unversioned file were not merged
442 624411d2 2023-07-08 jrick is specified, update the entire work tree.
443 624411d2 2023-07-08 jrick Otherwise, restrict the update operation to files at or within the
444 624411d2 2023-07-08 jrick specified paths.
445 624411d2 2023-07-08 jrick Each path is required to exist in the update operation's target commit.
446 624411d2 2023-07-08 jrick Files in the work tree outside specified paths will remain unchanged and
447 624411d2 2023-07-08 jrick will retain their previously recorded base commit.
450 624411d2 2023-07-08 jrick commands may refuse to run while the work tree contains files from
451 624411d2 2023-07-08 jrick multiple base commits.
452 624411d2 2023-07-08 jrick The base commit of such a work tree can be made consistent by running
453 624411d2 2023-07-08 jrick .Cm got update
454 624411d2 2023-07-08 jrick across the entire work tree.
455 624411d2 2023-07-08 jrick Specifying a
457 624411d2 2023-07-08 jrick is incompatible with the
461 624411d2 2023-07-08 jrick .Cm got update
462 624411d2 2023-07-08 jrick cannot update paths with staged changes.
463 624411d2 2023-07-08 jrick If changes have been staged with
464 624411d2 2023-07-08 jrick .Cm got stage ,
465 624411d2 2023-07-08 jrick these changes must first be committed with
466 624411d2 2023-07-08 jrick .Cm got commit
467 624411d2 2023-07-08 jrick or unstaged with
468 624411d2 2023-07-08 jrick .Cm got unstage .
470 624411d2 2023-07-08 jrick The options for
471 624411d2 2023-07-08 jrick .Cm got update
472 624411d2 2023-07-08 jrick are as follows:
473 624411d2 2023-07-08 jrick .Bl -tag -width Ds
474 624411d2 2023-07-08 jrick .It Fl b Ar branch
475 624411d2 2023-07-08 jrick Switch the work tree's branch reference to the specified
476 624411d2 2023-07-08 jrick .Ar branch
477 624411d2 2023-07-08 jrick before updating the work tree.
478 624411d2 2023-07-08 jrick This option requires that all paths in the work tree are updated.
480 624411d2 2023-07-08 jrick As usual, any local changes in the work tree will be preserved.
481 624411d2 2023-07-08 jrick This can be useful when switching to a newly created branch in order
482 624411d2 2023-07-08 jrick to commit existing local changes to this branch.
484 624411d2 2023-07-08 jrick Any local changes must be dealt with separately in order to obtain a
485 624411d2 2023-07-08 jrick work tree with pristine file contents corresponding exactly to the specified
486 624411d2 2023-07-08 jrick .Ar branch .
487 624411d2 2023-07-08 jrick Such changes could first be committed to a different branch with
488 624411d2 2023-07-08 jrick .Cm got commit ,
489 624411d2 2023-07-08 jrick or could be discarded with
490 624411d2 2023-07-08 jrick .Cm got revert .
491 624411d2 2023-07-08 jrick .It Fl c Ar commit
492 624411d2 2023-07-08 jrick Update the work tree to the specified
493 624411d2 2023-07-08 jrick .Ar commit .
494 624411d2 2023-07-08 jrick The expected argument is a commit ID SHA1 hash or an existing reference
495 624411d2 2023-07-08 jrick or tag name which will be resolved to a commit ID.
496 624411d2 2023-07-08 jrick An abbreviated hash argument will be expanded to a full SHA1 hash
497 624411d2 2023-07-08 jrick automatically, provided the abbreviation is unique.
498 624411d2 2023-07-08 jrick If this option is not specified, the most recent commit on the work tree's
499 624411d2 2023-07-08 jrick branch will be used.
501 624411d2 2023-07-08 jrick Silence progress output.
505 624411d2 2023-07-08 jrick .Cm status
507 624411d2 2023-07-08 jrick .Op Fl S Ar status-codes
508 624411d2 2023-07-08 jrick .Op Fl s Ar status-codes
509 624411d2 2023-07-08 jrick .Op Ar path ...
511 624411d2 2023-07-08 jrick .Dl Pq alias: Cm st
512 624411d2 2023-07-08 jrick Show the current modification status of files in a work tree,
513 624411d2 2023-07-08 jrick using the following status codes:
514 624411d2 2023-07-08 jrick .Bl -column YXZ description
515 624411d2 2023-07-08 jrick .It M Ta modified file
516 624411d2 2023-07-08 jrick .It A Ta file scheduled for addition in next commit
517 624411d2 2023-07-08 jrick .It D Ta file scheduled for deletion in next commit
518 624411d2 2023-07-08 jrick .It C Ta modified or added file which contains merge conflicts
519 624411d2 2023-07-08 jrick .It ! Ta versioned file was expected on disk but is missing
520 624411d2 2023-07-08 jrick .It \(a~ Ta versioned file is obstructed by a non-regular file
521 624411d2 2023-07-08 jrick .It ? Ta unversioned item not tracked by
523 624411d2 2023-07-08 jrick .It m Ta modified file modes (executable bit only)
524 624411d2 2023-07-08 jrick .It N Ta non-existent
526 624411d2 2023-07-08 jrick specified on the command line
531 624411d2 2023-07-08 jrick is specified, show modifications in the entire work tree.
532 624411d2 2023-07-08 jrick Otherwise, show modifications at or within the specified paths.
534 624411d2 2023-07-08 jrick If changes have been staged with
535 624411d2 2023-07-08 jrick .Cm got stage ,
536 624411d2 2023-07-08 jrick staged changes are shown in the second output column, using the following
537 624411d2 2023-07-08 jrick status codes:
538 624411d2 2023-07-08 jrick .Bl -column YXZ description
539 624411d2 2023-07-08 jrick .It M Ta file modification is staged
540 624411d2 2023-07-08 jrick .It A Ta file addition is staged
541 624411d2 2023-07-08 jrick .It D Ta file deletion is staged
544 624411d2 2023-07-08 jrick Changes created on top of staged changes are indicated in the first column:
545 624411d2 2023-07-08 jrick .Bl -column YXZ description
546 624411d2 2023-07-08 jrick .It MM Ta file was modified after earlier changes have been staged
547 624411d2 2023-07-08 jrick .It MA Ta file was modified after having been staged for addition
550 624411d2 2023-07-08 jrick The options for
551 624411d2 2023-07-08 jrick .Cm got status
552 624411d2 2023-07-08 jrick are as follows:
553 624411d2 2023-07-08 jrick .Bl -tag -width Ds
555 624411d2 2023-07-08 jrick Show unversioned files even if they match an ignore pattern.
556 624411d2 2023-07-08 jrick .It Fl S Ar status-codes
557 624411d2 2023-07-08 jrick Suppress the output of files with a modification status matching any of the
558 624411d2 2023-07-08 jrick single-character status codes contained in the
559 624411d2 2023-07-08 jrick .Ar status-codes
561 624411d2 2023-07-08 jrick Any combination of codes from the above list of possible status codes
562 624411d2 2023-07-08 jrick may be specified.
563 624411d2 2023-07-08 jrick For staged files, status codes displayed in either column will be matched.
564 624411d2 2023-07-08 jrick Cannot be used together with the
567 624411d2 2023-07-08 jrick .It Fl s Ar status-codes
568 624411d2 2023-07-08 jrick Only show files with a modification status matching any of the
569 624411d2 2023-07-08 jrick single-character status codes contained in the
570 624411d2 2023-07-08 jrick .Ar status-codes
572 624411d2 2023-07-08 jrick Any combination of codes from the above list of possible status codes
573 624411d2 2023-07-08 jrick may be specified.
574 624411d2 2023-07-08 jrick For staged files, status codes displayed in either column will be matched.
575 624411d2 2023-07-08 jrick Cannot be used together with the
580 624411d2 2023-07-08 jrick For compatibility with
583 624411d2 2023-07-08 jrick .Xr git 1 ,
584 624411d2 2023-07-08 jrick .Cm got status
586 624411d2 2023-07-08 jrick .Xr glob 7
587 624411d2 2023-07-08 jrick patterns from
588 624411d2 2023-07-08 jrick .Pa .cvsignore
590 624411d2 2023-07-08 jrick .Pa .gitignore
591 624411d2 2023-07-08 jrick files in each traversed directory and will not display unversioned files
592 624411d2 2023-07-08 jrick which match these patterns.
593 624411d2 2023-07-08 jrick Ignore patterns which end with a slash,
595 624411d2 2023-07-08 jrick will only match directories.
596 624411d2 2023-07-08 jrick As an extension to
597 624411d2 2023-07-08 jrick .Xr glob 7
598 624411d2 2023-07-08 jrick matching rules,
599 624411d2 2023-07-08 jrick .Cm got status
600 624411d2 2023-07-08 jrick supports consecutive asterisks,
602 624411d2 2023-07-08 jrick which will match an arbitrary amount of directories.
604 624411d2 2023-07-08 jrick .Xr cvs 1 ,
605 624411d2 2023-07-08 jrick .Cm got status
606 624411d2 2023-07-08 jrick only supports a single ignore pattern per line.
608 624411d2 2023-07-08 jrick .Xr git 1 ,
609 624411d2 2023-07-08 jrick .Cm got status
610 624411d2 2023-07-08 jrick does not support negated ignore patterns prefixed with
612 624411d2 2023-07-08 jrick and gives no special significance to the location of path component separators,
614 624411d2 2023-07-08 jrick in a pattern.
617 624411d2 2023-07-08 jrick .Op Fl bdPpRs
618 624411d2 2023-07-08 jrick .Op Fl C Ar number
619 624411d2 2023-07-08 jrick .Op Fl c Ar commit
620 624411d2 2023-07-08 jrick .Op Fl l Ar N
621 624411d2 2023-07-08 jrick .Op Fl r Ar repository-path
622 624411d2 2023-07-08 jrick .Op Fl S Ar search-pattern
623 624411d2 2023-07-08 jrick .Op Fl x Ar commit
624 624411d2 2023-07-08 jrick .Op Ar path
626 624411d2 2023-07-08 jrick Display history of a repository.
629 624411d2 2023-07-08 jrick is specified, show only commits which modified this path.
630 624411d2 2023-07-08 jrick If invoked in a work tree, the
632 624411d2 2023-07-08 jrick is interpreted relative to the current working directory,
633 624411d2 2023-07-08 jrick and the work tree's path prefix is implicitly prepended.
634 624411d2 2023-07-08 jrick Otherwise, the path is interpreted relative to the repository root.
636 624411d2 2023-07-08 jrick The options for
637 624411d2 2023-07-08 jrick .Cm got log
638 624411d2 2023-07-08 jrick are as follows:
639 624411d2 2023-07-08 jrick .Bl -tag -width Ds
641 624411d2 2023-07-08 jrick Display individual commits which were merged into the current branch
642 624411d2 2023-07-08 jrick from other branches.
643 624411d2 2023-07-08 jrick By default,
644 624411d2 2023-07-08 jrick .Cm got log
645 624411d2 2023-07-08 jrick shows the linear history of the current branch only.
646 624411d2 2023-07-08 jrick .It Fl C Ar number
647 624411d2 2023-07-08 jrick Set the number of context lines shown in diffs with
649 624411d2 2023-07-08 jrick By default, 3 lines of context are shown.
650 624411d2 2023-07-08 jrick .It Fl c Ar commit
651 624411d2 2023-07-08 jrick Start traversing history at the specified
652 624411d2 2023-07-08 jrick .Ar commit .
653 624411d2 2023-07-08 jrick The expected argument is a commit ID SHA1 hash or an existing reference
654 624411d2 2023-07-08 jrick or tag name which will be resolved to a commit ID.
655 624411d2 2023-07-08 jrick An abbreviated hash argument will be expanded to a full SHA1 hash
656 624411d2 2023-07-08 jrick automatically, provided the abbreviation is unique.
657 624411d2 2023-07-08 jrick If this option is not specified, default to the work tree's current branch
658 624411d2 2023-07-08 jrick if invoked in a work tree, or to the repository's HEAD reference.
660 624411d2 2023-07-08 jrick Display diffstat of changes introduced in each commit.
661 624411d2 2023-07-08 jrick Cannot be used with the
664 624411d2 2023-07-08 jrick .It Fl l Ar N
665 624411d2 2023-07-08 jrick Limit history traversal to a given number of commits.
666 624411d2 2023-07-08 jrick If this option is not specified, a default limit value of zero is used,
667 624411d2 2023-07-08 jrick which is treated as an unbounded limit.
669 624411d2 2023-07-08 jrick .Ev GOT_LOG_DEFAULT_LIMIT
670 624411d2 2023-07-08 jrick environment variable may be set to change this default value.
672 624411d2 2023-07-08 jrick Display the list of file paths changed in each commit, using the following
673 624411d2 2023-07-08 jrick status codes:
674 624411d2 2023-07-08 jrick .Bl -column YXZ description
675 624411d2 2023-07-08 jrick .It M Ta modified file
676 624411d2 2023-07-08 jrick .It D Ta file was deleted
677 624411d2 2023-07-08 jrick .It A Ta new file was added
678 624411d2 2023-07-08 jrick .It m Ta modified file modes (executable bit only)
681 624411d2 2023-07-08 jrick Cannot be used with the
685 624411d2 2023-07-08 jrick Display the patch of modifications made in each commit.
688 624411d2 2023-07-08 jrick is specified, only show the patch of modifications at or within this path.
689 624411d2 2023-07-08 jrick Cannot be used with the
693 624411d2 2023-07-08 jrick Determine a set of commits to display as usual, but display these commits
694 624411d2 2023-07-08 jrick in reverse order.
695 624411d2 2023-07-08 jrick .It Fl r Ar repository-path
696 624411d2 2023-07-08 jrick Use the repository at the specified path.
697 624411d2 2023-07-08 jrick If not specified, assume the repository is located at or above the current
698 624411d2 2023-07-08 jrick working directory.
699 624411d2 2023-07-08 jrick If this directory is a
701 624411d2 2023-07-08 jrick work tree, use the repository path associated with this work tree.
702 624411d2 2023-07-08 jrick .It Fl S Ar search-pattern
703 624411d2 2023-07-08 jrick If specified, show only commits with a log message, author name,
704 624411d2 2023-07-08 jrick committer name, or ID SHA1 hash matched by the extended regular
705 624411d2 2023-07-08 jrick expression
706 624411d2 2023-07-08 jrick .Ar search-pattern .
707 624411d2 2023-07-08 jrick Lines in committed patches will be matched if
709 624411d2 2023-07-08 jrick is specified.
710 624411d2 2023-07-08 jrick File paths changed by a commit will be matched if
712 624411d2 2023-07-08 jrick is specified.
713 624411d2 2023-07-08 jrick Regular expression syntax is documented in
714 624411d2 2023-07-08 jrick .Xr re_format 7 .
716 624411d2 2023-07-08 jrick Display a short one-line summary of each commit, instead of the default
717 624411d2 2023-07-08 jrick history format.
718 624411d2 2023-07-08 jrick Cannot be used together with the
723 624411d2 2023-07-08 jrick .It Fl x Ar commit
724 624411d2 2023-07-08 jrick Stop traversing commit history immediately after the specified
725 624411d2 2023-07-08 jrick .Ar commit
726 624411d2 2023-07-08 jrick has been traversed.
727 624411d2 2023-07-08 jrick This option has no effect if the specified
728 624411d2 2023-07-08 jrick .Ar commit
729 624411d2 2023-07-08 jrick is never traversed.
734 624411d2 2023-07-08 jrick .Op Fl adPsw
735 624411d2 2023-07-08 jrick .Op Fl C Ar number
736 624411d2 2023-07-08 jrick .Op Fl c Ar commit
737 624411d2 2023-07-08 jrick .Op Fl r Ar repository-path
738 624411d2 2023-07-08 jrick .Op Ar object1 Ar object2 | Ar path ...
740 624411d2 2023-07-08 jrick .Dl Pq alias: Cm di
741 624411d2 2023-07-08 jrick When invoked within a work tree without any arguments, display all
742 624411d2 2023-07-08 jrick local changes in the work tree.
743 624411d2 2023-07-08 jrick If one or more
745 624411d2 2023-07-08 jrick arguments are specified, only show changes within the specified paths.
747 624411d2 2023-07-08 jrick If two arguments are provided, treat each argument as a reference, a tag
748 624411d2 2023-07-08 jrick name, or an object ID SHA1 hash, and display differences between the
749 624411d2 2023-07-08 jrick corresponding objects.
750 624411d2 2023-07-08 jrick Both objects must be of the same type (blobs, trees, or commits).
751 624411d2 2023-07-08 jrick An abbreviated hash argument will be expanded to a full SHA1 hash
752 624411d2 2023-07-08 jrick automatically, provided the abbreviation is unique.
753 624411d2 2023-07-08 jrick If none of these interpretations produce a valid result or if the
755 624411d2 2023-07-08 jrick option is used,
757 624411d2 2023-07-08 jrick .Cm got diff
758 624411d2 2023-07-08 jrick is running in a work tree, attempt to interpret the two arguments as paths.
760 624411d2 2023-07-08 jrick The options for
761 624411d2 2023-07-08 jrick .Cm got diff
762 624411d2 2023-07-08 jrick are as follows:
763 624411d2 2023-07-08 jrick .Bl -tag -width Ds
765 624411d2 2023-07-08 jrick Treat file contents as ASCII text even if binary data is detected.
766 624411d2 2023-07-08 jrick .It Fl C Ar number
767 624411d2 2023-07-08 jrick Set the number of context lines shown in the diff.
768 624411d2 2023-07-08 jrick By default, 3 lines of context are shown.
769 624411d2 2023-07-08 jrick .It Fl c Ar commit
770 624411d2 2023-07-08 jrick Show differences between commits in the repository.
771 624411d2 2023-07-08 jrick This option may be used up to two times.
772 624411d2 2023-07-08 jrick When used only once, show differences between the specified
773 624411d2 2023-07-08 jrick .Ar commit
774 624411d2 2023-07-08 jrick and its first parent commit.
775 624411d2 2023-07-08 jrick When used twice, show differences between the two specified commits.
777 624411d2 2023-07-08 jrick The expected argument is a commit ID SHA1 hash or an existing reference
778 624411d2 2023-07-08 jrick or tag name which will be resolved to a commit ID.
779 624411d2 2023-07-08 jrick An abbreviated hash argument will be expanded to a full SHA1 hash
780 624411d2 2023-07-08 jrick automatically, provided the abbreviation is unique.
784 624411d2 2023-07-08 jrick option is used, all non-option arguments will be interpreted as paths.
785 624411d2 2023-07-08 jrick If one or more such
787 624411d2 2023-07-08 jrick arguments are provided, only show differences for the specified paths.
789 624411d2 2023-07-08 jrick Cannot be used together with the
793 624411d2 2023-07-08 jrick Display diffstat of changes before the actual diff by annotating each file path
794 624411d2 2023-07-08 jrick or blob hash being diffed with the total number of lines added and removed.
795 624411d2 2023-07-08 jrick A summary line will display the total number of changes across all files.
797 624411d2 2023-07-08 jrick Interpret all arguments as paths only.
798 624411d2 2023-07-08 jrick This option can be used to resolve ambiguity in cases where paths
799 624411d2 2023-07-08 jrick look like tag names, reference names, or object IDs.
800 624411d2 2023-07-08 jrick This option is only valid when
801 624411d2 2023-07-08 jrick .Cm got diff
802 624411d2 2023-07-08 jrick is invoked in a work tree.
803 624411d2 2023-07-08 jrick .It Fl r Ar repository-path
804 624411d2 2023-07-08 jrick Use the repository at the specified path.
805 624411d2 2023-07-08 jrick If not specified, assume the repository is located at or above the current
806 624411d2 2023-07-08 jrick working directory.
807 624411d2 2023-07-08 jrick If this directory is a
809 624411d2 2023-07-08 jrick work tree, use the repository path associated with this work tree.
811 624411d2 2023-07-08 jrick Show changes staged with
812 624411d2 2023-07-08 jrick .Cm got stage
813 624411d2 2023-07-08 jrick instead of showing local changes in the work tree.
814 624411d2 2023-07-08 jrick This option is only valid when
815 624411d2 2023-07-08 jrick .Cm got diff
816 624411d2 2023-07-08 jrick is invoked in a work tree.
818 624411d2 2023-07-08 jrick Ignore whitespace-only changes.
823 624411d2 2023-07-08 jrick .Op Fl c Ar commit
824 624411d2 2023-07-08 jrick .Op Fl r Ar repository-path
827 624411d2 2023-07-08 jrick .Dl Pq alias: Cm bl
828 624411d2 2023-07-08 jrick Display line-by-line history of a file at the specified path.
830 624411d2 2023-07-08 jrick The options for
831 624411d2 2023-07-08 jrick .Cm got blame
832 624411d2 2023-07-08 jrick are as follows:
833 624411d2 2023-07-08 jrick .Bl -tag -width Ds
834 624411d2 2023-07-08 jrick .It Fl c Ar commit
835 624411d2 2023-07-08 jrick Start traversing history at the specified
836 624411d2 2023-07-08 jrick .Ar commit .
837 624411d2 2023-07-08 jrick The expected argument is a commit ID SHA1 hash or an existing reference
838 624411d2 2023-07-08 jrick or tag name which will be resolved to a commit ID.
839 624411d2 2023-07-08 jrick An abbreviated hash argument will be expanded to a full SHA1 hash
840 624411d2 2023-07-08 jrick automatically, provided the abbreviation is unique.
841 624411d2 2023-07-08 jrick .It Fl r Ar repository-path
842 624411d2 2023-07-08 jrick Use the repository at the specified path.
843 624411d2 2023-07-08 jrick If not specified, assume the repository is located at or above the current
844 624411d2 2023-07-08 jrick working directory.
845 624411d2 2023-07-08 jrick If this directory is a
847 624411d2 2023-07-08 jrick work tree, use the repository path associated with this work tree.
853 624411d2 2023-07-08 jrick .Op Fl c Ar commit
854 624411d2 2023-07-08 jrick .Op Fl r Ar repository-path
855 624411d2 2023-07-08 jrick .Op Ar path
857 624411d2 2023-07-08 jrick .Dl Pq alias: Cm tr
858 624411d2 2023-07-08 jrick Display a listing of files and directories at the specified
859 624411d2 2023-07-08 jrick directory path in the repository.
860 624411d2 2023-07-08 jrick Entries shown in this listing may carry one of the following trailing
861 624411d2 2023-07-08 jrick annotations:
862 624411d2 2023-07-08 jrick .Bl -column YXZ description
863 624411d2 2023-07-08 jrick .It @ Ta entry is a symbolic link
864 624411d2 2023-07-08 jrick .It / Ta entry is a directory
865 624411d2 2023-07-08 jrick .It * Ta entry is an executable file
866 624411d2 2023-07-08 jrick .It $ Ta entry is a Git submodule
869 624411d2 2023-07-08 jrick Symbolic link entries are also annotated with the target path of the link.
873 624411d2 2023-07-08 jrick is specified, list the repository path corresponding to the current
874 624411d2 2023-07-08 jrick directory of the work tree, or the root directory of the repository
875 624411d2 2023-07-08 jrick if there is no work tree.
877 624411d2 2023-07-08 jrick The options for
878 624411d2 2023-07-08 jrick .Cm got tree
879 624411d2 2023-07-08 jrick are as follows:
880 624411d2 2023-07-08 jrick .Bl -tag -width Ds
881 624411d2 2023-07-08 jrick .It Fl c Ar commit
882 624411d2 2023-07-08 jrick List files and directories as they appear in the specified
883 624411d2 2023-07-08 jrick .Ar commit .
884 624411d2 2023-07-08 jrick The expected argument is a commit ID SHA1 hash or an existing reference
885 624411d2 2023-07-08 jrick or tag name which will be resolved to a commit ID.
886 624411d2 2023-07-08 jrick An abbreviated hash argument will be expanded to a full SHA1 hash
887 624411d2 2023-07-08 jrick automatically, provided the abbreviation is unique.
889 624411d2 2023-07-08 jrick Show object IDs of files (blob objects) and directories (tree objects).
891 624411d2 2023-07-08 jrick Recurse into sub-directories in the repository.
892 624411d2 2023-07-08 jrick .It Fl r Ar repository-path
893 624411d2 2023-07-08 jrick Use the repository at the specified path.
894 624411d2 2023-07-08 jrick If not specified, assume the repository is located at or above the current
895 624411d2 2023-07-08 jrick working directory.
896 624411d2 2023-07-08 jrick If this directory is a
898 624411d2 2023-07-08 jrick work tree, use the repository path associated with this work tree.
902 624411d2 2023-07-08 jrick .Cm remove
903 624411d2 2023-07-08 jrick .Op Fl fkR
904 624411d2 2023-07-08 jrick .Op Fl s Ar status-codes
905 624411d2 2023-07-08 jrick .Ar path ...
907 624411d2 2023-07-08 jrick .Dl Pq alias: Cm rm
908 624411d2 2023-07-08 jrick Remove versioned files from a work tree and schedule them for deletion
909 624411d2 2023-07-08 jrick from the repository in the next commit.
911 624411d2 2023-07-08 jrick The options for
912 624411d2 2023-07-08 jrick .Cm got remove
913 624411d2 2023-07-08 jrick are as follows:
914 624411d2 2023-07-08 jrick .Bl -tag -width Ds
916 624411d2 2023-07-08 jrick Perform the operation even if a file contains local modifications,
917 624411d2 2023-07-08 jrick and do not raise an error if a specified
919 624411d2 2023-07-08 jrick does not exist on disk.
921 624411d2 2023-07-08 jrick Keep affected files on disk.
923 624411d2 2023-07-08 jrick Permit recursion into directories.
924 624411d2 2023-07-08 jrick If this option is not specified,
925 624411d2 2023-07-08 jrick .Cm got remove
926 624411d2 2023-07-08 jrick will refuse to run if a specified
928 624411d2 2023-07-08 jrick is a directory.
929 624411d2 2023-07-08 jrick .It Fl s Ar status-codes
930 624411d2 2023-07-08 jrick Only delete files with a modification status matching one of the
931 624411d2 2023-07-08 jrick single-character status codes contained in the
932 624411d2 2023-07-08 jrick .Ar status-codes
934 624411d2 2023-07-08 jrick The following status codes may be specified:
935 624411d2 2023-07-08 jrick .Bl -column YXZ description
936 624411d2 2023-07-08 jrick .It M Ta modified file (this implies the
939 624411d2 2023-07-08 jrick .It ! Ta versioned file expected on disk but missing
946 624411d2 2023-07-08 jrick .Op Fl c Ar commit
947 624411d2 2023-07-08 jrick .Op Fl p Ar strip-count
948 624411d2 2023-07-08 jrick .Op Ar patchfile
950 624411d2 2023-07-08 jrick .Dl Pq alias: Cm pa
951 624411d2 2023-07-08 jrick Apply changes from
952 624411d2 2023-07-08 jrick .Ar patchfile
953 624411d2 2023-07-08 jrick to files in a work tree.
954 624411d2 2023-07-08 jrick Files added or removed by a patch will be scheduled for addition or removal in
955 624411d2 2023-07-08 jrick the work tree.
957 624411d2 2023-07-08 jrick The patch must be in the unified diff format as produced by
958 624411d2 2023-07-08 jrick .Cm got diff ,
959 624411d2 2023-07-08 jrick .Xr git-diff 1 ,
961 624411d2 2023-07-08 jrick .Xr diff 1
964 624411d2 2023-07-08 jrick diff when invoked with their
968 624411d2 2023-07-08 jrick .Ar patchfile
969 624411d2 2023-07-08 jrick argument is provided, read unified diff data from standard input instead.
972 624411d2 2023-07-08 jrick .Ar patchfile
973 624411d2 2023-07-08 jrick contains multiple patches, then attempt to apply each of them in sequence.
975 624411d2 2023-07-08 jrick Show the status of each affected file, using the following status codes:
976 624411d2 2023-07-08 jrick .Bl -column XYZ description
977 624411d2 2023-07-08 jrick .It M Ta file was modified
978 624411d2 2023-07-08 jrick .It G Ta file was merged using a merge-base found in the repository
979 624411d2 2023-07-08 jrick .It C Ta file was merged and conflicts occurred during merge
980 624411d2 2023-07-08 jrick .It D Ta file was deleted
981 624411d2 2023-07-08 jrick .It A Ta file was added
982 624411d2 2023-07-08 jrick .It # Ta failed to patch the file
985 624411d2 2023-07-08 jrick If a change does not match at its exact line number, attempt to
986 624411d2 2023-07-08 jrick apply it somewhere else in the file if a good spot can be found.
987 624411d2 2023-07-08 jrick Otherwise, the patch will fail to apply.
991 624411d2 2023-07-08 jrick will refuse to apply a patch if certain preconditions are not met.
992 624411d2 2023-07-08 jrick Files to be deleted must already be under version control, and must
993 624411d2 2023-07-08 jrick not have been scheduled for deletion already.
994 624411d2 2023-07-08 jrick Files to be added must not yet be under version control and must not
995 624411d2 2023-07-08 jrick already be present on disk.
996 624411d2 2023-07-08 jrick Files to be modified must already be under version control and may not
997 624411d2 2023-07-08 jrick contain conflict markers.
999 624411d2 2023-07-08 jrick If an error occurs, the
1000 624411d2 2023-07-08 jrick .Cm patch
1001 624411d2 2023-07-08 jrick operation will be aborted.
1002 624411d2 2023-07-08 jrick Any changes made to the work tree up to this point will be left behind.
1003 624411d2 2023-07-08 jrick Such changes can be viewed with
1004 624411d2 2023-07-08 jrick .Cm got diff
1005 624411d2 2023-07-08 jrick and can be reverted with
1006 624411d2 2023-07-08 jrick .Cm got revert
1007 624411d2 2023-07-08 jrick if needed.
1009 624411d2 2023-07-08 jrick The options for
1010 624411d2 2023-07-08 jrick .Cm got patch
1011 624411d2 2023-07-08 jrick are as follows:
1012 624411d2 2023-07-08 jrick .Bl -tag -width Ds
1013 624411d2 2023-07-08 jrick .It Fl c Ar commit
1014 624411d2 2023-07-08 jrick Attempt to locate files within the specified
1015 624411d2 2023-07-08 jrick .Ar commit
1016 624411d2 2023-07-08 jrick for use as a merge-base for 3-way merges.
1017 624411d2 2023-07-08 jrick Ideally, the specified
1018 624411d2 2023-07-08 jrick .Ar commit
1019 624411d2 2023-07-08 jrick should contain versions of files which the changes contained in the
1020 624411d2 2023-07-08 jrick .Ar patchfile
1021 624411d2 2023-07-08 jrick were based on.
1022 624411d2 2023-07-08 jrick Files will be located by path, relative to the repository root.
1025 624411d2 2023-07-08 jrick option is used then leading path components will be stripped
1026 624411d2 2023-07-08 jrick before paths are looked up in the repository.
1030 624411d2 2023-07-08 jrick option is not used then
1031 624411d2 2023-07-08 jrick .Cm got patch
1032 624411d2 2023-07-08 jrick will attempt to locate merge-bases via object IDs found in
1033 624411d2 2023-07-08 jrick .Ar patchfile
1034 624411d2 2023-07-08 jrick meta-data, such as produced by
1035 624411d2 2023-07-08 jrick .Cm got diff
1037 624411d2 2023-07-08 jrick .Xr git-diff 1 .
1038 624411d2 2023-07-08 jrick Use of the
1040 624411d2 2023-07-08 jrick option is only recommended in the absence of such meta-data.
1042 624411d2 2023-07-08 jrick In case no merge-base is available for a file, changes will be applied
1043 624411d2 2023-07-08 jrick without doing a 3-way merge.
1044 624411d2 2023-07-08 jrick Changes which do not apply cleanly may then be rejected entirely, rather
1045 624411d2 2023-07-08 jrick than producing merge conflicts in the patched target file.
1047 624411d2 2023-07-08 jrick Do not make any modifications to the work tree.
1048 624411d2 2023-07-08 jrick This can be used to check whether a patch would apply without issues.
1050 624411d2 2023-07-08 jrick .Ar patchfile
1051 624411d2 2023-07-08 jrick contains diffs that affect the same file multiple times, the results
1052 624411d2 2023-07-08 jrick displayed may be incorrect.
1053 624411d2 2023-07-08 jrick .It Fl p Ar strip-count
1054 624411d2 2023-07-08 jrick Specify the number of leading path components to strip from paths
1055 624411d2 2023-07-08 jrick parsed from
1056 624411d2 2023-07-08 jrick .Ar patchfile .
1059 624411d2 2023-07-08 jrick option is not used,
1063 624411d2 2023-07-08 jrick path prefixes generated by
1064 624411d2 2023-07-08 jrick .Xr git-diff 1
1065 624411d2 2023-07-08 jrick will be recognized and stripped automatically.
1067 624411d2 2023-07-08 jrick Reverse the patch before applying it.
1071 624411d2 2023-07-08 jrick .Cm revert
1072 624411d2 2023-07-08 jrick .Op Fl pR
1073 624411d2 2023-07-08 jrick .Op Fl F Ar response-script
1074 624411d2 2023-07-08 jrick .Ar path ...
1076 624411d2 2023-07-08 jrick .Dl Pq alias: Cm rv
1077 624411d2 2023-07-08 jrick Revert any local changes in files at the specified paths in a work tree.
1078 624411d2 2023-07-08 jrick File contents will be overwritten with those contained in the
1079 624411d2 2023-07-08 jrick work tree's base commit.
1080 624411d2 2023-07-08 jrick There is no way to bring discarded changes back after
1081 624411d2 2023-07-08 jrick .Cm got revert !
1083 624411d2 2023-07-08 jrick If a file was added with
1084 624411d2 2023-07-08 jrick .Cm got add ,
1085 624411d2 2023-07-08 jrick it will become an unversioned file again.
1086 624411d2 2023-07-08 jrick If a file was deleted with
1087 624411d2 2023-07-08 jrick .Cm got remove ,
1088 624411d2 2023-07-08 jrick it will be restored.
1090 624411d2 2023-07-08 jrick The options for
1091 624411d2 2023-07-08 jrick .Cm got revert
1092 624411d2 2023-07-08 jrick are as follows:
1093 624411d2 2023-07-08 jrick .Bl -tag -width Ds
1094 624411d2 2023-07-08 jrick .It Fl F Ar response-script
1097 624411d2 2023-07-08 jrick option, read
1102 624411d2 2023-07-08 jrick responses line-by-line from the specified
1103 624411d2 2023-07-08 jrick .Ar response-script
1104 624411d2 2023-07-08 jrick file instead of prompting interactively.
1106 624411d2 2023-07-08 jrick Instead of reverting all changes in files, interactively select or reject
1107 624411d2 2023-07-08 jrick changes to revert based on
1109 624411d2 2023-07-08 jrick (revert change),
1111 624411d2 2023-07-08 jrick (keep change), and
1113 624411d2 2023-07-08 jrick (quit reverting this file) responses.
1114 624411d2 2023-07-08 jrick If a file is in modified status, individual patches derived from the
1115 624411d2 2023-07-08 jrick modified file content can be reverted.
1116 624411d2 2023-07-08 jrick Files in added or deleted status may only be reverted in their entirety.
1118 624411d2 2023-07-08 jrick Permit recursion into directories.
1119 624411d2 2023-07-08 jrick If this option is not specified,
1120 624411d2 2023-07-08 jrick .Cm got revert
1121 624411d2 2023-07-08 jrick will refuse to run if a specified
1123 624411d2 2023-07-08 jrick is a directory.
1127 624411d2 2023-07-08 jrick .Cm commit
1128 624411d2 2023-07-08 jrick .Op Fl CNnS
1129 624411d2 2023-07-08 jrick .Op Fl A Ar author
1130 624411d2 2023-07-08 jrick .Op Fl F Ar path
1131 624411d2 2023-07-08 jrick .Op Fl m Ar message
1132 624411d2 2023-07-08 jrick .Op Ar path ...
1134 624411d2 2023-07-08 jrick .Dl Pq alias: Cm ci
1135 624411d2 2023-07-08 jrick Create a new commit in the repository from changes in a work tree
1136 624411d2 2023-07-08 jrick and use this commit as the new base commit for the work tree.
1139 624411d2 2023-07-08 jrick is specified, commit all changes in the work tree.
1140 624411d2 2023-07-08 jrick Otherwise, commit changes at or within the specified paths.
1142 624411d2 2023-07-08 jrick If changes have been explicitly staged for commit with
1143 624411d2 2023-07-08 jrick .Cm got stage ,
1144 624411d2 2023-07-08 jrick only commit staged changes and reject any specified paths which
1145 624411d2 2023-07-08 jrick have not been staged.
1147 624411d2 2023-07-08 jrick .Cm got commit
1148 624411d2 2023-07-08 jrick opens a temporary file in an editor where a log message can be written
1149 624411d2 2023-07-08 jrick unless the
1151 624411d2 2023-07-08 jrick option is used
1156 624411d2 2023-07-08 jrick options are used together.
1157 ee27b57e 2023-07-15 naddy Quitting the editor without saving the file will abort the commit operation.
1159 624411d2 2023-07-08 jrick Show the status of each affected file, using the following status codes:
1160 624411d2 2023-07-08 jrick .Bl -column YXZ description
1161 624411d2 2023-07-08 jrick .It M Ta modified file
1162 624411d2 2023-07-08 jrick .It D Ta file was deleted
1163 624411d2 2023-07-08 jrick .It A Ta new file was added
1164 624411d2 2023-07-08 jrick .It m Ta modified file modes (executable bit only)
1167 624411d2 2023-07-08 jrick Files which are not part of the new commit will retain their previously
1168 624411d2 2023-07-08 jrick recorded base commit.
1171 624411d2 2023-07-08 jrick commands may refuse to run while the work tree contains files from
1172 624411d2 2023-07-08 jrick multiple base commits.
1173 624411d2 2023-07-08 jrick The base commit of such a work tree can be made consistent by running
1174 624411d2 2023-07-08 jrick .Cm got update
1175 624411d2 2023-07-08 jrick across the entire work tree.
1178 624411d2 2023-07-08 jrick .Cm got commit
1179 624411d2 2023-07-08 jrick command requires the
1180 624411d2 2023-07-08 jrick .Ev GOT_AUTHOR
1181 624411d2 2023-07-08 jrick environment variable to be set,
1182 624411d2 2023-07-08 jrick unless an author has been configured in
1183 624411d2 2023-07-08 jrick .Xr got.conf 5
1185 624411d2 2023-07-08 jrick .Dv user.name
1187 624411d2 2023-07-08 jrick .Dv user.email
1188 624411d2 2023-07-08 jrick configuration settings can be
1189 624411d2 2023-07-08 jrick obtained from the repository's
1190 624411d2 2023-07-08 jrick .Pa .git/config
1191 624411d2 2023-07-08 jrick file or from Git's global
1192 624411d2 2023-07-08 jrick .Pa ~/.gitconfig
1193 624411d2 2023-07-08 jrick configuration file.
1195 624411d2 2023-07-08 jrick The options for
1196 624411d2 2023-07-08 jrick .Cm got commit
1197 624411d2 2023-07-08 jrick are as follows:
1198 624411d2 2023-07-08 jrick .Bl -tag -width Ds
1199 624411d2 2023-07-08 jrick .It Fl A Ar author
1200 624411d2 2023-07-08 jrick Set author information in the newly created commit to
1201 624411d2 2023-07-08 jrick .Ar author .
1202 624411d2 2023-07-08 jrick This is useful when committing changes on behalf of someone else.
1204 624411d2 2023-07-08 jrick .Ar author
1205 624411d2 2023-07-08 jrick argument must use the same format as the
1206 624411d2 2023-07-08 jrick .Ev GOT_AUTHOR
1207 624411d2 2023-07-08 jrick environment variable.
1209 624411d2 2023-07-08 jrick In addition to storing author information, the newly created commit
1210 624411d2 2023-07-08 jrick object will retain
1211 624411d2 2023-07-08 jrick .Dq committer
1212 624411d2 2023-07-08 jrick information which is obtained, as usual, from the
1213 624411d2 2023-07-08 jrick .Ev GOT_AUTHOR
1214 624411d2 2023-07-08 jrick environment variable, or
1215 624411d2 2023-07-08 jrick .Xr got.conf 5 ,
1216 624411d2 2023-07-08 jrick or Git configuration settings.
1218 624411d2 2023-07-08 jrick Allow committing files in conflicted status.
1220 624411d2 2023-07-08 jrick Committing files with conflict markers should generally be avoided.
1221 624411d2 2023-07-08 jrick Cases where conflict markers must be stored in the repository for
1222 624411d2 2023-07-08 jrick some legitimate reason should be very rare.
1223 624411d2 2023-07-08 jrick There are usually ways to avoid storing conflict markers verbatim by
1224 624411d2 2023-07-08 jrick applying appropriate programming tricks.
1225 624411d2 2023-07-08 jrick .It Fl F Ar path
1226 624411d2 2023-07-08 jrick Use the prepared log message stored in the file found at
1228 624411d2 2023-07-08 jrick when creating the new commit.
1229 624411d2 2023-07-08 jrick .Cm got commit
1230 624411d2 2023-07-08 jrick opens a temporary file in an editor where the prepared log message can be
1231 624411d2 2023-07-08 jrick reviewed and edited further if needed.
1232 624411d2 2023-07-08 jrick Cannot be used together with the
1235 624411d2 2023-07-08 jrick .It Fl m Ar message
1236 624411d2 2023-07-08 jrick Use the specified log message when creating the new commit.
1237 624411d2 2023-07-08 jrick Cannot be used together with the
1241 624411d2 2023-07-08 jrick This option prevents
1242 624411d2 2023-07-08 jrick .Cm got commit
1243 624411d2 2023-07-08 jrick from opening the commit message in an editor.
1244 624411d2 2023-07-08 jrick It has no effect unless it is used together with the
1246 624411d2 2023-07-08 jrick option and is intended for non-interactive use such as scripting.
1248 624411d2 2023-07-08 jrick This option prevents
1249 624411d2 2023-07-08 jrick .Cm got commit
1250 624411d2 2023-07-08 jrick from generating a diff of the to-be-committed changes in a temporary file
1251 624411d2 2023-07-08 jrick which can be viewed while editing a commit message.
1253 624411d2 2023-07-08 jrick Allow the addition of symbolic links which point outside of the path space
1254 624411d2 2023-07-08 jrick that is under version control.
1255 624411d2 2023-07-08 jrick By default,
1256 624411d2 2023-07-08 jrick .Cm got commit
1257 624411d2 2023-07-08 jrick will reject such symbolic links due to safety concerns.
1258 624411d2 2023-07-08 jrick As a precaution,
1260 624411d2 2023-07-08 jrick may decide to represent such a symbolic link as a regular file which contains
1261 624411d2 2023-07-08 jrick the link's target path, rather than creating an actual symbolic link which
1262 624411d2 2023-07-08 jrick points outside of the work tree.
1263 624411d2 2023-07-08 jrick Use of this option is discouraged because external mechanisms such as
1264 624411d2 2023-07-08 jrick .Dq make obj
1265 624411d2 2023-07-08 jrick are better suited for managing symbolic links to paths not under
1266 624411d2 2023-07-08 jrick version control.
1269 624411d2 2023-07-08 jrick .Cm got commit
1270 624411d2 2023-07-08 jrick will refuse to run if certain preconditions are not met.
1271 624411d2 2023-07-08 jrick If the work tree's current branch is not in the
1272 624411d2 2023-07-08 jrick .Dq refs/heads/
1273 624411d2 2023-07-08 jrick reference namespace, new commits may not be created on this branch.
1274 624411d2 2023-07-08 jrick Local changes may only be committed if they are based on file content
1275 624411d2 2023-07-08 jrick found in the most recent commit on the work tree's branch.
1276 624411d2 2023-07-08 jrick If a path is found to be out of date,
1277 624411d2 2023-07-08 jrick .Cm got update
1278 624411d2 2023-07-08 jrick must be used first in order to merge local changes with changes made
1279 624411d2 2023-07-08 jrick in the repository.
1282 624411d2 2023-07-08 jrick .Cm cherrypick
1283 624411d2 2023-07-08 jrick .Op Fl lX
1284 624411d2 2023-07-08 jrick .Op Ar commit
1286 624411d2 2023-07-08 jrick .Dl Pq alias: Cm cy
1287 624411d2 2023-07-08 jrick Merge changes from a single
1288 624411d2 2023-07-08 jrick .Ar commit
1289 624411d2 2023-07-08 jrick into the work tree.
1290 624411d2 2023-07-08 jrick The specified
1291 624411d2 2023-07-08 jrick .Ar commit
1292 624411d2 2023-07-08 jrick should be on a different branch than the work tree's base commit.
1293 624411d2 2023-07-08 jrick The expected argument is a reference or a commit ID SHA1 hash.
1294 624411d2 2023-07-08 jrick An abbreviated hash argument will be expanded to a full SHA1 hash
1295 624411d2 2023-07-08 jrick automatically, provided the abbreviation is unique.
1297 624411d2 2023-07-08 jrick Show the status of each affected file, using the following status codes:
1298 624411d2 2023-07-08 jrick .Bl -column YXZ description
1299 624411d2 2023-07-08 jrick .It G Ta file was merged
1300 624411d2 2023-07-08 jrick .It C Ta file was merged and conflicts occurred during merge
1301 624411d2 2023-07-08 jrick .It ! Ta changes destined for a missing file were not merged
1302 624411d2 2023-07-08 jrick .It D Ta file was deleted
1303 624411d2 2023-07-08 jrick .It d Ta file's deletion was prevented by local modifications
1304 624411d2 2023-07-08 jrick .It A Ta new file was added
1305 624411d2 2023-07-08 jrick .It \(a~ Ta changes destined for a non-regular file were not merged
1306 624411d2 2023-07-08 jrick .It ? Ta changes destined for an unversioned file were not merged
1309 624411d2 2023-07-08 jrick The merged changes will appear as local changes in the work tree, which
1310 624411d2 2023-07-08 jrick may be viewed with
1311 624411d2 2023-07-08 jrick .Cm got diff ,
1312 624411d2 2023-07-08 jrick amended manually or with further
1313 624411d2 2023-07-08 jrick .Cm got cherrypick
1314 624411d2 2023-07-08 jrick commands,
1315 624411d2 2023-07-08 jrick committed with
1316 624411d2 2023-07-08 jrick .Cm got commit .
1318 624411d2 2023-07-08 jrick If invoked in a work tree where no
1319 624411d2 2023-07-08 jrick .Cm rebase ,
1320 624411d2 2023-07-08 jrick .Cm histedit ,
1322 624411d2 2023-07-08 jrick .Cm merge
1323 624411d2 2023-07-08 jrick operation is taking place,
1324 624411d2 2023-07-08 jrick .Cm got cherrypick
1325 624411d2 2023-07-08 jrick creates a record of commits which have been merged into the work tree.
1326 624411d2 2023-07-08 jrick When a file changed by
1327 624411d2 2023-07-08 jrick .Cm got cherrypick
1328 624411d2 2023-07-08 jrick is committed with
1329 624411d2 2023-07-08 jrick .Cm got commit ,
1330 624411d2 2023-07-08 jrick the log messages of relevant merged commits will then appear in the editor,
1331 624411d2 2023-07-08 jrick where the messages should be further adjusted to convey the reasons for
1332 624411d2 2023-07-08 jrick cherrypicking the changes.
1333 624411d2 2023-07-08 jrick Upon exiting the editor, if the time stamp of the log message file
1334 624411d2 2023-07-08 jrick is unchanged or the log message is empty,
1335 624411d2 2023-07-08 jrick .Cm got commit
1336 624411d2 2023-07-08 jrick will fail with an unmodified or empty log message error.
1338 624411d2 2023-07-08 jrick If all the changes in all files touched by a given commit are discarded,
1339 624411d2 2023-07-08 jrick e.g. with
1340 624411d2 2023-07-08 jrick .Cm got revert ,
1341 624411d2 2023-07-08 jrick this commit's log message record will also disappear.
1343 624411d2 2023-07-08 jrick .Cm got cherrypick
1344 624411d2 2023-07-08 jrick will refuse to run if certain preconditions are not met.
1345 624411d2 2023-07-08 jrick If the work tree contains multiple base commits, it must first be updated
1346 624411d2 2023-07-08 jrick to a single base commit with
1347 624411d2 2023-07-08 jrick .Cm got update .
1348 624411d2 2023-07-08 jrick If any relevant files already contain merge conflicts, these
1349 624411d2 2023-07-08 jrick conflicts must be resolved first.
1351 624411d2 2023-07-08 jrick The options for
1353 624411d2 2023-07-08 jrick .Cm cherrypick
1354 624411d2 2023-07-08 jrick are as follows:
1355 624411d2 2023-07-08 jrick .Bl -tag -width Ds
1357 624411d2 2023-07-08 jrick Display a list of commit log messages recorded by cherrypick operations,
1358 624411d2 2023-07-08 jrick represented by references in the
1359 624411d2 2023-07-08 jrick .Dq refs/got/worktree
1360 624411d2 2023-07-08 jrick reference namespace.
1362 624411d2 2023-07-08 jrick .Ar commit
1363 624411d2 2023-07-08 jrick is specified, only show the log message of the specified commit.
1365 624411d2 2023-07-08 jrick If invoked in a work tree, only log messages recorded by cherrypick operations
1366 624411d2 2023-07-08 jrick in the current work tree will be displayed.
1367 624411d2 2023-07-08 jrick Otherwise, all commit log messages will be displayed irrespective of the
1368 624411d2 2023-07-08 jrick work tree in which they were created.
1369 624411d2 2023-07-08 jrick This option cannot be used with
1372 624411d2 2023-07-08 jrick Delete log messages created by previous cherrypick operations, represented by
1373 624411d2 2023-07-08 jrick references in the
1374 624411d2 2023-07-08 jrick .Dq refs/got/worktree
1375 624411d2 2023-07-08 jrick reference namespace.
1377 624411d2 2023-07-08 jrick .Ar commit
1378 624411d2 2023-07-08 jrick is specified, only delete the log message of the specified commit.
1380 624411d2 2023-07-08 jrick If invoked in a work tree, only log messages recorded by cherrypick operations
1381 624411d2 2023-07-08 jrick in the current work tree will be deleted.
1382 624411d2 2023-07-08 jrick Otherwise, all commit log messages will be deleted irrespective of the
1383 624411d2 2023-07-08 jrick work tree in which they were created.
1384 624411d2 2023-07-08 jrick This option cannot be used with
1390 624411d2 2023-07-08 jrick .Cm backout
1391 624411d2 2023-07-08 jrick .Op Fl lX
1392 624411d2 2023-07-08 jrick .Op Ar commit
1394 624411d2 2023-07-08 jrick .Dl Pq alias: Cm bo
1395 624411d2 2023-07-08 jrick Reverse-merge changes from a single
1396 624411d2 2023-07-08 jrick .Ar commit
1397 624411d2 2023-07-08 jrick into the work tree.
1398 624411d2 2023-07-08 jrick The specified
1399 624411d2 2023-07-08 jrick .Ar commit
1400 624411d2 2023-07-08 jrick should be on the same branch as the work tree's base commit.
1401 624411d2 2023-07-08 jrick The expected argument is a reference or a commit ID SHA1 hash.
1402 624411d2 2023-07-08 jrick An abbreviated hash argument will be expanded to a full SHA1 hash
1403 624411d2 2023-07-08 jrick automatically, provided the abbreviation is unique.
1405 624411d2 2023-07-08 jrick Show the status of each affected file, using the following status codes:
1406 624411d2 2023-07-08 jrick .Bl -column YXZ description
1407 624411d2 2023-07-08 jrick .It G Ta file was merged
1408 624411d2 2023-07-08 jrick .It C Ta file was merged and conflicts occurred during merge
1409 624411d2 2023-07-08 jrick .It ! Ta changes destined for a missing file were not merged
1410 624411d2 2023-07-08 jrick .It D Ta file was deleted
1411 624411d2 2023-07-08 jrick .It d Ta file's deletion was prevented by local modifications
1412 624411d2 2023-07-08 jrick .It A Ta new file was added
1413 624411d2 2023-07-08 jrick .It \(a~ Ta changes destined for a non-regular file were not merged
1414 624411d2 2023-07-08 jrick .It ? Ta changes destined for an unversioned file were not merged
1417 624411d2 2023-07-08 jrick The reverse-merged changes will appear as local changes in the work tree,
1418 624411d2 2023-07-08 jrick which may be viewed with
1419 624411d2 2023-07-08 jrick .Cm got diff ,
1420 624411d2 2023-07-08 jrick amended manually or with further
1421 624411d2 2023-07-08 jrick .Cm got backout
1422 624411d2 2023-07-08 jrick commands,
1423 624411d2 2023-07-08 jrick committed with
1424 624411d2 2023-07-08 jrick .Cm got commit .
1426 624411d2 2023-07-08 jrick If invoked in a work tree where no
1427 624411d2 2023-07-08 jrick .Cm rebase ,
1428 624411d2 2023-07-08 jrick .Cm histedit ,
1430 624411d2 2023-07-08 jrick .Cm merge
1431 624411d2 2023-07-08 jrick operation is taking place,
1432 624411d2 2023-07-08 jrick .Cm got backout
1433 624411d2 2023-07-08 jrick creates a record of commits which have been reverse-merged into the work tree.
1434 624411d2 2023-07-08 jrick When a file changed by
1435 624411d2 2023-07-08 jrick .Cm got backout
1436 624411d2 2023-07-08 jrick is committed with
1437 624411d2 2023-07-08 jrick .Cm got commit ,
1438 624411d2 2023-07-08 jrick the log messages of relevant reverse-merged commits will then appear in
1439 624411d2 2023-07-08 jrick the editor, where the messages should be further adjusted to convey the
1440 624411d2 2023-07-08 jrick reasons for backing out the changes.
1441 624411d2 2023-07-08 jrick Upon exiting the editor, if the time stamp of the log message file
1442 624411d2 2023-07-08 jrick is unchanged or the log message is empty,
1443 624411d2 2023-07-08 jrick .Cm got commit
1444 624411d2 2023-07-08 jrick will fail with an unmodified or empty log message error.
1446 624411d2 2023-07-08 jrick If all the changes in all files touched by a given commit are discarded,
1447 624411d2 2023-07-08 jrick e.g. with
1448 624411d2 2023-07-08 jrick .Cm got revert ,
1449 624411d2 2023-07-08 jrick this commit's log message record will also disappear.
1451 624411d2 2023-07-08 jrick .Cm got backout
1452 624411d2 2023-07-08 jrick will refuse to run if certain preconditions are not met.
1453 624411d2 2023-07-08 jrick If the work tree contains multiple base commits, it must first be updated
1454 624411d2 2023-07-08 jrick to a single base commit with
1455 624411d2 2023-07-08 jrick .Cm got update .
1456 624411d2 2023-07-08 jrick If any relevant files already contain merge conflicts, these
1457 624411d2 2023-07-08 jrick conflicts must be resolved first.
1459 624411d2 2023-07-08 jrick The options for
1461 624411d2 2023-07-08 jrick .Cm backout
1462 624411d2 2023-07-08 jrick are as follows:
1463 624411d2 2023-07-08 jrick .Bl -tag -width Ds
1465 624411d2 2023-07-08 jrick Display a list of commit log messages recorded by backout operations,
1466 624411d2 2023-07-08 jrick represented by references in the
1467 624411d2 2023-07-08 jrick .Dq refs/got/worktree
1468 624411d2 2023-07-08 jrick reference namespace.
1470 624411d2 2023-07-08 jrick .Ar commit
1471 624411d2 2023-07-08 jrick is specified, only show the log message of the specified commit.
1473 624411d2 2023-07-08 jrick If invoked in a work tree, only log messages recorded by backout operations
1474 624411d2 2023-07-08 jrick in the current work tree will be displayed.
1475 624411d2 2023-07-08 jrick Otherwise, all commit log messages will be displayed irrespective of the
1476 624411d2 2023-07-08 jrick work tree in which they were created.
1477 624411d2 2023-07-08 jrick This option cannot be used with
1480 624411d2 2023-07-08 jrick Delete log messages created by previous backout operations, represented by
1481 624411d2 2023-07-08 jrick references in the
1482 624411d2 2023-07-08 jrick .Dq refs/got/worktree
1483 624411d2 2023-07-08 jrick reference namespace.
1485 624411d2 2023-07-08 jrick .Ar commit
1486 624411d2 2023-07-08 jrick is specified, only delete the log message of the specified commit.
1488 624411d2 2023-07-08 jrick If invoked in a work tree, only log messages recorded by backout operations
1489 624411d2 2023-07-08 jrick in the current work tree will be deleted.
1490 624411d2 2023-07-08 jrick Otherwise, all commit log messages will be deleted irrespective of the
1491 624411d2 2023-07-08 jrick work tree in which they were created.
1492 624411d2 2023-07-08 jrick This option cannot be used with
1499 624411d2 2023-07-08 jrick .Op Fl c Ar commit
1500 624411d2 2023-07-08 jrick .Op Fl r Ar repository-path
1501 624411d2 2023-07-08 jrick .Ar arg ...
1503 624411d2 2023-07-08 jrick Parse and print contents of objects to standard output in a line-based
1504 624411d2 2023-07-08 jrick text format.
1505 624411d2 2023-07-08 jrick Content of commit, tree, and tag objects is printed in a way similar
1506 624411d2 2023-07-08 jrick to the actual content stored in such objects.
1507 624411d2 2023-07-08 jrick Blob object contents are printed as they would appear in files on disk.
1509 624411d2 2023-07-08 jrick Attempt to interpret each argument as a reference, a tag name, or
1510 624411d2 2023-07-08 jrick an object ID SHA1 hash.
1511 624411d2 2023-07-08 jrick References will be resolved to an object ID.
1512 624411d2 2023-07-08 jrick Tag names will resolved to a tag object.
1513 624411d2 2023-07-08 jrick An abbreviated hash argument will be expanded to a full SHA1 hash
1514 624411d2 2023-07-08 jrick automatically, provided the abbreviation is unique.
1516 624411d2 2023-07-08 jrick If none of the above interpretations produce a valid result, or if the
1518 624411d2 2023-07-08 jrick option is used, attempt to interpret the argument as a path which will
1519 624411d2 2023-07-08 jrick be resolved to the ID of an object found at this path in the repository.
1521 624411d2 2023-07-08 jrick The options for
1522 624411d2 2023-07-08 jrick .Cm got cat
1523 624411d2 2023-07-08 jrick are as follows:
1524 624411d2 2023-07-08 jrick .Bl -tag -width Ds
1525 624411d2 2023-07-08 jrick .It Fl c Ar commit
1526 624411d2 2023-07-08 jrick Look up paths in the specified
1527 624411d2 2023-07-08 jrick .Ar commit .
1528 624411d2 2023-07-08 jrick If this option is not used, paths are looked up in the commit resolved
1529 624411d2 2023-07-08 jrick via the repository's HEAD reference.
1530 624411d2 2023-07-08 jrick The expected argument is a commit ID SHA1 hash or an existing reference
1531 624411d2 2023-07-08 jrick or tag name which will be resolved to a commit ID.
1532 624411d2 2023-07-08 jrick An abbreviated hash argument will be expanded to a full SHA1 hash
1533 624411d2 2023-07-08 jrick automatically, provided the abbreviation is unique.
1535 624411d2 2023-07-08 jrick Interpret all arguments as paths only.
1536 624411d2 2023-07-08 jrick This option can be used to resolve ambiguity in cases where paths
1537 624411d2 2023-07-08 jrick look like tag names, reference names, or object IDs.
1538 624411d2 2023-07-08 jrick .It Fl r Ar repository-path
1539 624411d2 2023-07-08 jrick Use the repository at the specified path.
1540 624411d2 2023-07-08 jrick If not specified, assume the repository is located at or above the current
1541 624411d2 2023-07-08 jrick working directory.
1542 624411d2 2023-07-08 jrick If this directory is a
1544 624411d2 2023-07-08 jrick work tree, use the repository path associated with this work tree.
1546 624411d2 2023-07-08 jrick .It Cm info Op Ar path ...
1547 624411d2 2023-07-08 jrick Display meta-data stored in a work tree.
1549 624411d2 2023-07-08 jrick .Xr got-worktree 5
1550 624411d2 2023-07-08 jrick for details.
1552 624411d2 2023-07-08 jrick The work tree to use is resolved implicitly by walking upwards from the
1553 624411d2 2023-07-08 jrick current working directory.
1555 624411d2 2023-07-08 jrick If one or more
1557 624411d2 2023-07-08 jrick arguments are specified, show additional per-file information for tracked
1558 624411d2 2023-07-08 jrick files located at or within these paths.
1561 624411d2 2023-07-08 jrick argument corresponds to the work tree's root directory, display information
1562 624411d2 2023-07-08 jrick for all tracked files.
1564 624411d2 2023-07-08 jrick .Sh ENVIRONMENT
1565 624411d2 2023-07-08 jrick .Bl -tag -width GOT_IGNORE_GITCONFIG
1566 624411d2 2023-07-08 jrick .It Ev GOT_AUTHOR
1567 624411d2 2023-07-08 jrick The author's name and email address, such as
1568 624411d2 2023-07-08 jrick .Dq An Flan Hacker Aq Mt flan_hacker@openbsd.org .
1569 624411d2 2023-07-08 jrick Used by the
1570 624411d2 2023-07-08 jrick .Cm got commit ,
1571 624411d2 2023-07-08 jrick .Cm got import ,
1572 624411d2 2023-07-08 jrick .Cm got rebase ,
1573 624411d2 2023-07-08 jrick .Cm got merge ,
1575 624411d2 2023-07-08 jrick .Cm got histedit
1576 624411d2 2023-07-08 jrick commands.
1578 624411d2 2023-07-08 jrick .Xr git 1
1579 624411d2 2023-07-08 jrick may fail to parse commits without an email address in author data,
1581 624411d2 2023-07-08 jrick attempts to reject
1582 624411d2 2023-07-08 jrick .Ev GOT_AUTHOR
1583 624411d2 2023-07-08 jrick environment variables with a missing email address.
1585 624411d2 2023-07-08 jrick .Ev GOT_AUTHOR will be overridden by configuration settings in
1586 624411d2 2023-07-08 jrick .Xr got.conf 5
1587 624411d2 2023-07-08 jrick or by Git's
1588 624411d2 2023-07-08 jrick .Dv user.name
1590 624411d2 2023-07-08 jrick .Dv user.email
1591 624411d2 2023-07-08 jrick configuration settings in the repository's
1592 624411d2 2023-07-08 jrick .Pa .git/config
1595 624411d2 2023-07-08 jrick .Dv user.name
1597 624411d2 2023-07-08 jrick .Dv user.email
1598 624411d2 2023-07-08 jrick configuration settings contained in Git's global
1599 624411d2 2023-07-08 jrick .Pa ~/.gitconfig
1600 624411d2 2023-07-08 jrick configuration file will only be used if neither
1601 624411d2 2023-07-08 jrick .Xr got.conf 5
1603 624411d2 2023-07-08 jrick .Ev GOT_AUTHOR
1604 624411d2 2023-07-08 jrick environment variable provide author information.
1605 624411d2 2023-07-08 jrick .It Ev GOT_IGNORE_GITCONFIG
1606 624411d2 2023-07-08 jrick If this variable is set then any remote repository definitions or author
1607 624411d2 2023-07-08 jrick information found in Git configuration files will be ignored.
1608 624411d2 2023-07-08 jrick .It Ev GOT_LOG_DEFAULT_LIMIT
1609 624411d2 2023-07-08 jrick The default limit on the number of commits traversed by
1610 624411d2 2023-07-08 jrick .Cm got log .
1611 624411d2 2023-07-08 jrick If set to zero, the limit is unbounded.
1612 624411d2 2023-07-08 jrick This variable will be silently ignored if it is set to a non-numeric value.
1613 624411d2 2023-07-08 jrick .It Ev VISUAL , EDITOR
1614 624411d2 2023-07-08 jrick The editor spawned by
1615 624411d2 2023-07-08 jrick .Cm got commit ,
1616 624411d2 2023-07-08 jrick .Cm got histedit ,
1617 624411d2 2023-07-08 jrick .Cm got import ,
1619 624411d2 2023-07-08 jrick .Cm got tag .
1620 624411d2 2023-07-08 jrick If not set, the
1622 624411d2 2023-07-08 jrick text editor will be spawned.
1624 624411d2 2023-07-08 jrick .Sh FILES
1625 624411d2 2023-07-08 jrick .Bl -tag -width packed-refs -compact
1626 624411d2 2023-07-08 jrick .It Pa got.conf
1627 624411d2 2023-07-08 jrick Repository-wide configuration settings for
1629 624411d2 2023-07-08 jrick If present, a
1630 624411d2 2023-07-08 jrick .Xr got.conf 5
1631 624411d2 2023-07-08 jrick configuration file located in the root directory of a Git repository
1632 624411d2 2023-07-08 jrick supersedes any relevant settings in Git's
1633 624411d2 2023-07-08 jrick .Pa config
1636 624411d2 2023-07-08 jrick .It Pa .got/got.conf
1637 624411d2 2023-07-08 jrick Worktree-specific configuration settings for
1639 624411d2 2023-07-08 jrick If present, a
1640 624411d2 2023-07-08 jrick .Xr got.conf 5
1641 624411d2 2023-07-08 jrick configuration file in the
1643 624411d2 2023-07-08 jrick meta-data directory of a work tree supersedes any relevant settings in
1644 624411d2 2023-07-08 jrick the repository's
1645 624411d2 2023-07-08 jrick .Xr got.conf 5
1646 624411d2 2023-07-08 jrick configuration file and Git's
1647 624411d2 2023-07-08 jrick .Pa config
1650 624411d2 2023-07-08 jrick .Sh EXIT STATUS
1651 624411d2 2023-07-08 jrick .Ex -std got
1652 624411d2 2023-07-08 jrick .Sh EXAMPLES
1653 624411d2 2023-07-08 jrick Enable tab-completion of
1655 624411d2 2023-07-08 jrick command names in
1656 624411d2 2023-07-08 jrick .Xr ksh 1 :
1658 624411d2 2023-07-08 jrick .Dl $ set -A complete_got_1 -- $(got -h 2>&1 | sed -n s/commands://p)
1660 624411d2 2023-07-08 jrick Clone an existing Git repository for use with
1663 624411d2 2023-07-08 jrick .Dl $ cd /var/git/
1664 624411d2 2023-07-08 jrick .Dl $ got clone ssh://git@github.com/openbsd/src.git
1666 624411d2 2023-07-08 jrick Unfortunately, many of the popular Git hosting sites do not offer anonymous
1667 624411d2 2023-07-08 jrick access via SSH.
1668 624411d2 2023-07-08 jrick Such sites will require an account to be created, and a public SSH key to be
1669 624411d2 2023-07-08 jrick uploaded to this account, before repository access via ssh:// URLs will work.
1671 624411d2 2023-07-08 jrick Use of HTTP URLs currently requires
1672 624411d2 2023-07-08 jrick .Xr git 1 :
1674 624411d2 2023-07-08 jrick .Dl $ cd /var/git/
1675 624411d2 2023-07-08 jrick .Dl $ git clone --bare https://github.com/openbsd/src.git
1677 624411d2 2023-07-08 jrick Alternatively, for quick and dirty local testing of
1679 624411d2 2023-07-08 jrick a new Git repository could be created and populated with files,
1680 624411d2 2023-07-08 jrick e.g. from a temporary CVS checkout located at
1681 624411d2 2023-07-08 jrick .Pa /tmp/src :
1683 624411d2 2023-07-08 jrick .Dl $ gotadmin init /var/git/src.git
1684 624411d2 2023-07-08 jrick .Dl $ got import -r /var/git/src.git -I CVS -I obj /tmp/src
1686 624411d2 2023-07-08 jrick Check out a work tree from the Git repository to /usr/src:
1688 624411d2 2023-07-08 jrick .Dl $ got checkout /var/git/src.git /usr/src
1690 624411d2 2023-07-08 jrick View local changes in a work tree directory:
1692 624411d2 2023-07-08 jrick .Dl $ got diff | less
1694 624411d2 2023-07-08 jrick In a work tree, display files in a potentially problematic state:
1696 624411d2 2023-07-08 jrick .Dl $ got status -s 'C!~?'
1698 624411d2 2023-07-08 jrick Interactively revert selected local changes in a work tree directory:
1700 624411d2 2023-07-08 jrick .Dl $ got revert -p -R\ .
1702 624411d2 2023-07-08 jrick In a work tree or a git repository directory, list all branch references:
1704 624411d2 2023-07-08 jrick .Dl $ got branch -l
1706 624411d2 2023-07-08 jrick As above, but list the most recently modified branches only:
1708 624411d2 2023-07-08 jrick .Dl $ got branch -lt | head
1710 624411d2 2023-07-08 jrick In a work tree or a git repository directory, create a new branch called
1711 624411d2 2023-07-08 jrick .Dq unified-buffer-cache
1712 624411d2 2023-07-08 jrick which is forked off the
1713 624411d2 2023-07-08 jrick .Dq master
1716 624411d2 2023-07-08 jrick .Dl $ got branch -c master unified-buffer-cache
1718 624411d2 2023-07-08 jrick Switch an existing work tree to the branch
1719 624411d2 2023-07-08 jrick .Dq unified-buffer-cache .
1720 624411d2 2023-07-08 jrick Local changes in the work tree will be preserved and merged if necessary:
1722 624411d2 2023-07-08 jrick .Dl $ got update -b unified-buffer-cache
1724 624411d2 2023-07-08 jrick Create a new commit from local changes in a work tree directory.
1725 624411d2 2023-07-08 jrick This new commit will become the head commit of the work tree's current branch:
1727 624411d2 2023-07-08 jrick .Dl $ got commit
1729 624411d2 2023-07-08 jrick In a work tree or a git repository directory, view changes committed in
1730 624411d2 2023-07-08 jrick the 3 most recent commits to the work tree's branch, or the branch resolved
1731 624411d2 2023-07-08 jrick via the repository's HEAD reference, respectively:
1733 624411d2 2023-07-08 jrick .Dl $ got log -p -l 3
1735 624411d2 2023-07-08 jrick As above, but display changes in the order in which
1736 624411d2 2023-07-08 jrick .Xr patch 1
1737 624411d2 2023-07-08 jrick could apply them in sequence:
1739 624411d2 2023-07-08 jrick .Dl $ got log -p -l 3 -R
1741 624411d2 2023-07-08 jrick In a work tree or a git repository directory, log the history of a subdirectory:
1743 624411d2 2023-07-08 jrick .Dl $ got log sys/uvm
1745 624411d2 2023-07-08 jrick While operating inside a work tree, paths are specified relative to the current
1746 624411d2 2023-07-08 jrick working directory, so this command will log the subdirectory
1747 624411d2 2023-07-08 jrick .Pa sys/uvm :
1749 624411d2 2023-07-08 jrick .Dl $ cd sys/uvm && got log\ .
1751 624411d2 2023-07-08 jrick And this command has the same effect:
1753 624411d2 2023-07-08 jrick .Dl $ cd sys/dev/usb && got log ../../uvm
1755 624411d2 2023-07-08 jrick And this command displays work tree meta-data about all tracked files:
1757 624411d2 2023-07-08 jrick .Dl $ cd /usr/src
1758 624411d2 2023-07-08 jrick .Dl $ got info\ . | less
1760 624411d2 2023-07-08 jrick Add new files and remove obsolete files in a work tree directory:
1762 624411d2 2023-07-08 jrick .Dl $ got add sys/uvm/uvm_ubc.c
1763 624411d2 2023-07-08 jrick .Dl $ got remove sys/uvm/uvm_vnode.c
1765 624411d2 2023-07-08 jrick Create a new commit from local changes in a work tree directory
1766 624411d2 2023-07-08 jrick with a pre-defined log message.
1768 624411d2 2023-07-08 jrick .Dl $ got commit -m 'unify the buffer cache'
1770 624411d2 2023-07-08 jrick Alternatively, create a new commit from local changes in a work tree
1771 624411d2 2023-07-08 jrick directory with a log message that has been prepared in the file
1772 624411d2 2023-07-08 jrick .Pa /tmp/msg :
1774 624411d2 2023-07-08 jrick .Dl $ got commit -F /tmp/msg
1776 624411d2 2023-07-08 jrick Update any work tree checked out from the
1777 624411d2 2023-07-08 jrick .Dq unified-buffer-cache
1778 624411d2 2023-07-08 jrick branch to the latest commit on this branch:
1780 624411d2 2023-07-08 jrick .Dl $ got update
1782 624411d2 2023-07-08 jrick Roll file content on the unified-buffer-cache branch back by one commit,
1783 624411d2 2023-07-08 jrick and then fetch the rolled-back change into the work tree as a local change
1784 624411d2 2023-07-08 jrick to be amended and perhaps committed again:
1786 624411d2 2023-07-08 jrick .Dl $ got backout unified-buffer-cache
1787 624411d2 2023-07-08 jrick .Dl $ got commit -m 'roll back previous'
1788 624411d2 2023-07-08 jrick .Dl $ # now back out the previous backout :-)
1789 624411d2 2023-07-08 jrick .Dl $ got backout unified-buffer-cache
1791 624411d2 2023-07-08 jrick Fetch new changes on the remote repository's
1792 624411d2 2023-07-08 jrick .Dq master
1793 624411d2 2023-07-08 jrick branch, making them visible on the local repository's
1794 624411d2 2023-07-08 jrick .Dq origin/master
1797 624411d2 2023-07-08 jrick .Dl $ cd /usr/src
1798 624411d2 2023-07-08 jrick .Dl $ got fetch
1800 624411d2 2023-07-08 jrick In a repository created with a HTTP URL and
1801 624411d2 2023-07-08 jrick .Cm git clone --bare
1803 624411d2 2023-07-08 jrick .Xr git-fetch 1
1804 624411d2 2023-07-08 jrick command must be used instead:
1806 624411d2 2023-07-08 jrick .Dl $ cd /var/git/src.git
1807 624411d2 2023-07-08 jrick .Dl $ git fetch origin master:refs/remotes/origin/master
1809 624411d2 2023-07-08 jrick Rebase the local
1810 624411d2 2023-07-08 jrick .Dq master
1811 624411d2 2023-07-08 jrick branch to merge the new changes that are now visible on the
1812 624411d2 2023-07-08 jrick .Dq origin/master
1815 624411d2 2023-07-08 jrick .Dl $ cd /usr/src
1816 624411d2 2023-07-08 jrick .Dl $ got update -b origin/master
1817 624411d2 2023-07-08 jrick .Dl $ got rebase master
1819 624411d2 2023-07-08 jrick Rebase the
1820 624411d2 2023-07-08 jrick .Dq unified-buffer-cache
1821 624411d2 2023-07-08 jrick branch on top of the new head commit of the
1822 624411d2 2023-07-08 jrick .Dq master
1825 624411d2 2023-07-08 jrick .Dl $ got update -b master
1826 624411d2 2023-07-08 jrick .Dl $ got rebase unified-buffer-cache
1828 624411d2 2023-07-08 jrick Create a patch from all changes on the unified-buffer-cache branch.
1829 624411d2 2023-07-08 jrick The patch can be mailed out for review and applied to
1830 624411d2 2023-07-08 jrick .Ox Ns 's
1831 624411d2 2023-07-08 jrick CVS tree:
1833 624411d2 2023-07-08 jrick .Dl $ got diff master unified-buffer-cache > /tmp/ubc.diff
1835 624411d2 2023-07-08 jrick Edit the entire commit history of the
1836 624411d2 2023-07-08 jrick .Dq unified-buffer-cache
1839 624411d2 2023-07-08 jrick .Dl $ got update -b unified-buffer-cache
1840 624411d2 2023-07-08 jrick .Dl $ got update -c master
1841 624411d2 2023-07-08 jrick .Dl $ got histedit
1843 624411d2 2023-07-08 jrick Before working against existing branches in a repository cloned with
1844 624411d2 2023-07-08 jrick .Cm git clone --bare
1845 624411d2 2023-07-08 jrick instead of
1846 624411d2 2023-07-08 jrick .Cm got clone ,
1848 624411d2 2023-07-08 jrick .Dq refspec
1849 624411d2 2023-07-08 jrick must be configured to map all references in the remote repository
1851 624411d2 2023-07-08 jrick .Dq refs/remotes
1852 624411d2 2023-07-08 jrick namespace of the local repository.
1853 624411d2 2023-07-08 jrick This can be achieved by setting Git's
1854 624411d2 2023-07-08 jrick .Pa remote.origin.fetch
1855 624411d2 2023-07-08 jrick configuration variable to the value
1856 624411d2 2023-07-08 jrick .Dq +refs/heads/*:refs/remotes/origin/*
1858 624411d2 2023-07-08 jrick .Cm git config
1861 624411d2 2023-07-08 jrick .Dl $ cd /var/git/repo
1862 624411d2 2023-07-08 jrick .Dl $ git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
1864 624411d2 2023-07-08 jrick Additionally, the
1865 624411d2 2023-07-08 jrick .Dq mirror
1866 624411d2 2023-07-08 jrick option must be disabled:
1868 624411d2 2023-07-08 jrick .Dl $ cd /var/git/repo
1869 624411d2 2023-07-08 jrick .Dl $ git config remote.origin.mirror false
1871 624411d2 2023-07-08 jrick Alternatively, the following
1872 624411d2 2023-07-08 jrick .Xr git-fetch 1
1873 624411d2 2023-07-08 jrick configuration item can be added manually to the Git repository's
1874 624411d2 2023-07-08 jrick .Pa config
1877 624411d2 2023-07-08 jrick .Dl [remote \&"origin\&"]
1878 624411d2 2023-07-08 jrick .Dl url = ...
1879 624411d2 2023-07-08 jrick .Dl fetch = +refs/heads/*:refs/remotes/origin/*
1880 624411d2 2023-07-08 jrick .Dl mirror = false
1882 624411d2 2023-07-08 jrick This configuration leaves the local repository's
1883 624411d2 2023-07-08 jrick .Dq refs/heads
1884 624411d2 2023-07-08 jrick namespace free for use by local branches checked out with
1885 624411d2 2023-07-08 jrick .Cm got checkout
1886 624411d2 2023-07-08 jrick and, if needed, created with
1887 624411d2 2023-07-08 jrick .Cm got branch .
1888 624411d2 2023-07-08 jrick Branches in the
1889 624411d2 2023-07-08 jrick .Dq refs/remotes/origin
1890 624411d2 2023-07-08 jrick namespace can now be updated with incoming changes from the remote
1891 624411d2 2023-07-08 jrick repository with
1892 624411d2 2023-07-08 jrick .Cm got fetch
1894 624411d2 2023-07-08 jrick .Xr git-fetch 1
1895 624411d2 2023-07-08 jrick without extra command line arguments.
1896 624411d2 2023-07-08 jrick Newly fetched changes can be examined with
1897 624411d2 2023-07-08 jrick .Cm got log .
1899 624411d2 2023-07-08 jrick Display changes on the remote repository's version of the
1900 624411d2 2023-07-08 jrick .Dq master
1901 624411d2 2023-07-08 jrick branch, as of the last time
1902 624411d2 2023-07-08 jrick .Cm got fetch
1905 624411d2 2023-07-08 jrick .Dl $ got log -c origin/master | less
1907 624411d2 2023-07-08 jrick As shown here, most commands accept abbreviated reference names such as
1908 624411d2 2023-07-08 jrick .Dq origin/master
1909 624411d2 2023-07-08 jrick instead of
1910 624411d2 2023-07-08 jrick .Dq refs/remotes/origin/master .
1911 624411d2 2023-07-08 jrick The latter is only needed in case of ambiguity.
1913 624411d2 2023-07-08 jrick .Cm got rebase
1914 624411d2 2023-07-08 jrick can be used to merge changes which are visible on the
1915 624411d2 2023-07-08 jrick .Dq origin/master
1916 624411d2 2023-07-08 jrick branch into the
1917 624411d2 2023-07-08 jrick .Dq master
1919 624411d2 2023-07-08 jrick This will also merge local changes, if any, with the incoming changes:
1921 624411d2 2023-07-08 jrick .Dl $ got update -b origin/master
1922 624411d2 2023-07-08 jrick .Dl $ got rebase master
1924 624411d2 2023-07-08 jrick In order to make changes committed to the
1925 624411d2 2023-07-08 jrick .Dq unified-buffer-cache
1926 624411d2 2023-07-08 jrick visible on the
1927 624411d2 2023-07-08 jrick .Dq master
1928 624411d2 2023-07-08 jrick branch, the
1929 624411d2 2023-07-08 jrick .Dq unified-buffer-cache
1930 624411d2 2023-07-08 jrick branch can be rebased onto the
1931 624411d2 2023-07-08 jrick .Dq master
1934 624411d2 2023-07-08 jrick .Dl $ got update -b master
1935 624411d2 2023-07-08 jrick .Dl $ got rebase unified-buffer-cache
1937 624411d2 2023-07-08 jrick Changes on the
1938 624411d2 2023-07-08 jrick .Dq unified-buffer-cache
1939 624411d2 2023-07-08 jrick branch can now be made visible on the
1940 624411d2 2023-07-08 jrick .Dq master
1941 624411d2 2023-07-08 jrick branch with
1942 624411d2 2023-07-08 jrick .Cm got integrate .
1943 624411d2 2023-07-08 jrick Because the rebase operation switched the work tree to the
1944 624411d2 2023-07-08 jrick .Dq unified-buffer-cache
1945 624411d2 2023-07-08 jrick branch, the work tree must be switched back to the
1946 624411d2 2023-07-08 jrick .Dq master
1947 624411d2 2023-07-08 jrick branch first:
1949 624411d2 2023-07-08 jrick .Dl $ got update -b master
1950 624411d2 2023-07-08 jrick .Dl $ got integrate unified-buffer-cache
1953 624411d2 2023-07-08 jrick .Dq master
1954 624411d2 2023-07-08 jrick branch, log messages for local changes can now be amended with
1956 624411d2 2023-07-08 jrick by other developers and any other important new information:
1958 624411d2 2023-07-08 jrick .Dl $ got update -c origin/master
1959 624411d2 2023-07-08 jrick .Dl $ got histedit -m
1961 624411d2 2023-07-08 jrick If the remote repository offers write access, local changes on the
1962 624411d2 2023-07-08 jrick .Dq master
1963 624411d2 2023-07-08 jrick branch can be sent to the remote repository with
1964 624411d2 2023-07-08 jrick .Cm got send .
1966 624411d2 2023-07-08 jrick .Cm got send
1967 624411d2 2023-07-08 jrick can be run without further arguments.
1968 624411d2 2023-07-08 jrick The arguments shown here match defaults, provided the work tree's
1969 624411d2 2023-07-08 jrick current branch is the
1970 624411d2 2023-07-08 jrick .Dq master
1973 624411d2 2023-07-08 jrick .Dl $ got send -b master origin
1975 624411d2 2023-07-08 jrick If the remote repository requires the HTTPS protocol, the
1976 624411d2 2023-07-08 jrick .Xr git-push 1
1977 624411d2 2023-07-08 jrick command must be used instead:
1979 624411d2 2023-07-08 jrick .Dl $ cd /var/git/src.git
1980 624411d2 2023-07-08 jrick .Dl $ git push origin master
1982 624411d2 2023-07-08 jrick When making contributions to projects which use the
1983 624411d2 2023-07-08 jrick .Dq pull request
1984 624411d2 2023-07-08 jrick workflow, SSH protocol repository access needs to be set up first.
1985 624411d2 2023-07-08 jrick Once an account has been created on a Git hosting site it should
1986 624411d2 2023-07-08 jrick be possible to upload a public SSH key for repository access
1987 624411d2 2023-07-08 jrick authentication.
1990 624411d2 2023-07-08 jrick .Dq pull request
1991 624411d2 2023-07-08 jrick workflow will usually involve two remote repositories.
1992 624411d2 2023-07-08 jrick In the real-life example below, the
1993 624411d2 2023-07-08 jrick .Dq origin
1994 624411d2 2023-07-08 jrick repository was forked from the
1995 624411d2 2023-07-08 jrick .Dq upstream
1996 624411d2 2023-07-08 jrick repository by using the Git hosting site's web interface.
1998 624411d2 2023-07-08 jrick .Xr got.conf 5
1999 624411d2 2023-07-08 jrick file in the local repository describes both remote repositories:
2000 624411d2 2023-07-08 jrick .Bd -literal -offset indent
2001 624411d2 2023-07-08 jrick # Jelmers's repository, which accepts pull requests
2002 624411d2 2023-07-08 jrick remote "upstream" {
2003 624411d2 2023-07-08 jrick server git@github.com
2004 624411d2 2023-07-08 jrick protocol ssh
2005 624411d2 2023-07-08 jrick repository "/jelmer/dulwich"
2006 624411d2 2023-07-08 jrick branch { "master" }
2009 624411d2 2023-07-08 jrick # Stefan's fork, used as the default remote repository
2010 624411d2 2023-07-08 jrick remote "origin" {
2011 624411d2 2023-07-08 jrick server git@github.com
2012 624411d2 2023-07-08 jrick protocol ssh
2013 624411d2 2023-07-08 jrick repository "/stspdotname/dulwich"
2014 624411d2 2023-07-08 jrick branch { "master" }
2018 624411d2 2023-07-08 jrick With this configuration, Stefan can create commits on
2019 624411d2 2023-07-08 jrick .Dq refs/heads/master
2020 624411d2 2023-07-08 jrick and send them to the
2021 624411d2 2023-07-08 jrick .Dq origin
2022 624411d2 2023-07-08 jrick repository by running:
2024 624411d2 2023-07-08 jrick .Dl $ got send -b master origin
2026 624411d2 2023-07-08 jrick The changes can now be proposed to Jelmer by opening a pull request
2027 624411d2 2023-07-08 jrick via the Git hosting site's web interface.
2028 624411d2 2023-07-08 jrick If Jelmer requests further changes to be made, additional commits
2029 624411d2 2023-07-08 jrick can be created on the
2030 624411d2 2023-07-08 jrick .Dq master
2031 624411d2 2023-07-08 jrick branch and be added to the pull request by running
2032 624411d2 2023-07-08 jrick .Cd got send
2035 624411d2 2023-07-08 jrick If Jelmer prefers additional commits to be
2036 624411d2 2023-07-08 jrick .Dq squashed
2037 624411d2 2023-07-08 jrick then the following commands can be used to achieve this:
2039 624411d2 2023-07-08 jrick .Dl $ got update -b master
2040 624411d2 2023-07-08 jrick .Dl $ got update -c origin/master
2041 624411d2 2023-07-08 jrick .Dl $ got histedit -f
2042 624411d2 2023-07-08 jrick .Dl $ got send -f -b master origin
2044 624411d2 2023-07-08 jrick In addition to reviewing the pull request in the web user interface,
2045 624411d2 2023-07-08 jrick Jelmer can fetch the pull request's branch into his local repository
2046 624411d2 2023-07-08 jrick and create a local branch which contains the proposed changes:
2048 624411d2 2023-07-08 jrick .Dl $ got fetch -R refs/pull/1046/head origin
2049 624411d2 2023-07-08 jrick .Dl $ got branch -c refs/remotes/origin/pull/1046/head pr1046
2051 624411d2 2023-07-08 jrick Once Jelmer has accepted the pull request, Stefan can fetch the
2052 624411d2 2023-07-08 jrick merged changes, and possibly several other new changes, by running:
2054 624411d2 2023-07-08 jrick .Dl $ got fetch upstream
2056 624411d2 2023-07-08 jrick The merged changes will now be visible under the reference
2057 624411d2 2023-07-08 jrick .Dq refs/remotes/upstream/master .
2058 624411d2 2023-07-08 jrick The local
2059 624411d2 2023-07-08 jrick .Dq master
2060 624411d2 2023-07-08 jrick branch can now be rebased on top of the latest changes
2061 624411d2 2023-07-08 jrick from upstream:
2063 624411d2 2023-07-08 jrick .Dl $ got update -b upstream/master
2064 624411d2 2023-07-08 jrick .Dl $ got rebase master
2066 624411d2 2023-07-08 jrick As an alternative to
2067 624411d2 2023-07-08 jrick .Cm got rebase ,
2068 624411d2 2023-07-08 jrick branches can be merged with
2069 624411d2 2023-07-08 jrick .Cm got merge :
2071 624411d2 2023-07-08 jrick .Dl $ got update -b master
2072 624411d2 2023-07-08 jrick .Dl $ got merge upstream/master
2074 624411d2 2023-07-08 jrick The question of whether to rebase or merge branches is philosophical.
2075 624411d2 2023-07-08 jrick When in doubt, refer to the software project's policies set by project
2076 624411d2 2023-07-08 jrick maintainers.
2078 624411d2 2023-07-08 jrick As a final step, the forked repository's copy of the master branch needs
2079 624411d2 2023-07-08 jrick to be kept in sync by sending the new changes there:
2081 624411d2 2023-07-08 jrick .Dl $ got send -f -b master origin
2083 624411d2 2023-07-08 jrick If multiple pull requests need to be managed in parallel, a separate branch
2084 624411d2 2023-07-08 jrick must be created for each pull request with
2085 624411d2 2023-07-08 jrick .Cm got branch .
2086 624411d2 2023-07-08 jrick Each such branch can then be used as above, in place of
2087 624411d2 2023-07-08 jrick .Dq refs/heads/master .
2088 624411d2 2023-07-08 jrick Changes for any accepted pull requests will still appear under
2089 624411d2 2023-07-08 jrick .Dq refs/remotes/upstream/master,
2090 624411d2 2023-07-08 jrick regardless of which branch was used in the forked repository to
2091 624411d2 2023-07-08 jrick create a pull request.
2092 624411d2 2023-07-08 jrick .Sh SEE ALSO
2093 624411d2 2023-07-08 jrick .Xr gotadmin 1 ,
2094 624411d2 2023-07-08 jrick .Xr tog 1 ,
2095 624411d2 2023-07-08 jrick .Xr git-repository 5 ,
2096 624411d2 2023-07-08 jrick .Xr got-worktree 5 ,
2097 624411d2 2023-07-08 jrick .Xr got.conf 5 ,
2098 624411d2 2023-07-08 jrick .Xr gotwebd 8
2099 624411d2 2023-07-08 jrick .Sh AUTHORS
2100 624411d2 2023-07-08 jrick .An Anthony J. Bentley Aq Mt bentley@openbsd.org
2101 624411d2 2023-07-08 jrick .An Christian Weisgerber Aq Mt naddy@openbsd.org
2102 624411d2 2023-07-08 jrick .An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org
2103 624411d2 2023-07-08 jrick .An Josh Rickmar Aq Mt jrick@zettaport.com
2104 624411d2 2023-07-08 jrick .An Joshua Stein Aq Mt jcs@openbsd.org
2105 624411d2 2023-07-08 jrick .An Klemens Nanni Aq Mt kn@openbsd.org
2106 624411d2 2023-07-08 jrick .An Martin Pieuchot Aq Mt mpi@openbsd.org
2107 624411d2 2023-07-08 jrick .An Neels Hofmeyr Aq Mt neels@hofmeyr.de
2108 624411d2 2023-07-08 jrick .An Omar Polo Aq Mt op@openbsd.org
2109 624411d2 2023-07-08 jrick .An Ori Bernstein Aq Mt ori@openbsd.org
2110 624411d2 2023-07-08 jrick .An Sebastien Marie Aq Mt semarie@openbsd.org
2111 624411d2 2023-07-08 jrick .An Stefan Sperling Aq Mt stsp@openbsd.org
2112 624411d2 2023-07-08 jrick .An Steven McDonald Aq Mt steven@steven-mcdonald.id.au
2113 624411d2 2023-07-08 jrick .An Theo Buehler Aq Mt tb@openbsd.org
2114 624411d2 2023-07-08 jrick .An Thomas Adam Aq Mt thomas@xteddy.org
2115 624411d2 2023-07-08 jrick .An Tracey Emery Aq Mt tracey@traceyemery.net
2116 624411d2 2023-07-08 jrick .An Yang Zhong Aq Mt yzhong@freebsdfoundation.org
2120 624411d2 2023-07-08 jrick .Xr tog 1 ,
2122 624411d2 2023-07-08 jrick .Xr gotwebd 8
2123 624411d2 2023-07-08 jrick were derived from code under copyright by:
2125 624411d2 2023-07-08 jrick .An Caldera International
2126 624411d2 2023-07-08 jrick .An Daniel Hartmeier
2127 624411d2 2023-07-08 jrick .An Esben Norby
2128 624411d2 2023-07-08 jrick .An Henning Brauer
2129 624411d2 2023-07-08 jrick .An HÃ¥kan Olsson
2130 624411d2 2023-07-08 jrick .An Ingo Schwarze
2131 624411d2 2023-07-08 jrick .An Jean-Francois Brousseau
2132 624411d2 2023-07-08 jrick .An Joris Vink
2133 624411d2 2023-07-08 jrick .An Jyri J. Virkki
2134 624411d2 2023-07-08 jrick .An Larry Wall
2135 624411d2 2023-07-08 jrick .An Markus Friedl
2136 624411d2 2023-07-08 jrick .An Niall O'Higgins
2137 624411d2 2023-07-08 jrick .An Niklas Hallqvist
2138 624411d2 2023-07-08 jrick .An Ray Lai
2139 624411d2 2023-07-08 jrick .An Ryan McBride
2140 624411d2 2023-07-08 jrick .An Theo de Raadt
2141 624411d2 2023-07-08 jrick .An Todd C. Miller
2142 624411d2 2023-07-08 jrick .An Xavier Santolaria
2145 624411d2 2023-07-08 jrick contains code contributed to the public domain by
2146 624411d2 2023-07-08 jrick .An Austin Appleby .
2147 624411d2 2023-07-08 jrick .Sh CAVEATS
2149 624411d2 2023-07-08 jrick is a work-in-progress and some features remain to be implemented.
2151 624411d2 2023-07-08 jrick At present, the user has to fall back on
2152 624411d2 2023-07-08 jrick .Xr git 1
2153 624411d2 2023-07-08 jrick to perform some tasks.
2154 624411d2 2023-07-08 jrick In particular:
2155 624411d2 2023-07-08 jrick .Bl -bullet
2157 624411d2 2023-07-08 jrick Reading from remote repositories over HTTP or HTTPS protocols requires
2158 624411d2 2023-07-08 jrick .Xr git-clone 1
2160 624411d2 2023-07-08 jrick .Xr git-fetch 1 .
2162 624411d2 2023-07-08 jrick Writing to remote repositories over HTTP or HTTPS protocols requires
2163 624411d2 2023-07-08 jrick .Xr git-push 1 .
2165 624411d2 2023-07-08 jrick The creation of merge commits with more than two parent commits requires
2166 624411d2 2023-07-08 jrick .Xr git-merge 1 .
2168 624411d2 2023-07-08 jrick In situations where files or directories were moved around
2170 624411d2 2023-07-08 jrick will not automatically merge changes to new locations and
2171 624411d2 2023-07-08 jrick .Xr git 1
2172 624411d2 2023-07-08 jrick will usually produce better results.