Blame


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