Blob


1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8"/>
5 <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
6 <link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
7 <title>GOT(1)</title>
8 </head>
9 <!-- This is an automatically generated file. Do not edit.
10 Copyright (c) 2017 Martin Pieuchot
11 Copyright (c) 2018, 2019, 2020 Stefan Sperling
13 Permission to use, copy, modify, and distribute this software for any
14 purpose with or without fee is hereby granted, provided that the above
15 copyright notice and this permission notice appear in all copies.
17 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
18 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
19 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
20 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
21 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
22 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
23 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
24 -->
25 <body>
26 <div class="head" role="doc-pageheader" aria-label="Manual header
27 line"><span class="head-ltitle">GOT(1)</span> <span class="head-vol">General
28 Commands Manual</span> <span class="head-rtitle">GOT(1)</span></div>
29 <main class="manual-text">
30 <section class="Sh">
31 <h2 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h2>
32 <p class="Pp"><code class="Nm">got</code> &#x2014;
33 <span class="Nd" role="doc-subtitle">Game of Trees</span></p>
34 </section>
35 <section class="Sh">
36 <h2 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h2>
37 <table class="Nm">
38 <tr>
39 <td><code class="Nm">got</code></td>
40 <td>[<code class="Fl">-hV</code>] <var class="Ar">command</var>
41 [<var class="Ar">arg ...</var>]</td>
42 </tr>
43 </table>
44 </section>
45 <section class="Sh">
46 <h2 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h2>
47 <p class="Pp"><code class="Nm">got</code> is a version control system which
48 stores the history of tracked files in a Git repository, as used by the Git
49 version control system. This repository format is described in
50 <a class="Xr" aria-label="git-repository, section
51 5">git-repository(5)</a>.</p>
52 <p class="Pp"><code class="Nm">got</code> is a &#x201C;distributed&#x201D;
53 version control system because every copy of a repository is writeable.
54 Modifications made to files can be synchronized between repositories at any
55 time.</p>
56 <p class="Pp" id="work">Files managed by <code class="Nm">got</code> must be
57 checked out from the repository for modification. Checked out files are
58 stored in a <a class="permalink" href="#work"><i class="Em">work
59 tree</i></a> which can be placed at an arbitrary directory in the filesystem
60 hierarchy. The on-disk format of this work tree is described in
61 <a class="Xr" aria-label="got-worktree, section 5">got-worktree(5)</a>.</p>
62 <p class="Pp"><code class="Nm">got</code> provides global and command-specific
63 options. Global options must precede the command name, and are as
64 follows:</p>
65 <dl class="Bl-tag">
66 <dt id="h"><a class="permalink" href="#h"><code class="Fl">-h</code></a></dt>
67 <dd>Display usage information and exit immediately.</dd>
68 <dt id="V"><a class="permalink" href="#V"><code class="Fl">-V</code></a>,
69 <code class="Fl">--version</code></dt>
70 <dd>Display program version and exit immediately.</dd>
71 </dl>
72 <p class="Pp">The commands for <code class="Nm">got</code> are as follows:</p>
73 <dl class="Bl-tag">
74 <dt id="im"><a class="permalink" href="#import"><code class="Cm" id="import">import</code></a>
75 [<code class="Fl">-b</code> <var class="Ar">branch</var>]
76 [<code class="Fl">-I</code> <var class="Ar">pattern</var>]
77 [<code class="Fl">-m</code> <var class="Ar">message</var>]
78 [<code class="Fl">-r</code> <var class="Ar">repository-path</var>]
79 <var class="Ar">directory</var></dt>
80 <dd>
81 <div class="Bd Bd-indent"><code class="Li">(alias:
82 <code class="Cm">im</code>)</code></div>
83 Create an initial commit in a repository from the file hierarchy within the
84 specified <var class="Ar">directory</var>. The created commit will not
85 have any parent commits, i.e. it will be a root commit. Also create a new
86 reference which provides a branch name for the newly created commit. Show
87 the path of each imported file to indicate progress.
88 <p class="Pp">The <code class="Cm">got import</code> command requires the
89 <code class="Ev">GOT_AUTHOR</code> environment variable to be set,
90 unless an author has been configured in
91 <a class="Xr" aria-label="got.conf, section 5">got.conf(5)</a> or Git's
92 <code class="Dv">user.name</code> and <code class="Dv">user.email</code>
93 configuration settings can be obtained from the repository's
94 <span class="Pa">.git/config</span> file or from Git's global
95 <span class="Pa">~/.gitconfig</span> configuration file.</p>
96 <p class="Pp">The options for <code class="Cm">got import</code> are as
97 follows:</p>
98 <dl class="Bl-tag">
99 <dt id="b"><a class="permalink" href="#b"><code class="Fl">-b</code></a>
100 <var class="Ar">branch</var></dt>
101 <dd>Create the specified <var class="Ar">branch</var>. If this option is
102 not specified, a branch corresponding to the repository's HEAD
103 reference will be used. Use of this option is required if the branch
104 resolved via the repository's HEAD reference already exists.</dd>
105 <dt id="I"><a class="permalink" href="#I"><code class="Fl">-I</code></a>
106 <var class="Ar">pattern</var></dt>
107 <dd>Ignore files or directories with a name which matches the specified
108 <var class="Ar">pattern</var>. This option may be specified multiple
109 times to build a list of ignore patterns. The
110 <var class="Ar">pattern</var> follows the globbing rules documented in
111 <a class="Xr" aria-label="glob, section 7">glob(7)</a>. Ignore
112 patterns which end with a slash, &#x201C;/&#x201D;, will only match
113 directories.</dd>
114 <dt id="m"><a class="permalink" href="#m"><code class="Fl">-m</code></a>
115 <var class="Ar">message</var></dt>
116 <dd>Use the specified log message when creating the new commit. Without
117 the <code class="Fl">-m</code> option, <code class="Cm">got
118 import</code> opens a temporary file in an editor where a log message
119 can be written. Quitting the editor without saving the file will abort
120 the import operation.</dd>
121 <dt id="r"><a class="permalink" href="#r"><code class="Fl">-r</code></a>
122 <var class="Ar">repository-path</var></dt>
123 <dd>Use the repository at the specified path. If not specified, assume the
124 repository is located at or above the current working directory.</dd>
125 </dl>
126 </dd>
127 <dt id="cl"><a class="permalink" href="#clone"><code class="Cm" id="clone">clone</code></a>
128 [<code class="Fl">-almqv</code>] [<code class="Fl">-b</code>
129 <var class="Ar">branch</var>] [<code class="Fl">-R</code>
130 <var class="Ar">reference</var>] <var class="Ar">repository-URL</var>
131 [<var class="Ar">directory</var>]</dt>
132 <dd>
133 <div class="Bd Bd-indent"><code class="Li">(alias:
134 <code class="Cm">cl</code>)</code></div>
135 Clone a Git repository at the specified <var class="Ar">repository-URL</var>
136 into the specified <var class="Ar">directory</var>. If no
137 <var class="Ar">directory</var> is specified, the directory name will be
138 derived from the name of the cloned repository. <code class="Cm">got
139 clone</code> will refuse to run if the <var class="Ar">directory</var>
140 already exists.
141 <p class="Pp">The <var class="Ar">repository-URL</var> specifies a protocol
142 scheme, a server hostname, an optional port number separated from the
143 hostname by a colon, and a path to the repository on the server:
144 <a class="Lk" href="scheme://hostname:port/path/to/repository">scheme://hostname:port/path/to/repository</a></p>
145 <p class="Pp">The following protocol schemes are supported:</p>
146 <dl class="Bl-tag">
147 <dt>git</dt>
148 <dd>The Git protocol as implemented by the
149 <a class="Xr" aria-label="git-daemon, section 1">git-daemon(1)</a>
150 server. Use of this protocol is discouraged since it supports neither
151 authentication nor encryption.</dd>
152 <dt>ssh</dt>
153 <dd>The Git protocol wrapped in an authenticated and encrypted
154 <a class="Xr" aria-label="ssh, section 1">ssh(1)</a> tunnel. With this
155 protocol the hostname may contain an embedded username for
156 <a class="Xr" aria-label="ssh, section 1">ssh(1)</a> to use:
157 <a class="Mt" href="mailto:user@hostname">user@hostname</a></dd>
158 <dt>http</dt>
159 <dd>The &#x201C;smart&#x201D; Git HTTP protocol. Not compatible with
160 servers using the &#x201C;dumb&#x201D; Git HTTP protocol.
161 <p class="Pp">The &#x201C;smart&#x201D; Git HTTP protocol is supported
162 by <code class="Cm">got clone</code> and <code class="Cm">got
163 fetch</code>, but not by <code class="Cm">got send</code>. Sending
164 from a repository cloned over HTTP will require use of the
165 <code class="Ic">send</code> directive in
166 <a class="Xr" aria-label="got.conf, section 5">got.conf(5)</a> to
167 ensure that the &#x201C;ssh://&#x201D; protocol will be used by
168 <code class="Cm">got send</code>.</p>
169 <p class="Pp">Use of this protocol is discouraged since it supports
170 neither authentication nor encryption.</p>
171 </dd>
172 <dt>https</dt>
173 <dd>The &#x201C;smart&#x201D; Git HTTP protocol wrapped in SSL/TLS.</dd>
174 </dl>
175 <p class="Pp">Objects in the cloned repository are stored in a pack file
176 which is downloaded from the server. This pack file will then be indexed
177 to facilitate access to the objects stored within. If any objects in the
178 pack file are stored in deltified form, all deltas will be fully
179 resolved in order to compute the ID of such objects. This can take some
180 time. More details about the pack file format are documented in
181 <a class="Xr" aria-label="git-repository, section
182 5">git-repository(5)</a>.</p>
183 <p class="Pp"><code class="Cm">got clone</code> creates a remote repository
184 entry in the <a class="Xr" aria-label="got.conf, section
185 5">got.conf(5)</a> and <span class="Pa">config</span> files of the
186 cloned repository to store the <var class="Ar">repository-url</var> and
187 any <var class="Ar">branch</var> or <var class="Ar">reference</var>
188 arguments for future use by <code class="Cm">got fetch</code> or
189 <a class="Xr" aria-label="git-fetch, section 1">git-fetch(1)</a>.</p>
190 <p class="Pp">The options for <code class="Cm">got clone</code> are as
191 follows:</p>
192 <dl class="Bl-tag">
193 <dt id="a"><a class="permalink" href="#a"><code class="Fl">-a</code></a></dt>
194 <dd>Fetch all branches from the remote repository's
195 &#x201C;refs/heads/&#x201D; reference namespace and set
196 <code class="Cm">fetch_all_branches</code> in the cloned repository's
197 <a class="Xr" aria-label="got.conf, section 5">got.conf(5)</a> file
198 for future use by <code class="Cm">got fetch</code>. If this option is
199 not specified, a branch resolved via the remote repository's HEAD
200 reference will be fetched. Cannot be used together with the
201 <code class="Fl">-b</code> option.</dd>
202 <dt id="b~2"><a class="permalink" href="#b~2"><code class="Fl">-b</code></a>
203 <var class="Ar">branch</var></dt>
204 <dd>Fetch the specified <var class="Ar">branch</var> from the remote
205 repository's &#x201C;refs/heads/&#x201D; reference namespace. This
206 option may be specified multiple times to build a list of branches to
207 fetch. If the branch corresponding to the remote repository's HEAD
208 reference is not in this list, the cloned repository's HEAD reference
209 will be set to the first branch which was fetched. If this option is
210 not specified, a branch resolved via the remote repository's HEAD
211 reference will be fetched. Cannot be used together with the
212 <code class="Fl">-a</code> option.</dd>
213 <dt id="l"><a class="permalink" href="#l"><code class="Fl">-l</code></a></dt>
214 <dd>List branches and tags available for fetching from the remote
215 repository and exit immediately. Cannot be used together with any of
216 the other options except <code class="Fl">-q</code> and
217 <code class="Fl">-v</code>.</dd>
218 <dt id="m~2"><a class="permalink" href="#m~2"><code class="Fl">-m</code></a></dt>
219 <dd>Create the cloned repository as a mirror of the original repository.
220 This is useful if the cloned repository will not be used to store
221 locally created commits.
222 <p class="Pp">The repository's <a class="Xr" aria-label="got.conf,
223 section 5">got.conf(5)</a> and <span class="Pa">config</span> files
224 will be set up with the &#x201C;mirror&#x201D; option enabled, such
225 that <code class="Cm">got fetch</code> or
226 <a class="Xr" aria-label="git-fetch, section 1">git-fetch(1)</a>
227 will write incoming changes directly to branches in the
228 &#x201C;refs/heads/&#x201D; reference namespace, rather than to
229 branches in the &#x201C;refs/remotes/&#x201D; namespace. This avoids
230 the usual requirement of having to run <code class="Cm">got
231 rebase</code> or <code class="Cm">got merge</code> after
232 <code class="Cm">got fetch</code> in order to make incoming changes
233 appear on branches in the &#x201C;refs/heads/&#x201D; namespace. But
234 maintaining custom changes in the cloned repository becomes
235 difficult since such changes will be at risk of being discarded
236 whenever incoming changes are fetched.</p>
237 </dd>
238 <dt id="q"><a class="permalink" href="#q"><code class="Fl">-q</code></a></dt>
239 <dd>Suppress progress reporting output. The same option will be passed to
240 <a class="Xr" aria-label="ssh, section 1">ssh(1)</a> if
241 applicable.</dd>
242 <dt id="R"><a class="permalink" href="#R"><code class="Fl">-R</code></a>
243 <var class="Ar">reference</var></dt>
244 <dd>In addition to the branches and tags that will be fetched, fetch an
245 arbitrary <var class="Ar">reference</var> from the remote repository's
246 &#x201C;refs/&#x201D; namespace. This option may be specified multiple
247 times to build a list of additional references to fetch. The specified
248 <var class="Ar">reference</var> may either be a path to a specific
249 reference, or a reference namespace which will cause all references in
250 this namespace to be fetched.
251 <p class="Pp">Each reference will be mapped into the cloned repository's
252 &#x201C;refs/remotes/&#x201D; namespace, unless the
253 <code class="Fl">-m</code> option is used to mirror references
254 directly into the cloned repository's &#x201C;refs/&#x201D;
255 namespace.</p>
256 <p class="Pp"><code class="Cm">got clone</code> will refuse to fetch
257 references from the remote repository's
258 &#x201C;refs/remotes/&#x201D; or &#x201C;refs/got/&#x201D;
259 namespace.</p>
260 </dd>
261 <dt id="v"><a class="permalink" href="#v"><code class="Fl">-v</code></a></dt>
262 <dd>Verbose mode. Causes <code class="Cm">got clone</code> to print
263 debugging messages to standard error output. This option will be
264 passed to <a class="Xr" aria-label="ssh, section 1">ssh(1)</a> if
265 applicable. Multiple -v options increase the verbosity. The maximum is
266 3.</dd>
267 </dl>
268 </dd>
269 <dt id="fe"><a class="permalink" href="#fetch"><code class="Cm" id="fetch">fetch</code></a>
270 [<code class="Fl">-adlqtvX</code>] [<code class="Fl">-b</code>
271 <var class="Ar">branch</var>] [<code class="Fl">-R</code>
272 <var class="Ar">reference</var>] [<code class="Fl">-r</code>
273 <var class="Ar">repository-path</var>]
274 [<var class="Ar">remote-repository</var>]</dt>
275 <dd>
276 <div class="Bd Bd-indent"><code class="Li">(alias:
277 <code class="Cm">fe</code>)</code></div>
278 Fetch new changes from a remote repository. If no
279 <var class="Ar">remote-repository</var> is specified,
280 &#x201C;origin&#x201D; will be used. The remote repository's URL is
281 obtained from the corresponding entry in
282 <a class="Xr" aria-label="got.conf, section 5">got.conf(5)</a> or Git's
283 <span class="Pa">config</span> file of the local repository, as created by
284 <code class="Cm">got clone</code>.
285 <p class="Pp">By default, any branches configured in
286 <a class="Xr" aria-label="got.conf, section 5">got.conf(5)</a> for the
287 <var class="Ar">remote-repository</var> will be fetched. If
288 <code class="Cm">got fetch</code> is invoked in a work tree then this
289 work tree's current branch will be fetched, too, provided it is present
290 on the server. If no branches to fetch can be found in
291 <a class="Xr" aria-label="got.conf, section 5">got.conf(5)</a> or via a
292 work tree, or said branches are not found on the server, a branch
293 resolved via the remote repository's HEAD reference will be fetched.
294 Likewise, if a HEAD reference for the
295 <var class="Ar">remote-repository</var> exists but its target no longer
296 matches the remote HEAD, then the new target branch will be fetched.
297 This default behaviour can be overridden with the
298 <code class="Fl">-a</code> and <code class="Fl">-b</code> options.</p>
299 <p class="Pp">New changes will be stored in a separate pack file downloaded
300 from the server. Optionally, separate pack files stored in the
301 repository can be combined with <a class="Xr" aria-label="git-repack,
302 section 1">git-repack(1)</a>.</p>
303 <p class="Pp">By default, branch references in the
304 &#x201C;refs/remotes/&#x201D; reference namespace will be updated to
305 point at the newly fetched commits. The <code class="Cm">got
306 rebase</code> or <code class="Cm">got merge</code> command can then be
307 used to make new changes visible on branches in the
308 &#x201C;refs/heads/&#x201D; namespace, merging incoming changes with the
309 changes on those branches as necessary.</p>
310 <p class="Pp">If the repository was created as a mirror with
311 <code class="Cm">got clone -m</code>, then all branches in the
312 &#x201C;refs/heads/&#x201D; namespace will be updated directly to match
313 the corresponding branches in the remote repository. If those branches
314 contained local commits, these commits will no longer be reachable via a
315 reference and will therefore be at risk of being discarded by Git's
316 garbage collector or <code class="Cm">gotadmin cleanup</code>.
317 Maintaining custom changes in a mirror repository is therefore
318 discouraged.</p>
319 <p class="Pp">In any case, references in the &#x201C;refs/tags/&#x201D;
320 namespace will always be fetched and mapped directly to local references
321 in the same namespace.</p>
322 <p class="Pp">The options for <code class="Cm">got fetch</code> are as
323 follows:</p>
324 <dl class="Bl-tag">
325 <dt id="a~2"><a class="permalink" href="#a~2"><code class="Fl">-a</code></a></dt>
326 <dd>Fetch all branches from the remote repository's
327 &#x201C;refs/heads/&#x201D; reference namespace. This option can be
328 enabled by default for specific repositories in
329 <a class="Xr" aria-label="got.conf, section 5">got.conf(5)</a>. Cannot
330 be used together with the <code class="Fl">-b</code> option.</dd>
331 <dt id="b~3"><a class="permalink" href="#b~3"><code class="Fl">-b</code></a>
332 <var class="Ar">branch</var></dt>
333 <dd>Fetch the specified <var class="Ar">branch</var> from the remote
334 repository's &#x201C;refs/heads/&#x201D; reference namespace. This
335 option may be specified multiple times to build a list of branches to
336 fetch. Cannot be used together with the <code class="Fl">-a</code>
337 option.</dd>
338 <dt id="d"><a class="permalink" href="#d"><code class="Fl">-d</code></a></dt>
339 <dd>Delete branches and tags from the local repository which are no longer
340 present in the remote repository. Only references are deleted. Any
341 commit, tree, tag, and blob objects belonging to deleted branches or
342 tags remain in the repository and may be removed separately with Git's
343 garbage collector or <code class="Cm">gotadmin cleanup</code>.</dd>
344 <dt id="l~2"><a class="permalink" href="#l~2"><code class="Fl">-l</code></a></dt>
345 <dd>List branches and tags available for fetching from the remote
346 repository and exit immediately. Cannot be used together with any of
347 the other options except <code class="Fl">-v</code>,
348 <code class="Fl">-q</code>, and <code class="Fl">-r</code>.</dd>
349 <dt id="q~2"><a class="permalink" href="#q~2"><code class="Fl">-q</code></a></dt>
350 <dd>Suppress progress reporting output. The same option will be passed to
351 <a class="Xr" aria-label="ssh, section 1">ssh(1)</a> if
352 applicable.</dd>
353 <dt id="R~2"><a class="permalink" href="#R~2"><code class="Fl">-R</code></a>
354 <var class="Ar">reference</var></dt>
355 <dd>In addition to the branches and tags that will be fetched, fetch an
356 arbitrary <var class="Ar">reference</var> from the remote repository's
357 &#x201C;refs/&#x201D; namespace. This option may be specified multiple
358 times to build a list of additional references to fetch. The specified
359 <var class="Ar">reference</var> may either be a path to a specific
360 reference, or a reference namespace which will cause all references in
361 this namespace to be fetched.
362 <p class="Pp">Each reference will be mapped into the local repository's
363 &#x201C;refs/remotes/&#x201D; namespace, unless the local repository
364 was created as a mirror with <code class="Cm">got clone -m</code> in
365 which case references will be mapped directly into the local
366 repository's &#x201C;refs/&#x201D; namespace.</p>
367 <p class="Pp">Once a reference has been fetched, a branch based on it
368 can be created with <code class="Cm">got branch</code> if
369 needed.</p>
370 <p class="Pp"><code class="Cm">got fetch</code> will refuse to fetch
371 references from the remote repository's
372 &#x201C;refs/remotes/&#x201D; or &#x201C;refs/got/&#x201D;
373 namespace.</p>
374 </dd>
375 <dt id="r~2"><a class="permalink" href="#r~2"><code class="Fl">-r</code></a>
376 <var class="Ar">repository-path</var></dt>
377 <dd>Use the repository at the specified path. If not specified, assume the
378 repository is located at or above the current working directory. If
379 this directory is a <code class="Nm">got</code> work tree, use the
380 repository path associated with this work tree.</dd>
381 <dt id="t"><a class="permalink" href="#t"><code class="Fl">-t</code></a></dt>
382 <dd>Allow existing references in the &#x201C;refs/tags&#x201D; namespace
383 to be updated if they have changed on the server. If not specified,
384 only new tag references will be created.</dd>
385 <dt id="v~2"><a class="permalink" href="#v~2"><code class="Fl">-v</code></a></dt>
386 <dd>Verbose mode. Causes <code class="Cm">got fetch</code> to print
387 debugging messages to standard error output. The same option will be
388 passed to <a class="Xr" aria-label="ssh, section 1">ssh(1)</a> if
389 applicable. Multiple -v options increase the verbosity. The maximum is
390 3.</dd>
391 <dt id="X"><a class="permalink" href="#X"><code class="Fl">-X</code></a></dt>
392 <dd>Delete all references which correspond to a particular
393 <var class="Ar">remote-repository</var> instead of fetching new
394 changes. This can be useful when a remote repository is being removed
395 from <a class="Xr" aria-label="got.conf, section 5">got.conf(5)</a>.
396 <p class="Pp">With <code class="Fl">-X</code>, the
397 <var class="Ar">remote-repository</var> argument is mandatory and no
398 other options except <code class="Fl">-r</code>,
399 <code class="Fl">-v</code>, and <code class="Fl">-q</code> are
400 allowed.</p>
401 <p class="Pp">Only references are deleted. Any commit, tree, tag, and
402 blob objects fetched from a remote repository will generally be
403 stored in pack files and may be removed separately with
404 <a class="Xr" aria-label="git-repack, section 1">git-repack(1)</a>
405 and Git's garbage collector.</p>
406 </dd>
407 </dl>
408 </dd>
409 <dt id="co"><a class="permalink" href="#checkout"><code class="Cm" id="checkout">checkout</code></a>
410 [<code class="Fl">-Eq</code>] [<code class="Fl">-b</code>
411 <var class="Ar">branch</var>] [<code class="Fl">-c</code>
412 <var class="Ar">commit</var>] [<code class="Fl">-p</code>
413 <var class="Ar">path-prefix</var>] <var class="Ar">repository-path</var>
414 [<var class="Ar">work-tree-path</var>]</dt>
415 <dd>
416 <div class="Bd Bd-indent"><code class="Li">(alias:
417 <code class="Cm">co</code>)</code></div>
418 Copy files from a repository into a new work tree. Show the status of each
419 affected file, using the following status codes:
420 <table class="Bl-column">
421 <tr>
422 <td>A</td>
423 <td>new file was added</td>
424 </tr>
425 <tr>
426 <td>E</td>
427 <td>file already exists in work tree's meta-data</td>
428 </tr>
429 </table>
430 <p class="Pp">If the <var class="Ar">work tree path</var> is not specified,
431 either use the last component of <var class="Ar">repository path</var>,
432 or if a <var class="Ar">path prefix</var> was specified use the last
433 component of <var class="Ar">path prefix</var>.</p>
434 <p class="Pp">The options for <code class="Cm">got checkout</code> are as
435 follows:</p>
436 <dl class="Bl-tag">
437 <dt id="b~4"><a class="permalink" href="#b~4"><code class="Fl">-b</code></a>
438 <var class="Ar">branch</var></dt>
439 <dd>Check out files from a commit on the specified
440 <var class="Ar">branch</var>. If this option is not specified, a
441 branch resolved via the repository's HEAD reference will be used.</dd>
442 <dt id="c"><a class="permalink" href="#c"><code class="Fl">-c</code></a>
443 <var class="Ar">commit</var></dt>
444 <dd>Check out files from the specified <var class="Ar">commit</var> on the
445 selected branch. If this option is not specified, the most recent
446 commit on the selected branch will be used.
447 <p class="Pp">The expected <var class="Ar">commit</var> argument is a
448 commit ID SHA1 hash, or a reference name or a keyword which will be
449 resolved to a commit ID. An abbreviated hash argument will be
450 expanded to a full SHA1 hash automatically, provided the
451 abbreviation is unique. The keywords &quot;:base&quot; and
452 &quot;:head&quot; resolve to the repository's HEAD reference, or, if
453 the <code class="Fl">-b</code> option is used, the head of the
454 checked-out <var class="Ar">branch</var>. Keywords and reference
455 names may be appended with &quot;:+&quot; or &quot;:-&quot;
456 modifiers and an optional integer N to denote the Nth descendant or
457 antecedent by first parent traversal, respectively; for example,
458 <b class="Sy">:head:-2</b> denotes the work tree branch head's 2nd
459 generation ancestor, and <b class="Sy">foo:-3</b> will denote the
460 3rd generation ancestor of the commit resolved by the
461 &quot;foo&quot; reference. If an integer does not follow the
462 &quot;:+&quot; or &quot;:-&quot; modifier, a &quot;1&quot; is
463 implicitly appended (e.g., <b class="Sy">:head:-</b> is equivalent
464 to <b class="Sy">:head:-1</b>).</p>
465 <p class="Pp">If the specified <var class="Ar">commit</var> is not
466 contained in the selected branch, a different branch which contains
467 this commit must be specified with the <code class="Fl">-b</code>
468 option. If no such branch is known, a new branch must be created for
469 this commit with <code class="Cm">got branch</code> before
470 <code class="Cm">got checkout</code> can be used. Checking out work
471 trees with an unknown branch is intentionally not supported.</p>
472 </dd>
473 <dt id="E"><a class="permalink" href="#E"><code class="Fl">-E</code></a></dt>
474 <dd>Proceed with the checkout operation even if the directory at
475 <var class="Ar">work-tree-path</var> is not empty. Existing files will
476 be left intact.</dd>
477 <dt id="p"><a class="permalink" href="#p"><code class="Fl">-p</code></a>
478 <var class="Ar">path-prefix</var></dt>
479 <dd>Restrict the work tree to a subset of the repository's tree hierarchy.
480 Only files beneath the specified <var class="Ar">path-prefix</var>
481 will be checked out.</dd>
482 <dt id="q~3"><a class="permalink" href="#q~3"><code class="Fl">-q</code></a></dt>
483 <dd>Silence progress output.</dd>
484 </dl>
485 </dd>
486 <dt id="up"><a class="permalink" href="#update"><code class="Cm" id="update">update</code></a>
487 [<code class="Fl">-q</code>] [<code class="Fl">-b</code>
488 <var class="Ar">branch</var>] [<code class="Fl">-c</code>
489 <var class="Ar">commit</var>] [<var class="Ar">path ...</var>]</dt>
490 <dd>
491 <div class="Bd Bd-indent"><code class="Li">(alias:
492 <code class="Cm">up</code>)</code></div>
493 Update an existing work tree to a different <var class="Ar">commit</var>.
494 Change existing files in the work tree as necessary to match file contents
495 of this commit. Preserve any local changes in the work tree and merge them
496 with the incoming changes.
497 <p class="Pp">Files which already contain merge conflicts will not be
498 updated to avoid further complications. Such files will be updated when
499 <code class="Cm">got update</code> is run again after merge conflicts
500 have been resolved. If the conflicting changes are no longer needed,
501 affected files can be reverted with <code class="Cm">got revert</code>
502 before running <code class="Cm">got update</code> again.</p>
503 <p class="Pp">Show the status of each affected file, using the following
504 status codes:</p>
505 <table class="Bl-column">
506 <tr>
507 <td>U</td>
508 <td>file was updated and contained no local changes</td>
509 </tr>
510 <tr>
511 <td>G</td>
512 <td>file was updated and local changes were merged cleanly</td>
513 </tr>
514 <tr>
515 <td>C</td>
516 <td>file was updated and conflicts occurred during merge</td>
517 </tr>
518 <tr>
519 <td>D</td>
520 <td>file was deleted</td>
521 </tr>
522 <tr>
523 <td>d</td>
524 <td>file's deletion was prevented by local modifications</td>
525 </tr>
526 <tr>
527 <td>A</td>
528 <td>new file was added</td>
529 </tr>
530 <tr>
531 <td>~</td>
532 <td>versioned file is obstructed by a non-regular file</td>
533 </tr>
534 <tr>
535 <td>!</td>
536 <td>a missing versioned file was restored</td>
537 </tr>
538 <tr>
539 <td>#</td>
540 <td>file was not updated because it contains merge conflicts</td>
541 </tr>
542 <tr>
543 <td>?</td>
544 <td>changes destined for an unversioned file were not merged</td>
545 </tr>
546 </table>
547 <p class="Pp">If no <var class="Ar">path</var> is specified, update the
548 entire work tree. Otherwise, restrict the update operation to files at
549 or within the specified paths. Each path is required to exist in the
550 update operation's target commit. Files in the work tree outside
551 specified paths will remain unchanged and will retain their previously
552 recorded base commit. Some <code class="Nm">got</code> commands may
553 refuse to run while the work tree contains files from multiple base
554 commits. The base commit of such a work tree can be made consistent by
555 running <code class="Cm">got update</code> across the entire work tree.
556 Specifying a <var class="Ar">path</var> is incompatible with the
557 <code class="Fl">-b</code> option.</p>
558 <p class="Pp"><code class="Cm">got update</code> cannot update paths with
559 staged changes. If changes have been staged with <code class="Cm">got
560 stage</code>, these changes must first be committed with
561 <code class="Cm">got commit</code> or unstaged with <code class="Cm">got
562 unstage</code>.</p>
563 <p class="Pp">The options for <code class="Cm">got update</code> are as
564 follows:</p>
565 <dl class="Bl-tag">
566 <dt id="b~5"><a class="permalink" href="#b~5"><code class="Fl">-b</code></a>
567 <var class="Ar">branch</var></dt>
568 <dd>Switch the work tree's branch reference to the specified
569 <var class="Ar">branch</var> before updating the work tree. This
570 option requires that all paths in the work tree are updated.
571 <p class="Pp">As usual, any local changes in the work tree will be
572 preserved. This can be useful when switching to a newly created
573 branch in order to commit existing local changes to this branch.</p>
574 <p class="Pp">Any local changes must be dealt with separately in order
575 to obtain a work tree with pristine file contents corresponding
576 exactly to the specified <var class="Ar">branch</var>. Such changes
577 could first be committed to a different branch with
578 <code class="Cm">got commit</code>, or could be discarded with
579 <code class="Cm">got revert</code>.</p>
580 </dd>
581 <dt id="c~2"><a class="permalink" href="#c~2"><code class="Fl">-c</code></a>
582 <var class="Ar">commit</var></dt>
583 <dd>Update the work tree to the specified <var class="Ar">commit</var>. If
584 this option is not specified, the most recent commit on the work
585 tree's branch will be used.
586 <p class="Pp">The expected <var class="Ar">commit</var> argument is a
587 commit ID SHA1 hash, or a reference name or a keyword which will be
588 resolved to a commit ID. An abbreviated hash argument will be
589 expanded to a full SHA1 hash automatically, provided the
590 abbreviation is unique. The keywords &quot;:base&quot; and
591 &quot;:head&quot; resolve to the work tree's base commit and branch
592 head, respectively. Keywords and reference names may be appended
593 with &quot;:+&quot; or &quot;:-&quot; modifiers and an optional
594 integer N to denote the Nth descendant or antecedent, respectively,
595 by first parent traversal; for example, <b class="Sy">:head:-2</b>
596 denotes the work tree branch head's 2nd generation ancestor, and
597 <b class="Sy">:base:+4</b> denotes the 4th generation descendant of
598 the work tree's base commit. Similarly, <b class="Sy">foo:-3</b>
599 will denote the 3rd generation ancestor of the commit resolved by
600 the &quot;foo&quot; reference. If an integer does not follow the
601 &quot;:+&quot; or &quot;:-&quot; modifier, a &quot;1&quot; is
602 implicitly appended (e.g., <b class="Sy">:head:-</b> is equivalent
603 to <b class="Sy">:head:-1</b>).</p>
604 </dd>
605 <dt id="q~4"><a class="permalink" href="#q~4"><code class="Fl">-q</code></a></dt>
606 <dd>Silence progress output.</dd>
607 </dl>
608 </dd>
609 <dt id="st"><a class="permalink" href="#status"><code class="Cm" id="status">status</code></a>
610 [<code class="Fl">-I</code>] [<code class="Fl">-S</code>
611 <var class="Ar">status-codes</var>] [<code class="Fl">-s</code>
612 <var class="Ar">status-codes</var>] [<var class="Ar">path ...</var>]</dt>
613 <dd>
614 <div class="Bd Bd-indent"><code class="Li">(alias:
615 <code class="Cm">st</code>)</code></div>
616 Show the current modification status of files in a work tree, using the
617 following status codes:
618 <table class="Bl-column">
619 <tr>
620 <td>M</td>
621 <td>modified file</td>
622 </tr>
623 <tr>
624 <td>A</td>
625 <td>file scheduled for addition in next commit</td>
626 </tr>
627 <tr>
628 <td>D</td>
629 <td>file scheduled for deletion in next commit</td>
630 </tr>
631 <tr>
632 <td>C</td>
633 <td>modified or added file which contains merge conflicts</td>
634 </tr>
635 <tr>
636 <td>!</td>
637 <td>versioned file was expected on disk but is missing</td>
638 </tr>
639 <tr>
640 <td>~</td>
641 <td>versioned file is obstructed by a non-regular file</td>
642 </tr>
643 <tr>
644 <td>?</td>
645 <td>unversioned item not tracked by <code class="Nm">got</code></td>
646 </tr>
647 <tr>
648 <td>m</td>
649 <td>modified file modes (executable bit only)</td>
650 </tr>
651 <tr>
652 <td>N</td>
653 <td>non-existent <var class="Ar">path</var> specified on the command
654 line</td>
655 </tr>
656 </table>
657 <p class="Pp">If no <var class="Ar">path</var> is specified, show
658 modifications in the entire work tree. Otherwise, show modifications at
659 or within the specified paths.</p>
660 <p class="Pp">If changes have been staged with <code class="Cm">got
661 stage</code>, staged changes are shown in the second output column,
662 using the following status codes:</p>
663 <table class="Bl-column">
664 <tr>
665 <td>M</td>
666 <td>file modification is staged</td>
667 </tr>
668 <tr>
669 <td>A</td>
670 <td>file addition is staged</td>
671 </tr>
672 <tr>
673 <td>D</td>
674 <td>file deletion is staged</td>
675 </tr>
676 </table>
677 <p class="Pp">Changes created on top of staged changes are indicated in the
678 first column:</p>
679 <table class="Bl-column">
680 <tr>
681 <td>MM</td>
682 <td>file was modified after earlier changes have been staged</td>
683 </tr>
684 <tr>
685 <td>MA</td>
686 <td>file was modified after having been staged for addition</td>
687 </tr>
688 </table>
689 <p class="Pp">If the work tree contains the results of an interrupted
690 <code class="Cm">got rebase</code>, <code class="Cm">got
691 histedit</code>, or <code class="Cm">got merge</code> operation then
692 display a message which shows the branches involved.</p>
693 <p class="Pp">The options for <code class="Cm">got status</code> are as
694 follows:</p>
695 <dl class="Bl-tag">
696 <dt id="I~2"><a class="permalink" href="#I~2"><code class="Fl">-I</code></a></dt>
697 <dd>Show unversioned files even if they match an ignore pattern.</dd>
698 <dt id="S"><a class="permalink" href="#S"><code class="Fl">-S</code></a>
699 <var class="Ar">status-codes</var></dt>
700 <dd>Suppress the output of files with a modification status matching any
701 of the single-character status codes contained in the
702 <var class="Ar">status-codes</var> argument. Any combination of codes
703 from the above list of possible status codes may be specified. For
704 staged files, status codes displayed in either column will be matched.
705 Cannot be used together with the <code class="Fl">-s</code>
706 option.</dd>
707 <dt id="s"><a class="permalink" href="#s"><code class="Fl">-s</code></a>
708 <var class="Ar">status-codes</var></dt>
709 <dd>Only show files with a modification status matching any of the
710 single-character status codes contained in the
711 <var class="Ar">status-codes</var> argument. Any combination of codes
712 from the above list of possible status codes may be specified. For
713 staged files, status codes displayed in either column will be matched.
714 Cannot be used together with the <code class="Fl">-S</code>
715 option.</dd>
716 </dl>
717 <p class="Pp">For compatibility with <a class="Xr" aria-label="cvs, section
718 1">cvs(1)</a> and <a class="Xr" aria-label="git, section 1">git(1)</a>,
719 <code class="Cm">got status</code> reads <a class="Xr" aria-label="glob,
720 section 7">glob(7)</a> patterns from <span class="Pa">.cvsignore</span>
721 and <span class="Pa">.gitignore</span> files in each traversed directory
722 and will not display unversioned files which match these patterns.
723 Ignore patterns which end with a slash, &#x201C;/&#x201D;, will only
724 match directories. As an extension to <a class="Xr" aria-label="glob,
725 section 7">glob(7)</a> matching rules, <code class="Cm">got
726 status</code> supports consecutive asterisks, &#x201C;**&#x201D;, which
727 will match an arbitrary amount of directories. Unlike
728 <a class="Xr" aria-label="cvs, section 1">cvs(1)</a>,
729 <code class="Cm">got status</code> only supports a single ignore pattern
730 per line. Unlike <a class="Xr" aria-label="git, section 1">git(1)</a>,
731 <code class="Cm">got status</code> does not support negated ignore
732 patterns prefixed with &#x201C;!&#x201D;, and gives no special
733 significance to the location of path component separators,
734 &#x201C;/&#x201D;, in a pattern.</p>
735 </dd>
736 <dt id="log"><a class="permalink" href="#log"><code class="Cm">log</code></a>
737 [<code class="Fl">-bdPpRst</code>] [<code class="Fl">-C</code>
738 <var class="Ar">number</var>] [<code class="Fl">-c</code>
739 <var class="Ar">commit</var>] [<code class="Fl">-l</code>
740 <var class="Ar">N</var>] [<code class="Fl">-r</code>
741 <var class="Ar">repository-path</var>] [<code class="Fl">-S</code>
742 <var class="Ar">search-pattern</var>] [<code class="Fl">-x</code>
743 <var class="Ar">commit</var>] [<var class="Ar">path</var>]</dt>
744 <dd>Display history of a repository. If a <var class="Ar">path</var> is
745 specified, show only commits which modified this path. If invoked in a
746 work tree, the <var class="Ar">path</var> is interpreted relative to the
747 current working directory, and the work tree's path prefix is implicitly
748 prepended. Otherwise, the path is interpreted relative to the repository
749 root.
750 <p class="Pp">The options for <code class="Cm">got log</code> are as
751 follows:</p>
752 <dl class="Bl-tag">
753 <dt id="b~6"><a class="permalink" href="#b~6"><code class="Fl">-b</code></a></dt>
754 <dd>Display individual commits which were merged into the current branch
755 from other branches. By default, <code class="Cm">got log</code> shows
756 the linear history of the current branch only.</dd>
757 <dt id="C"><a class="permalink" href="#C"><code class="Fl">-C</code></a>
758 <var class="Ar">number</var></dt>
759 <dd>Set the number of context lines shown in diffs with
760 <code class="Fl">-p</code>. By default, 3 lines of context are
761 shown.</dd>
762 <dt id="c~3"><a class="permalink" href="#c~3"><code class="Fl">-c</code></a>
763 <var class="Ar">commit</var></dt>
764 <dd>Start traversing history at the specified
765 <var class="Ar">commit</var>. If this option is not specified, default
766 to the work tree's current branch if invoked in a work tree, or to the
767 repository's HEAD reference.
768 <p class="Pp" id="bar:+3">The expected <var class="Ar">commit</var>
769 argument is a commit ID SHA1 hash, or a reference name or a keyword
770 which will be resolved to a commit ID. An abbreviated hash argument
771 will be expanded to a full SHA1 hash automatically, provided the
772 abbreviation is unique. The keywords &quot;:base&quot; and
773 &quot;:head&quot; resolve to the work tree's base commit and branch
774 head, respectively. The former is only valid if invoked in a work
775 tree, while the latter will resolve to the tip of the work tree's
776 current branch if invoked in a work tree, otherwise it will resolve
777 to the repository's HEAD reference. Keywords and references may be
778 appended with &quot;:+&quot; or &quot;:-&quot; modifiers and an
779 optional integer N to denote the Nth descendant or antecedent,
780 respectively, by first parent traversal; for example,
781 <b class="Sy">:head:-2</b> denotes the HEAD reference's 2nd
782 generation ancestor, and <b class="Sy">:base:+4</b> denotes the 4th
783 generation descendant of the work tree's base commit. Similarly,
784 <a class="permalink" href="#bar:+3"><b class="Sy">bar:+3</b></a>
785 will denote the 3rd generation descendant of the commit resolved by
786 the &quot;bar&quot; reference. A &quot;:+&quot; or &quot;:-&quot;
787 modifier without a trailing integer has an implicit &quot;1&quot;
788 appended (e.g., <b class="Sy">:base:+</b> is equivalent to
789 <b class="Sy">:base:+1</b>).</p>
790 </dd>
791 <dt id="d~2"><a class="permalink" href="#d~2"><code class="Fl">-d</code></a></dt>
792 <dd>Display diffstat of changes introduced in each commit. Cannot be used
793 with the <code class="Fl">-s</code> option. Implies the
794 <code class="Fl">-P</code> option (diffstat displays a list of changed
795 paths).</dd>
796 <dt id="l~3"><a class="permalink" href="#l~3"><code class="Fl">-l</code></a>
797 <var class="Ar">N</var></dt>
798 <dd>Limit history traversal to a given number of commits. If this option
799 is not specified, a default limit value of zero is used, which is
800 treated as an unbounded limit. The
801 <code class="Ev">GOT_LOG_DEFAULT_LIMIT</code> environment variable may
802 be set to change this default value.</dd>
803 <dt id="P"><a class="permalink" href="#P"><code class="Fl">-P</code></a></dt>
804 <dd>Display the list of file paths changed in each commit, using the
805 following status codes:
806 <table class="Bl-column">
807 <tr>
808 <td>M</td>
809 <td>modified file</td>
810 </tr>
811 <tr>
812 <td>D</td>
813 <td>file was deleted</td>
814 </tr>
815 <tr>
816 <td>A</td>
817 <td>new file was added</td>
818 </tr>
819 <tr>
820 <td>m</td>
821 <td>modified file modes (executable bit only)</td>
822 </tr>
823 </table>
824 <p class="Pp">Cannot be used with the <code class="Fl">-s</code>
825 option.</p>
826 </dd>
827 <dt id="p~2"><a class="permalink" href="#p~2"><code class="Fl">-p</code></a></dt>
828 <dd>Display the patch of modifications made in each commit. If a
829 <var class="Ar">path</var> is specified, only show the patch of
830 modifications at or within this path. Cannot be used with the
831 <code class="Fl">-s</code> option.</dd>
832 <dt id="R~3"><a class="permalink" href="#R~3"><code class="Fl">-R</code></a></dt>
833 <dd>Determine a set of commits to display as usual, but display these
834 commits in reverse order.</dd>
835 <dt id="r~3"><a class="permalink" href="#r~3"><code class="Fl">-r</code></a>
836 <var class="Ar">repository-path</var></dt>
837 <dd>Use the repository at the specified path. If not specified, assume the
838 repository is located at or above the current working directory. If
839 this directory is a <code class="Nm">got</code> work tree, use the
840 repository path associated with this work tree.</dd>
841 <dt id="S~2"><a class="permalink" href="#S~2"><code class="Fl">-S</code></a>
842 <var class="Ar">search-pattern</var></dt>
843 <dd>If specified, show only commits with a log message, author name,
844 committer name, or ID SHA1 hash matched by the extended regular
845 expression <var class="Ar">search-pattern</var>. Lines in committed
846 patches will be matched if <code class="Fl">-p</code> is specified.
847 File paths changed by a commit will be matched if
848 <code class="Fl">-P</code> is specified. Regular expression syntax is
849 documented in <a class="Xr" aria-label="re_format, section
850 7">re_format(7)</a>.</dd>
851 <dt id="s~2"><a class="permalink" href="#s~2"><code class="Fl">-s</code></a></dt>
852 <dd>Display a short one-line summary of each commit, instead of the
853 default history format. Cannot be used together with the
854 <code class="Fl">-p</code> or <code class="Fl">-P</code> option.</dd>
855 <dt id="t~2"><a class="permalink" href="#t~2"><code class="Fl">-t</code></a></dt>
856 <dd>Display commits in topological order. This option has no effect
857 without the <code class="Fl">-b</code> option because a linear history
858 is sorted in topological order by definition. Topological sorting is
859 disabled by default because the present implementation requires that
860 commit history is fully traversed before any output can be shown.</dd>
861 <dt id="x"><a class="permalink" href="#x"><code class="Fl">-x</code></a>
862 <var class="Ar">commit</var></dt>
863 <dd>Stop traversing commit history immediately after the specified
864 <var class="Ar">commit</var> has been traversed. Like
865 <code class="Fl">-c</code>, the expected <var class="Ar">commit</var>
866 argument is a commit ID SHA1 hash, or a reference name or a keyword
867 which will be resolved to a commit ID. This option has no effect if
868 the specified <var class="Ar">commit</var> is never traversed.</dd>
869 </dl>
870 </dd>
871 <dt id="di"><a class="permalink" href="#diff"><code class="Cm" id="diff">diff</code></a>
872 [<code class="Fl">-adPsw</code>] [<code class="Fl">-C</code>
873 <var class="Ar">number</var>] [<code class="Fl">-c</code>
874 <var class="Ar">commit</var>] [<code class="Fl">-r</code>
875 <var class="Ar">repository-path</var>] [<var class="Ar">object1</var>
876 <var class="Ar">object2</var> | <var class="Ar">path ...</var>]</dt>
877 <dd>
878 <div class="Bd Bd-indent"><code class="Li">(alias:
879 <code class="Cm">di</code>)</code></div>
880 When invoked within a work tree without any arguments, display all local
881 changes in the work tree. If one or more <var class="Ar">path</var>
882 arguments are specified, only show changes within the specified paths.
883 <p class="Pp">If two arguments are provided, treat each argument as a
884 reference, a tag name, or an object ID SHA1 hash, and display
885 differences between the corresponding objects. Both objects must be of
886 the same type (blobs, trees, or commits). An abbreviated hash argument
887 will be expanded to a full SHA1 hash automatically, provided the
888 abbreviation is unique. If none of these interpretations produce a valid
889 result or if the <code class="Fl">-P</code> option is used, and if
890 <code class="Cm">got diff</code> is running in a work tree, attempt to
891 interpret the two arguments as paths.</p>
892 <p class="Pp">The options for <code class="Cm">got diff</code> are as
893 follows:</p>
894 <dl class="Bl-tag">
895 <dt id="a~3"><a class="permalink" href="#a~3"><code class="Fl">-a</code></a></dt>
896 <dd>Treat file contents as ASCII text even if binary data is
897 detected.</dd>
898 <dt id="C~2"><a class="permalink" href="#C~2"><code class="Fl">-C</code></a>
899 <var class="Ar">number</var></dt>
900 <dd>Set the number of context lines shown in the diff. By default, 3 lines
901 of context are shown.</dd>
902 <dt id="c~4"><a class="permalink" href="#c~4"><code class="Fl">-c</code></a>
903 <var class="Ar">commit</var></dt>
904 <dd>Show differences between commits in the repository. This option may be
905 used up to two times. When used only once, show differences between
906 the specified <var class="Ar">commit</var> and its first parent
907 commit. When used twice, show differences between the two specified
908 commits.
909 <p class="Pp">If the <code class="Fl">-c</code> option is used, all
910 non-option arguments will be interpreted as paths. If one or more
911 such <var class="Ar">path</var> arguments are provided, only show
912 differences for the specified paths.</p>
913 <p class="Pp" id="baz:+8">The expected <var class="Ar">commit</var>
914 argument is a commit ID SHA1 hash, or a reference name or a keyword
915 which will be resolved to a commit ID. An abbreviated hash argument
916 will be expanded to a full SHA1 hash automatically, provided the
917 abbreviation is unique. The keywords &quot;:base&quot; and
918 &quot;:head&quot; resolve to the work tree's base commit and branch
919 head, respectively. The former is only valid if invoked in a work
920 tree, while the latter will resolve to the tip of the work tree's
921 current branch if invoked in a work tree, otherwise it will resolve
922 to the repository's HEAD reference. Keywords and references may be
923 appended with &quot;:+&quot; or &quot;:-&quot; modifiers and an
924 optional integer N to denote the Nth descendant or antecedent,
925 respectively, by first parent traversal; for example,
926 <b class="Sy">:head:-2</b> denotes the HEAD reference's 2nd
927 generation ancestor, and <b class="Sy">:base:+4</b> denotes the 4th
928 generation descendant of the work tree's base commit. Similarly,
929 <a class="permalink" href="#baz:+8"><b class="Sy">baz:+8</b></a>
930 will denote the 8th generation descendant of the commit resolved by
931 the &quot;baz&quot; reference. If an integer does not follow the
932 &quot;:+&quot; or &quot;:-&quot; modifier, a &quot;1&quot; is
933 implicitly appended (e.g., <b class="Sy">:head:-</b> is equivalent
934 to <b class="Sy">:head:-1</b>).</p>
935 <p class="Pp">Cannot be used together with the
936 <code class="Fl">-P</code> option.</p>
937 </dd>
938 <dt id="d~3"><a class="permalink" href="#d~3"><code class="Fl">-d</code></a></dt>
939 <dd>Display diffstat of changes before the actual diff by annotating each
940 file path or blob hash being diffed with the total number of lines
941 added and removed. A summary line will display the total number of
942 changes across all files.</dd>
943 <dt id="P~2"><a class="permalink" href="#P~2"><code class="Fl">-P</code></a></dt>
944 <dd>Interpret all arguments as paths only. This option can be used to
945 resolve ambiguity in cases where paths look like tag names, reference
946 names, or object IDs. This option is only valid when
947 <code class="Cm">got diff</code> is invoked in a work tree.</dd>
948 <dt id="r~4"><a class="permalink" href="#r~4"><code class="Fl">-r</code></a>
949 <var class="Ar">repository-path</var></dt>
950 <dd>Use the repository at the specified path. If not specified, assume the
951 repository is located at or above the current working directory. If
952 this directory is a <code class="Nm">got</code> work tree, use the
953 repository path associated with this work tree.</dd>
954 <dt id="s~3"><a class="permalink" href="#s~3"><code class="Fl">-s</code></a></dt>
955 <dd>Show changes staged with <code class="Cm">got stage</code> instead of
956 showing local changes in the work tree. This option is only valid when
957 <code class="Cm">got diff</code> is invoked in a work tree.</dd>
958 <dt id="w"><a class="permalink" href="#w"><code class="Fl">-w</code></a></dt>
959 <dd>Ignore whitespace-only changes.</dd>
960 </dl>
961 </dd>
962 <dt id="bl"><a class="permalink" href="#blame"><code class="Cm" id="blame">blame</code></a>
963 [<code class="Fl">-c</code> <var class="Ar">commit</var>]
964 [<code class="Fl">-r</code> <var class="Ar">repository-path</var>]
965 <var class="Ar">path</var></dt>
966 <dd>
967 <div class="Bd Bd-indent"><code class="Li">(alias:
968 <code class="Cm">bl</code>)</code></div>
969 Display line-by-line history of a file at the specified path.
970 <p class="Pp">The options for <code class="Cm">got blame</code> are as
971 follows:</p>
972 <dl class="Bl-tag">
973 <dt id="c~5"><a class="permalink" href="#c~5"><code class="Fl">-c</code></a>
974 <var class="Ar">commit</var></dt>
975 <dd>Start traversing history at the specified
976 <var class="Ar">commit</var>. The expected argument is a commit ID
977 SHA1 hash, or a reference name or a keyword which will be resolved to
978 a commit ID. An abbreviated hash argument will be expanded to a full
979 SHA1 hash automatically, provided the abbreviation is unique. The
980 keywords &quot;:base&quot; and &quot;:head&quot; resolve to the work
981 tree's base commit and branch head, respectively. The former is only
982 valid if invoked in a work tree, while the latter will resolve to the
983 tip of the work tree's current branch if invoked in a work tree,
984 otherwise it will resolve to the repository's HEAD reference. Keywords
985 and references may be appended with &quot;:+&quot; or &quot;:-&quot;
986 modifiers and an optional integer N to denote the Nth descendant or
987 antecedent by first parent traversal, respectively; for example,
988 <b class="Sy">:head:-2</b> denotes the work tree branch head's 2nd
989 generation ancestor, and <b class="Sy">:base:+4</b> denotes the 4th
990 generation descendant of the work tree's base commit. Similarly,
991 <a class="permalink" href="#xyz:-5"><b class="Sy" id="xyz:-5">xyz:-5</b></a>
992 will denote the 5th generation ancestor of the commit resolved by the
993 &quot;xyz&quot; reference. A &quot;:+&quot; or &quot;:-&quot; modifier
994 without a trailing integer has an implicit &quot;1&quot; appended
995 (e.g., <b class="Sy">:base:+</b> is equivalent to
996 <b class="Sy">:base:+1</b>).</dd>
997 <dt id="r~5"><a class="permalink" href="#r~5"><code class="Fl">-r</code></a>
998 <var class="Ar">repository-path</var></dt>
999 <dd>Use the repository at the specified path. If not specified, assume the
1000 repository is located at or above the current working directory. If
1001 this directory is a <code class="Nm">got</code> work tree, use the
1002 repository path associated with this work tree.</dd>
1003 </dl>
1004 </dd>
1005 <dt id="tr"><a class="permalink" href="#tree"><code class="Cm" id="tree">tree</code></a>
1006 [<code class="Fl">-iR</code>] [<code class="Fl">-c</code>
1007 <var class="Ar">commit</var>] [<code class="Fl">-r</code>
1008 <var class="Ar">repository-path</var>] [<var class="Ar">path</var>]</dt>
1009 <dd>
1010 <div class="Bd Bd-indent"><code class="Li">(alias:
1011 <code class="Cm">tr</code>)</code></div>
1012 Display a listing of files and directories at the specified directory path
1013 in the repository. Entries shown in this listing may carry one of the
1014 following trailing annotations:
1015 <table class="Bl-column">
1016 <tr>
1017 <td>@</td>
1018 <td>entry is a symbolic link</td>
1019 </tr>
1020 <tr>
1021 <td>/</td>
1022 <td>entry is a directory</td>
1023 </tr>
1024 <tr>
1025 <td>*</td>
1026 <td>entry is an executable file</td>
1027 </tr>
1028 <tr>
1029 <td>$</td>
1030 <td>entry is a Git submodule</td>
1031 </tr>
1032 </table>
1033 <p class="Pp">Symbolic link entries are also annotated with the target path
1034 of the link.</p>
1035 <p class="Pp">If no <var class="Ar">path</var> is specified, list the
1036 repository path corresponding to the current directory of the work tree,
1037 or the root directory of the repository if there is no work tree.</p>
1038 <p class="Pp">The options for <code class="Cm">got tree</code> are as
1039 follows:</p>
1040 <dl class="Bl-tag">
1041 <dt id="c~6"><a class="permalink" href="#c~6"><code class="Fl">-c</code></a>
1042 <var class="Ar">commit</var></dt>
1043 <dd>List files and directories as they appear in the specified
1044 <var class="Ar">commit</var>.
1045 <p class="Pp" id="spam:-3">The expected argument is a commit ID SHA1
1046 hash, or a reference name or a keyword which will be resolved to a
1047 commit ID. An abbreviated hash argument will be expanded to a full
1048 SHA1 hash automatically, provided the abbreviation is unique. The
1049 keywords &quot;:base&quot; and &quot;:head&quot; resolve to the work
1050 tree's base commit and branch head, respectively. The former is only
1051 valid if invoked in a work tree, while the latter will resolve to
1052 the tip of the work tree's current branch if invoked in a work tree,
1053 otherwise it will resolve to the repository's HEAD reference.
1054 Keywords and references may be appended with &quot;:+&quot; or
1055 &quot;:-&quot; modifiers and an optional integer N to denote the Nth
1056 descendant or antecedent by first parent traversal, respectively;
1057 for example, <b class="Sy">:head:-2</b> denotes the work tree branch
1058 head's 2nd generation ancestor, and <b class="Sy">:base:+4</b>
1059 denotes the 4th generation descendant of the work tree's base
1060 commit. Similarly,
1061 <a class="permalink" href="#spam:-3"><b class="Sy">spam:-3</b></a>
1062 will denote the 3rd generation ancestor of the commit resolved by
1063 the &quot;spam&quot; reference. A &quot;:+&quot; or &quot;:-&quot;
1064 modifier without a trailing integer has an implicit &quot;1&quot;
1065 appended (e.g., <b class="Sy">:base:+</b> is equivalent to
1066 <b class="Sy">:base:+1</b>).</p>
1067 </dd>
1068 <dt id="i"><a class="permalink" href="#i"><code class="Fl">-i</code></a></dt>
1069 <dd>Show object IDs of files (blob objects) and directories (tree
1070 objects).</dd>
1071 <dt id="R~4"><a class="permalink" href="#R~4"><code class="Fl">-R</code></a></dt>
1072 <dd>Recurse into sub-directories in the repository.</dd>
1073 <dt id="r~6"><a class="permalink" href="#r~6"><code class="Fl">-r</code></a>
1074 <var class="Ar">repository-path</var></dt>
1075 <dd>Use the repository at the specified path. If not specified, assume the
1076 repository is located at or above the current working directory. If
1077 this directory is a <code class="Nm">got</code> work tree, use the
1078 repository path associated with this work tree.</dd>
1079 </dl>
1080 </dd>
1081 <dt id="ref"><a class="permalink" href="#ref"><code class="Cm">ref</code></a>
1082 [<code class="Fl">-dlt</code>] [<code class="Fl">-c</code>
1083 <var class="Ar">object</var>] [<code class="Fl">-r</code>
1084 <var class="Ar">repository-path</var>] [<code class="Fl">-s</code>
1085 <var class="Ar">reference</var>] [<var class="Ar">name</var>]</dt>
1086 <dd>Manage references in a repository.
1087 <p class="Pp">References may be listed, created, deleted, and changed. When
1088 creating, deleting, or changing a reference the specified
1089 <var class="Ar">name</var> must be an absolute reference name, i.e. it
1090 must begin with &#x201C;refs/&#x201D;.</p>
1091 <p class="Pp">The options for <code class="Cm">got ref</code> are as
1092 follows:</p>
1093 <dl class="Bl-tag">
1094 <dt id="c~7"><a class="permalink" href="#c~7"><code class="Fl">-c</code></a>
1095 <var class="Ar">object</var></dt>
1096 <dd>Create a reference or change an existing reference. The reference with
1097 the specified <var class="Ar">name</var> will point at the specified
1098 <var class="Ar">object</var>.
1099 <p class="Pp" id="tagged:-3">The expected <var class="Ar">object</var>
1100 argument is an ID SHA1 hash or an existing reference or tag name or
1101 a keyword which will be resolved to the ID of a corresponding
1102 commit, tree, tag, or blob object. An abbreviated hash argument will
1103 be expanded to a full SHA1 hash automatically, provided the
1104 abbreviation is unique. The keywords &quot;:base&quot; and
1105 &quot;:head&quot; resolve to the work tree's base commit and branch
1106 head, respectively. The former is only valid if invoked in a work
1107 tree, while the latter will resolve to the tip of the work tree's
1108 current branch if invoked in a work tree, otherwise it will resolve
1109 to the repository's HEAD reference. Keywords and reference names may
1110 be appended with &quot;:+&quot; or &quot;:-&quot; modifiers and an
1111 optional integer N to denote the Nth descendant or antecedent by
1112 first parent traversal, respectively; for example,
1113 <b class="Sy">:head:-2</b> denotes the work tree branch head's 2nd
1114 generation ancestor, and
1115 <a class="permalink" href="#tagged:-3"><b class="Sy">tagged:-3</b></a>
1116 will denote the 3rd generation ancestor of the commit resolved by
1117 the &quot;tagged&quot; reference. If an integer does not follow the
1118 &quot;:+&quot; or &quot;:-&quot; modifier, a &quot;1&quot; is
1119 implicitly appended (e.g., <b class="Sy">:head:-</b> is equivalent
1120 to <b class="Sy">:head:-1</b>).</p>
1121 <p class="Pp">Cannot be used together with any other options except
1122 <code class="Fl">-r</code>.</p>
1123 </dd>
1124 <dt id="d~4"><a class="permalink" href="#d~4"><code class="Fl">-d</code></a></dt>
1125 <dd>Delete the reference with the specified <var class="Ar">name</var>
1126 from the repository. Any commit, tree, tag, and blob objects belonging
1127 to deleted references remain in the repository and may be removed
1128 separately with Git's garbage collector or <code class="Cm">gotadmin
1129 cleanup</code>. Cannot be used together with any other options except
1130 <code class="Fl">-r</code>.</dd>
1131 <dt id="l~4"><a class="permalink" href="#l~4"><code class="Fl">-l</code></a></dt>
1132 <dd>List references in the repository. If no <var class="Ar">name</var> is
1133 specified, list all existing references in the repository. If
1134 <var class="Ar">name</var> is a reference namespace, list all
1135 references in this namespace. Otherwise, show only the reference with
1136 the given <var class="Ar">name</var>. Cannot be used together with any
1137 other options except <code class="Fl">-r</code> and
1138 <code class="Fl">-t</code>.</dd>
1139 <dt id="r~7"><a class="permalink" href="#r~7"><code class="Fl">-r</code></a>
1140 <var class="Ar">repository-path</var></dt>
1141 <dd>Use the repository at the specified path. If not specified, assume the
1142 repository is located at or above the current working directory. If
1143 this directory is a <code class="Nm">got</code> work tree, use the
1144 repository path associated with this work tree.</dd>
1145 <dt id="s~4"><a class="permalink" href="#s~4"><code class="Fl">-s</code></a>
1146 <var class="Ar">reference</var></dt>
1147 <dd>Create a symbolic reference, or change an existing symbolic reference.
1148 The symbolic reference with the specified <var class="Ar">name</var>
1149 will point at the specified <var class="Ar">reference</var> which must
1150 already exist in the repository. Care should be taken not to create
1151 loops between references when this option is used. Cannot be used
1152 together with any other options except
1153 <code class="Fl">-r</code>.</dd>
1154 <dt id="t~3"><a class="permalink" href="#t~3"><code class="Fl">-t</code></a></dt>
1155 <dd>Sort listed references by modification time (most recently modified
1156 first) instead of sorting by lexicographical order. Use of this option
1157 requires the <code class="Fl">-l</code> option to be used as
1158 well.</dd>
1159 </dl>
1160 </dd>
1161 <dt id="br"><a class="permalink" href="#branch"><code class="Cm" id="branch">branch</code></a>
1162 [<code class="Fl">-lnt</code>] [<code class="Fl">-c</code>
1163 <var class="Ar">commit</var>] [<code class="Fl">-d</code>
1164 <var class="Ar">name</var>] [<code class="Fl">-r</code>
1165 <var class="Ar">repository-path</var>] [<var class="Ar">name</var>]</dt>
1166 <dd>
1167 <div class="Bd Bd-indent"><code class="Li">(alias:
1168 <code class="Cm">br</code>)</code></div>
1169 Create, list, or delete branches.
1170 <p class="Pp">Local branches are managed via references which live in the
1171 &#x201C;refs/heads/&#x201D; reference namespace. The
1172 <code class="Cm">got branch</code> command creates references in this
1173 namespace only.</p>
1174 <p class="Pp">When deleting branches, the specified
1175 <var class="Ar">name</var> is searched in the &#x201C;refs/heads&#x201D;
1176 reference namespace first. If no corresponding branch is found, the
1177 &#x201C;refs/remotes&#x201D; namespace will be searched next.</p>
1178 <p class="Pp">If invoked in a work tree without any arguments, print the
1179 name of the work tree's current branch.</p>
1180 <p class="Pp">If a <var class="Ar">name</var> argument is passed, attempt to
1181 create a branch reference with the given name. By default the new branch
1182 reference will point at the latest commit on the work tree's current
1183 branch if invoked in a work tree, and otherwise to a commit resolved via
1184 the repository's HEAD reference.</p>
1185 <p class="Pp">If invoked in a work tree, once the branch was created
1186 successfully switch the work tree's head reference to the newly created
1187 branch and update files across the entire work tree, just like
1188 <code class="Cm">got update -b</code> <var class="Ar">name</var> would
1189 do. Show the status of each affected file, using the following status
1190 codes:</p>
1191 <table class="Bl-column">
1192 <tr>
1193 <td>U</td>
1194 <td>file was updated and contained no local changes</td>
1195 </tr>
1196 <tr>
1197 <td>G</td>
1198 <td>file was updated and local changes were merged cleanly</td>
1199 </tr>
1200 <tr>
1201 <td>C</td>
1202 <td>file was updated and conflicts occurred during merge</td>
1203 </tr>
1204 <tr>
1205 <td>D</td>
1206 <td>file was deleted</td>
1207 </tr>
1208 <tr>
1209 <td>A</td>
1210 <td>new file was added</td>
1211 </tr>
1212 <tr>
1213 <td>~</td>
1214 <td>versioned file is obstructed by a non-regular file</td>
1215 </tr>
1216 <tr>
1217 <td>!</td>
1218 <td>a missing versioned file was restored</td>
1219 </tr>
1220 </table>
1221 <p class="Pp">The options for <code class="Cm">got branch</code> are as
1222 follows:</p>
1223 <dl class="Bl-tag">
1224 <dt id="c~8"><a class="permalink" href="#c~8"><code class="Fl">-c</code></a>
1225 <var class="Ar">commit</var></dt>
1226 <dd>Make a newly created branch reference point at the specified
1227 <var class="Ar">commit</var>. The expected argument is a commit ID
1228 SHA1 hash, or a reference name or keyword which will be resolved to a
1229 commit ID. An abbreviated hash argument will be expanded to a full
1230 SHA1 hash automatically, provided the abbreviation is unique. The
1231 keywords &quot;:base&quot; and &quot;:head&quot; resolve to the work
1232 tree's base commit and branch head, respectively. The former is only
1233 valid if invoked in a work tree, while the latter will resolve to the
1234 tip of the work tree's current branch if invoked in a work tree,
1235 otherwise it will resolve to the repository's HEAD reference. Keywords
1236 and references may be appended with &quot;:+&quot; or &quot;:-&quot;
1237 modifiers and an optional integer N to denote the Nth descendant or
1238 antecedent by first parent traversal, respectively; for example,
1239 <b class="Sy">:head:-2</b> denotes the work tree branch head's 2nd
1240 generation ancestor, and <b class="Sy">:base:+4</b> denotes the 4th
1241 generation descendant of the work tree's base commit. Similarly,
1242 <a class="permalink" href="#foobar:+3"><b class="Sy" id="foobar:+3">foobar:+3</b></a>
1243 will denote the 3rd generation descendant of the commit resolved by
1244 the &quot;foobar&quot; reference. A &quot;:+&quot; or &quot;:-&quot;
1245 modifier without a trailing integer has an implicit &quot;1&quot;
1246 appended (e.g., <b class="Sy">:base:+</b> is equivalent to
1247 <b class="Sy">:base:+1</b>).</dd>
1248 <dt id="d~5"><a class="permalink" href="#d~5"><code class="Fl">-d</code></a>
1249 <var class="Ar">name</var></dt>
1250 <dd>Delete the branch with the specified <var class="Ar">name</var> from
1251 the &#x201C;refs/heads&#x201D; or &#x201C;refs/remotes&#x201D;
1252 reference namespace.
1253 <p class="Pp">Only the branch reference is deleted. Any commit, tree,
1254 and blob objects belonging to the branch remain in the repository
1255 and may be removed separately with Git's garbage collector or
1256 <code class="Cm">gotadmin cleanup</code>.</p>
1257 </dd>
1258 <dt id="l~5"><a class="permalink" href="#l~5"><code class="Fl">-l</code></a></dt>
1259 <dd>List all existing branches in the repository, including copies of
1260 remote repositories' branches in the &#x201C;refs/remotes/&#x201D;
1261 reference namespace.
1262 <p class="Pp">If invoked in a work tree, the work tree's current branch
1263 is shown with one of the following annotations:</p>
1264 <table class="Bl-column">
1265 <tr>
1266 <td>*</td>
1267 <td>work tree's base commit and the base commit of all tracked files
1268 matches the branch tip</td>
1269 </tr>
1270 <tr>
1271 <td>~</td>
1272 <td>work tree comprises mixed commits or its base commit is
1273 out-of-date</td>
1274 </tr>
1275 </table>
1276 </dd>
1277 <dt id="n"><a class="permalink" href="#n"><code class="Fl">-n</code></a></dt>
1278 <dd>Do not switch and update the work tree after creating a new
1279 branch.</dd>
1280 <dt id="r~8"><a class="permalink" href="#r~8"><code class="Fl">-r</code></a>
1281 <var class="Ar">repository-path</var></dt>
1282 <dd>Use the repository at the specified path. If not specified, assume the
1283 repository is located at or above the current working directory. If
1284 this directory is a <code class="Nm">got</code> work tree, use the
1285 repository path associated with this work tree.</dd>
1286 <dt id="t~4"><a class="permalink" href="#t~4"><code class="Fl">-t</code></a></dt>
1287 <dd>Sort listed branches by modification time (most recently modified
1288 first) instead of sorting by lexicographical order. Branches in the
1289 &#x201C;refs/heads/&#x201D; reference namespace are listed before
1290 branches in &#x201C;refs/remotes/&#x201D; regardless. Use of this
1291 option requires the <code class="Fl">-l</code> option to be used as
1292 well.</dd>
1293 </dl>
1294 </dd>
1295 <dt id="tag"><a class="permalink" href="#tag"><code class="Cm">tag</code></a>
1296 [<code class="Fl">-lVv</code>] [<code class="Fl">-c</code>
1297 <var class="Ar">commit</var>] [<code class="Fl">-m</code>
1298 <var class="Ar">message</var>] [<code class="Fl">-r</code>
1299 <var class="Ar">repository-path</var>] [<code class="Fl">-s</code>
1300 <var class="Ar">signer-id</var>] <var class="Ar">name</var></dt>
1301 <dd>Manage tags in a repository.
1302 <p class="Pp">Tags are managed via references which live in the
1303 &#x201C;refs/tags/&#x201D; reference namespace. The <code class="Cm">got
1304 tag</code> command operates on references in this namespace only.
1305 References in this namespace point at tag objects which contain a
1306 pointer to another object, a tag message, as well as author and
1307 timestamp information.</p>
1308 <p class="Pp">Attempt to create a tag with the given
1309 <var class="Ar">name</var>, and make this tag point at the given
1310 <var class="Ar">commit</var>. If no commit is specified, default to the
1311 latest commit on the work tree's current branch if invoked in a work
1312 tree, and to a commit resolved via the repository's HEAD reference
1313 otherwise.</p>
1314 <p class="Pp">The options for <code class="Cm">got tag</code> are as
1315 follows:</p>
1316 <dl class="Bl-tag">
1317 <dt id="c~9"><a class="permalink" href="#c~9"><code class="Fl">-c</code></a>
1318 <var class="Ar">commit</var></dt>
1319 <dd>Make the newly created tag reference point at the specified
1320 <var class="Ar">commit</var>. The expected
1321 <var class="Ar">commit</var> argument is a commit ID SHA1 hash, or a
1322 reference or keyword which will be resolved to a commit ID. An
1323 abbreviated hash argument will be expanded to a full SHA1 hash
1324 automatically, provided the abbreviation is unique. The keywords
1325 &quot;:base&quot; and &quot;:head&quot; resolve to the work tree's
1326 base commit and branch head, respectively. The former is only valid if
1327 invoked in a work tree, while the latter will resolve to the tip of
1328 the work tree's current branch if invoked in a work tree, otherwise it
1329 will resolve to the repository's HEAD reference. Keywords and
1330 references may be appended with &quot;:+&quot; or &quot;:-&quot;
1331 modifiers and an optional integer N to denote the Nth descendant or
1332 antecedent by first parent traversal, respectively; for example,
1333 <b class="Sy">:head:-2</b> denotes the work tree branch head's 2nd
1334 generation ancestor, and <b class="Sy">:base:+4</b> denotes the 4th
1335 generation descendant of the work tree's base commit. Similarly,
1336 <a class="permalink" href="#eggs:-3"><b class="Sy" id="eggs:-3">eggs:-3</b></a>
1337 will denote the 3rd generation ancestor of the commit resolved by the
1338 &quot;eggs&quot; reference. A &quot;:+&quot; or &quot;:-&quot;
1339 modifier without a trailing integer has an implicit &quot;1&quot;
1340 appended (e.g., <b class="Sy">:base:+</b> is equivalent to
1341 <b class="Sy">:base:+1</b>).</dd>
1342 <dt id="l~6"><a class="permalink" href="#l~6"><code class="Fl">-l</code></a></dt>
1343 <dd>List all existing tags in the repository instead of creating a new
1344 tag. If a <var class="Ar">name</var> argument is passed, show only the
1345 tag with the given <var class="Ar">name</var>.</dd>
1346 <dt id="m~3"><a class="permalink" href="#m~3"><code class="Fl">-m</code></a>
1347 <var class="Ar">message</var></dt>
1348 <dd>Use the specified tag message when creating the new tag. Without the
1349 <code class="Fl">-m</code> option, <code class="Cm">got tag</code>
1350 opens a temporary file in an editor where a tag message can be
1351 written. Quitting the editor without saving the file will abort the
1352 tag operation.</dd>
1353 <dt id="r~9"><a class="permalink" href="#r~9"><code class="Fl">-r</code></a>
1354 <var class="Ar">repository-path</var></dt>
1355 <dd>Use the repository at the specified path. If not specified, assume the
1356 repository is located at or above the current working directory. If
1357 this directory is a <code class="Nm">got</code> work tree, use the
1358 repository path associated with this work tree.</dd>
1359 <dt id="s~5"><a class="permalink" href="#s~5"><code class="Fl">-s</code></a>
1360 <var class="Ar">signer-id</var></dt>
1361 <dd>While creating a new tag, sign this tag with the identity given in
1362 <var class="Ar">signer-id</var>.
1363 <p class="Pp">For SSH-based signatures, <var class="Ar">signer-id</var>
1364 is the path to a file which may refer to either a private SSH key,
1365 or a public SSH key with the private half available via
1366 <a class="Xr" aria-label="ssh-agent, section 1">ssh-agent(1)</a>.
1367 <code class="Cm">got tag</code> will sign the tag object by invoking
1368 <a class="Xr" aria-label="ssh-keygen, section 1">ssh-keygen(1)</a>
1369 with the <code class="Fl">-Y</code> <code class="Cm">sign</code>
1370 command, using the signature namespace &#x201C;git&#x201D; for
1371 compatibility with <a class="Xr" aria-label="git, section
1372 1">git(1)</a>.</p>
1373 </dd>
1374 <dt id="V~2"><a class="permalink" href="#V~2"><code class="Fl">-V</code></a></dt>
1375 <dd>Verify tag object signatures. If a <var class="Ar">name</var> is
1376 specified, show and verify the tag object with the provided name.
1377 Otherwise, list all tag objects and verify signatures where present.
1378 <p class="Pp"><code class="Cm">got tag</code> verifies SSH-based
1379 signatures by invoking <a class="Xr" aria-label="ssh-keygen, section
1380 1">ssh-keygen(1)</a> with the options <code class="Fl">-Y</code>
1381 <code class="Cm">verify</code> <code class="Fl">-f</code>
1382 <var class="Ar">allowed_signers</var>. A path to the
1383 <var class="Ar">allowed_signers</var> file must be set in
1384 <a class="Xr" aria-label="got.conf, section 5">got.conf(5)</a>,
1385 otherwise verification is impossible.</p>
1386 </dd>
1387 <dt id="v~3"><a class="permalink" href="#v~3"><code class="Fl">-v</code></a></dt>
1388 <dd>Verbose mode. During SSH signature creation and verification this
1389 option will be passed to <a class="Xr" aria-label="ssh-keygen, section
1390 1">ssh-keygen(1)</a>. Multiple -v options increase the verbosity. The
1391 maximum is 3.</dd>
1392 </dl>
1393 <p class="Pp">By design, the <code class="Cm">got tag</code> command will
1394 not delete tags or change existing tags. If a tag must be deleted, the
1395 <code class="Cm">got ref</code> command may be used to delete a tag's
1396 reference. This should only be done if the tag has not already been
1397 copied to another repository.</p>
1398 </dd>
1399 <dt id="add"><a class="permalink" href="#add"><code class="Cm">add</code></a>
1400 [<code class="Fl">-IR</code>] <var class="Ar">path ...</var></dt>
1401 <dd>Schedule unversioned files in a work tree for addition to the repository
1402 in the next commit. By default, files which match a <code class="Cm">got
1403 status</code> ignore pattern will not be added.
1404 <p class="Pp">If a <var class="Ar">path</var> mentioned in the command line
1405 is not an unversioned file then <code class="Cm">got add</code> may
1406 raise an error. To avoid unnecessary errors from paths picked up by file
1407 globbing patterns in the shell, paths in the argument list will be
1408 silently ignored if they are not reported by <code class="Cm">got
1409 status</code> at all, or if they are reported with one of the following
1410 status codes and do not have changes staged via <code class="Cm">got
1411 stage</code>:</p>
1412 <table class="Bl-column">
1413 <tr>
1414 <td>M</td>
1415 <td>modified file</td>
1416 </tr>
1417 <tr>
1418 <td>A</td>
1419 <td>file scheduled for addition in next commit</td>
1420 </tr>
1421 <tr>
1422 <td>C</td>
1423 <td>modified or added file which contains merge conflicts</td>
1424 </tr>
1425 <tr>
1426 <td>m</td>
1427 <td>modified file modes (executable bit only)</td>
1428 </tr>
1429 </table>
1430 <p class="Pp">The options for <code class="Cm">got add</code> are as
1431 follows:</p>
1432 <dl class="Bl-tag">
1433 <dt id="I~3"><a class="permalink" href="#I~3"><code class="Fl">-I</code></a></dt>
1434 <dd>Add files even if they match a <code class="Cm">got status</code>
1435 ignore pattern.</dd>
1436 <dt id="R~5"><a class="permalink" href="#R~5"><code class="Fl">-R</code></a></dt>
1437 <dd>Permit recursion into directories. If this option is not specified,
1438 <code class="Cm">got add</code> will refuse to run if a specified
1439 <var class="Ar">path</var> is a directory.</dd>
1440 </dl>
1441 </dd>
1442 <dt id="rm"><a class="permalink" href="#remove"><code class="Cm" id="remove">remove</code></a>
1443 [<code class="Fl">-fkR</code>] [<code class="Fl">-s</code>
1444 <var class="Ar">status-codes</var>] <var class="Ar">path ...</var></dt>
1445 <dd>
1446 <div class="Bd Bd-indent"><code class="Li">(alias:
1447 <code class="Cm">rm</code>)</code></div>
1448 Remove versioned files from a work tree and schedule them for deletion from
1449 the repository in the next commit.
1450 <p class="Pp">The options for <code class="Cm">got remove</code> are as
1451 follows:</p>
1452 <dl class="Bl-tag">
1453 <dt id="f"><a class="permalink" href="#f"><code class="Fl">-f</code></a></dt>
1454 <dd>Perform the operation even if a file contains local modifications, and
1455 do not raise an error if a specified <var class="Ar">path</var> does
1456 not exist on disk.</dd>
1457 <dt id="k"><a class="permalink" href="#k"><code class="Fl">-k</code></a></dt>
1458 <dd>Keep affected files on disk.</dd>
1459 <dt id="R~6"><a class="permalink" href="#R~6"><code class="Fl">-R</code></a></dt>
1460 <dd>Permit recursion into directories. If this option is not specified,
1461 <code class="Cm">got remove</code> will refuse to run if a specified
1462 <var class="Ar">path</var> is a directory.</dd>
1463 <dt id="s~6"><a class="permalink" href="#s~6"><code class="Fl">-s</code></a>
1464 <var class="Ar">status-codes</var></dt>
1465 <dd>Only delete files with a modification status matching one of the
1466 single-character status codes contained in the
1467 <var class="Ar">status-codes</var> argument. The following status
1468 codes may be specified:
1469 <table class="Bl-column">
1470 <tr>
1471 <td>M</td>
1472 <td>modified file (this implies the <code class="Fl">-f</code>
1473 option)</td>
1474 </tr>
1475 <tr>
1476 <td>!</td>
1477 <td>versioned file expected on disk but missing</td>
1478 </tr>
1479 </table>
1480 </dd>
1481 </dl>
1482 </dd>
1483 <dt id="pa"><a class="permalink" href="#patch"><code class="Cm" id="patch">patch</code></a>
1484 [<code class="Fl">-nR</code>] [<code class="Fl">-c</code>
1485 <var class="Ar">commit</var>] [<code class="Fl">-p</code>
1486 <var class="Ar">strip-count</var>] [<var class="Ar">patchfile</var>]</dt>
1487 <dd>
1488 <div class="Bd Bd-indent"><code class="Li">(alias:
1489 <code class="Cm">pa</code>)</code></div>
1490 Apply changes from <var class="Ar">patchfile</var> to files in a work tree.
1491 Files added or removed by a patch will be scheduled for addition or
1492 removal in the work tree.
1493 <p class="Pp">The patch must be in the unified diff format as produced by
1494 <code class="Cm">got diff</code>, <a class="Xr" aria-label="git-diff,
1495 section 1">git-diff(1)</a>, or by <a class="Xr" aria-label="diff,
1496 section 1">diff(1)</a> and <a class="Xr" aria-label="cvs, section
1497 1">cvs(1)</a> diff when invoked with their <code class="Fl">-u</code>
1498 options. If no <var class="Ar">patchfile</var> argument is provided,
1499 read unified diff data from standard input instead.</p>
1500 <p class="Pp">If the <var class="Ar">patchfile</var> contains multiple
1501 patches, then attempt to apply each of them in sequence.</p>
1502 <p class="Pp">Show the status of each affected file, using the following
1503 status codes:</p>
1504 <table class="Bl-column">
1505 <tr>
1506 <td>M</td>
1507 <td>file was modified</td>
1508 </tr>
1509 <tr>
1510 <td>G</td>
1511 <td>file was merged using a merge-base found in the repository</td>
1512 </tr>
1513 <tr>
1514 <td>C</td>
1515 <td>file was merged and conflicts occurred during merge</td>
1516 </tr>
1517 <tr>
1518 <td>D</td>
1519 <td>file was deleted</td>
1520 </tr>
1521 <tr>
1522 <td>A</td>
1523 <td>file was added</td>
1524 </tr>
1525 <tr>
1526 <td>#</td>
1527 <td>failed to patch the file</td>
1528 </tr>
1529 </table>
1530 <p class="Pp">If a change does not match at its exact line number, attempt
1531 to apply it somewhere else in the file if a good spot can be found.
1532 Otherwise, the patch will fail to apply.</p>
1533 <p class="Pp"><code class="Nm">got</code> <code class="Cm">patch</code> will
1534 refuse to apply a patch if certain preconditions are not met. Files to
1535 be deleted must already be under version control, and must not have been
1536 scheduled for deletion already. Files to be added must not yet be under
1537 version control and must not already be present on disk. Files to be
1538 modified must already be under version control and may not contain
1539 conflict markers.</p>
1540 <p class="Pp">If an error occurs, the <code class="Cm">patch</code>
1541 operation will be aborted. Any changes made to the work tree up to this
1542 point will be left behind. Such changes can be viewed with
1543 <code class="Cm">got diff</code> and can be reverted with
1544 <code class="Cm">got revert</code> if needed.</p>
1545 <p class="Pp">The options for <code class="Cm">got patch</code> are as
1546 follows:</p>
1547 <dl class="Bl-tag">
1548 <dt id="c~10"><a class="permalink" href="#c~10"><code class="Fl">-c</code></a>
1549 <var class="Ar">commit</var></dt>
1550 <dd>Attempt to locate files within the specified
1551 <var class="Ar">commit</var> for use as a merge-base for 3-way merges.
1552 <p class="Pp">If the <code class="Fl">-c</code> option is not used then
1553 <code class="Cm">got patch</code> will attempt to locate merge-bases
1554 via object IDs found in <var class="Ar">patchfile</var> meta-data,
1555 such as produced by <code class="Cm">got diff</code> or
1556 <a class="Xr" aria-label="git-diff, section 1">git-diff(1)</a>. Use
1557 of the <code class="Fl">-c</code> option is only recommended in the
1558 absence of such meta-data.</p>
1559 <p class="Pp">Ideally, the specified <var class="Ar">commit</var> should
1560 contain versions of files which the changes contained in the
1561 <var class="Ar">patchfile</var> were based on. Files will be located
1562 by path, relative to the repository root. If the
1563 <code class="Fl">-p</code> option is used then leading path
1564 components will be stripped before paths are looked up in the
1565 repository.</p>
1566 <p class="Pp">In case no merge-base is available for a file, changes
1567 will be applied without doing a 3-way merge. Changes which do not
1568 apply cleanly may then be rejected entirely, rather than producing
1569 merge conflicts in the patched target file.</p>
1570 <p class="Pp" id="flan:+3">The expected <var class="Ar">commit</var>
1571 argument is a commit ID SHA1 hash, or a reference name or a keyword
1572 which will be resolved to a commit ID. An abbreviated hash argument
1573 will be expanded to a full SHA1 hash automatically, provided the
1574 abbreviation is unique. The keywords &quot;:base&quot; and
1575 &quot;:head&quot; resolve to the work tree's base commit and branch
1576 head, respectively. Keywords and references may be appended with
1577 &quot;:+&quot; or &quot;:-&quot; modifiers and an optional integer N
1578 to denote the Nth descendant or antecedent by first parent
1579 traversal, respectively; for example, <b class="Sy">:head:-2</b>
1580 denotes the work tree branch head's 2nd generation ancestor, and
1581 <b class="Sy">:base:+4</b> denotes the 4th generation descendant of
1582 the work tree's base commit. Similarly,
1583 <a class="permalink" href="#flan:+3"><b class="Sy">flan:+3</b></a>
1584 will denote the 3rd generation descendant of the commit resolved by
1585 the &quot;flan&quot; reference. A &quot;:+&quot; or &quot;:-&quot;
1586 modifier without a trailing integer has an implicit &quot;1&quot;
1587 appended (e.g., <b class="Sy">:base:+</b> is equivalent to
1588 <b class="Sy">:base:+1</b>).</p>
1589 </dd>
1590 <dt id="n~2"><a class="permalink" href="#n~2"><code class="Fl">-n</code></a></dt>
1591 <dd>Do not make any modifications to the work tree. This can be used to
1592 check whether a patch would apply without issues. If the
1593 <var class="Ar">patchfile</var> contains diffs that affect the same
1594 file multiple times, the results displayed may be incorrect.</dd>
1595 <dt id="p~3"><a class="permalink" href="#p~3"><code class="Fl">-p</code></a>
1596 <var class="Ar">strip-count</var></dt>
1597 <dd>Specify the number of leading path components to strip from paths
1598 parsed from <var class="Ar">patchfile</var>. If the
1599 <code class="Fl">-p</code> option is not used, &#x2018;a/&#x2019; and
1600 &#x2018;b/&#x2019; path prefixes generated by
1601 <a class="Xr" aria-label="git-diff, section 1">git-diff(1)</a> will be
1602 recognized and stripped automatically.</dd>
1603 <dt id="R~7"><a class="permalink" href="#R~7"><code class="Fl">-R</code></a></dt>
1604 <dd>Reverse the patch before applying it.</dd>
1605 </dl>
1606 </dd>
1607 <dt id="rv"><a class="permalink" href="#revert"><code class="Cm" id="revert">revert</code></a>
1608 [<code class="Fl">-pR</code>] [<code class="Fl">-F</code>
1609 <var class="Ar">response-script</var>] <var class="Ar">path ...</var></dt>
1610 <dd>
1611 <div class="Bd Bd-indent"><code class="Li">(alias:
1612 <code class="Cm">rv</code>)</code></div>
1613 Revert any local changes in files at the specified paths in a work tree.
1614 File contents will be overwritten with those contained in the work tree's
1615 base commit. There is no way to bring discarded changes back after
1616 <code class="Cm">got revert</code>!
1617 <p class="Pp">If a file was added with <code class="Cm">got add</code>, it
1618 will become an unversioned file again. If a file was deleted with
1619 <code class="Cm">got remove</code>, it will be restored.</p>
1620 <p class="Pp">The options for <code class="Cm">got revert</code> are as
1621 follows:</p>
1622 <dl class="Bl-tag">
1623 <dt id="F"><a class="permalink" href="#F"><code class="Fl">-F</code></a>
1624 <var class="Ar">response-script</var></dt>
1625 <dd>With the <code class="Fl">-p</code> option, read &#x201C;y&#x201D;,
1626 &#x201C;n&#x201D;, and &#x201C;q&#x201D; responses line-by-line from
1627 the specified <var class="Ar">response-script</var> file instead of
1628 prompting interactively.</dd>
1629 <dt id="p~4"><a class="permalink" href="#p~4"><code class="Fl">-p</code></a></dt>
1630 <dd>Instead of reverting all changes in files, interactively select or
1631 reject changes to revert based on &#x201C;y&#x201D; (revert change),
1632 &#x201C;n&#x201D; (keep change), and &#x201C;q&#x201D; (quit reverting
1633 this file) responses. If a file is in modified status, individual
1634 patches derived from the modified file content can be reverted. Files
1635 in added or deleted status may only be reverted in their
1636 entirety.</dd>
1637 <dt id="R~8"><a class="permalink" href="#R~8"><code class="Fl">-R</code></a></dt>
1638 <dd>Permit recursion into directories. If this option is not specified,
1639 <code class="Cm">got revert</code> will refuse to run if a specified
1640 <var class="Ar">path</var> is a directory.</dd>
1641 </dl>
1642 </dd>
1643 <dt id="ci"><a class="permalink" href="#commit"><code class="Cm" id="commit">commit</code></a>
1644 [<code class="Fl">-CNnS</code>] [<code class="Fl">-A</code>
1645 <var class="Ar">author</var>] [<code class="Fl">-F</code>
1646 <var class="Ar">path</var>] [<code class="Fl">-m</code>
1647 <var class="Ar">message</var>] [<var class="Ar">path ...</var>]</dt>
1648 <dd>
1649 <div class="Bd Bd-indent"><code class="Li">(alias:
1650 <code class="Cm">ci</code>)</code></div>
1651 Create a new commit in the repository from changes in a work tree and use
1652 this commit as the new base commit for the work tree. If no
1653 <var class="Ar">path</var> is specified, commit all changes in the work
1654 tree. Otherwise, commit changes at or within the specified paths.
1655 <p class="Pp">If changes have been explicitly staged for commit with
1656 <code class="Cm">got stage</code>, only commit staged changes and reject
1657 any specified paths which have not been staged.</p>
1658 <p class="Pp"><code class="Cm">got commit</code> opens a temporary file in
1659 an editor where a log message can be written unless the
1660 <code class="Fl">-m</code> option is used or the
1661 <code class="Fl">-F</code> and <code class="Fl">-N</code> options are
1662 used together. Quitting the editor without saving the file will abort
1663 the commit operation.</p>
1664 <p class="Pp">Show the status of each affected file, using the following
1665 status codes:</p>
1666 <table class="Bl-column">
1667 <tr>
1668 <td>M</td>
1669 <td>modified file</td>
1670 </tr>
1671 <tr>
1672 <td>D</td>
1673 <td>file was deleted</td>
1674 </tr>
1675 <tr>
1676 <td>A</td>
1677 <td>new file was added</td>
1678 </tr>
1679 <tr>
1680 <td>m</td>
1681 <td>modified file modes (executable bit only)</td>
1682 </tr>
1683 </table>
1684 <p class="Pp">Files which are not part of the new commit will retain their
1685 previously recorded base commit. Some <code class="Nm">got</code>
1686 commands may refuse to run while the work tree contains files from
1687 multiple base commits. The base commit of such a work tree can be made
1688 consistent by running <code class="Cm">got update</code> across the
1689 entire work tree.</p>
1690 <p class="Pp">The <code class="Cm">got commit</code> command requires the
1691 <code class="Ev">GOT_AUTHOR</code> environment variable to be set,
1692 unless an author has been configured in
1693 <a class="Xr" aria-label="got.conf, section 5">got.conf(5)</a> or Git's
1694 <code class="Dv">user.name</code> and <code class="Dv">user.email</code>
1695 configuration settings can be obtained from the repository's
1696 <span class="Pa">.git/config</span> file or from Git's global
1697 <span class="Pa">~/.gitconfig</span> configuration file.</p>
1698 <p class="Pp">The options for <code class="Cm">got commit</code> are as
1699 follows:</p>
1700 <dl class="Bl-tag">
1701 <dt id="A"><a class="permalink" href="#A"><code class="Fl">-A</code></a>
1702 <var class="Ar">author</var></dt>
1703 <dd>Set author information in the newly created commit to
1704 <var class="Ar">author</var>. This is useful when committing changes
1705 on behalf of someone else. The <var class="Ar">author</var> argument
1706 must use the same format as the <code class="Ev">GOT_AUTHOR</code>
1707 environment variable.
1708 <p class="Pp">In addition to storing author information, the newly
1709 created commit object will retain &#x201C;committer&#x201D;
1710 information which is obtained, as usual, from the
1711 <code class="Ev">GOT_AUTHOR</code> environment variable, or
1712 <a class="Xr" aria-label="got.conf, section 5">got.conf(5)</a>, or
1713 Git configuration settings.</p>
1714 </dd>
1715 <dt id="C~3"><a class="permalink" href="#C~3"><code class="Fl">-C</code></a></dt>
1716 <dd>Allow committing files in conflicted status.
1717 <p class="Pp">Committing files with conflict markers should generally be
1718 avoided. Cases where conflict markers must be stored in the
1719 repository for some legitimate reason should be very rare. There are
1720 usually ways to avoid storing conflict markers verbatim by applying
1721 appropriate programming tricks.</p>
1722 </dd>
1723 <dt id="F~2"><a class="permalink" href="#F~2"><code class="Fl">-F</code></a>
1724 <var class="Ar">path</var></dt>
1725 <dd>Use the prepared log message stored in the file found at
1726 <var class="Ar">path</var> when creating the new commit.
1727 <code class="Cm">got commit</code> opens a temporary file in an editor
1728 where the prepared log message can be reviewed and edited further if
1729 needed. Cannot be used together with the <code class="Fl">-m</code>
1730 option.</dd>
1731 <dt id="m~4"><a class="permalink" href="#m~4"><code class="Fl">-m</code></a>
1732 <var class="Ar">message</var></dt>
1733 <dd>Use the specified log message when creating the new commit. Cannot be
1734 used together with the <code class="Fl">-F</code> option.</dd>
1735 <dt id="N"><a class="permalink" href="#N"><code class="Fl">-N</code></a></dt>
1736 <dd>This option prevents <code class="Cm">got commit</code> from opening
1737 the commit message in an editor. It has no effect unless it is used
1738 together with the <code class="Fl">-F</code> option and is intended
1739 for non-interactive use such as scripting.</dd>
1740 <dt id="n~3"><a class="permalink" href="#n~3"><code class="Fl">-n</code></a></dt>
1741 <dd>This option prevents <code class="Cm">got commit</code> from
1742 generating a diff of the to-be-committed changes in a temporary file
1743 which can be viewed while editing a commit message.</dd>
1744 <dt id="S~3"><a class="permalink" href="#S~3"><code class="Fl">-S</code></a></dt>
1745 <dd>Allow the addition of symbolic links which point outside of the path
1746 space that is under version control. By default, <code class="Cm">got
1747 commit</code> will reject such symbolic links due to safety concerns.
1748 As a precaution, <code class="Nm">got</code> may decide to represent
1749 such a symbolic link as a regular file which contains the link's
1750 target path, rather than creating an actual symbolic link which points
1751 outside of the work tree. Use of this option is discouraged because
1752 external mechanisms such as &#x201C;make obj&#x201D; are better suited
1753 for managing symbolic links to paths not under version control.</dd>
1754 </dl>
1755 <p class="Pp"><code class="Cm">got commit</code> will refuse to run if
1756 certain preconditions are not met. If the work tree's current branch is
1757 not in the &#x201C;refs/heads/&#x201D; reference namespace, new commits
1758 may not be created on this branch. Local changes may only be committed
1759 if they are based on file content found in the most recent commit on the
1760 work tree's branch. If a path is found to be out of date,
1761 <code class="Cm">got update</code> must be used first in order to merge
1762 local changes with changes made in the repository.</p>
1763 </dd>
1764 <dt id="se"><a class="permalink" href="#send"><code class="Cm" id="send">send</code></a>
1765 [<code class="Fl">-afqTv</code>] [<code class="Fl">-b</code>
1766 <var class="Ar">branch</var>] [<code class="Fl">-d</code>
1767 <var class="Ar">branch</var>] [<code class="Fl">-r</code>
1768 <var class="Ar">repository-path</var>] [<code class="Fl">-t</code>
1769 <var class="Ar">tag</var>] [<var class="Ar">remote-repository</var>]</dt>
1770 <dd>
1771 <div class="Bd Bd-indent"><code class="Li">(alias:
1772 <code class="Cm">se</code>)</code></div>
1773 Send new changes to a remote repository. If no
1774 <var class="Ar">remote-repository</var> is specified,
1775 &#x201C;origin&#x201D; will be used. The remote repository's URL is
1776 obtained from the corresponding entry in
1777 <a class="Xr" aria-label="got.conf, section 5">got.conf(5)</a> or Git's
1778 <span class="Pa">config</span> file of the local repository, as created by
1779 <code class="Cm">got clone</code>.
1780 <p class="Pp">All objects corresponding to new changes will be written to a
1781 temporary pack file which is then uploaded to the server. Upon success,
1782 references in the &#x201C;refs/remotes/&#x201D; reference namespace of
1783 the local repository will be updated to point at the commits which have
1784 been sent.</p>
1785 <p class="Pp">By default, changes will only be sent if they are based on
1786 up-to-date copies of relevant branches in the remote repository. If any
1787 changes to be sent are based on out-of-date copies or would otherwise
1788 break linear history of existing branches, new changes must be fetched
1789 from the server with <code class="Cm">got fetch</code> and local
1790 branches must be rebased with <code class="Cm">got rebase</code> before
1791 <code class="Cm">got send</code> can succeed. The
1792 <code class="Fl">-f</code> option can be used to make exceptions to
1793 these requirements.</p>
1794 <p class="Pp">The options for <code class="Cm">got send</code> are as
1795 follows:</p>
1796 <dl class="Bl-tag">
1797 <dt id="a~4"><a class="permalink" href="#a~4"><code class="Fl">-a</code></a></dt>
1798 <dd>Send all branches from the local repository's
1799 &#x201C;refs/heads/&#x201D; reference namespace. The
1800 <code class="Fl">-a</code> option is equivalent to listing all
1801 branches with multiple <code class="Fl">-b</code> options. Cannot be
1802 used together with the <code class="Fl">-b</code> option.</dd>
1803 <dt id="b~7"><a class="permalink" href="#b~7"><code class="Fl">-b</code></a>
1804 <var class="Ar">branch</var></dt>
1805 <dd>Send the specified <var class="Ar">branch</var> from the local
1806 repository's &#x201C;refs/heads/&#x201D; reference namespace. This
1807 option may be specified multiple times to build a list of branches to
1808 send. If this option is not specified, default to the work tree's
1809 current branch if invoked in a work tree, or to the repository's HEAD
1810 reference. Cannot be used together with the <code class="Fl">-a</code>
1811 option.</dd>
1812 <dt id="d~6"><a class="permalink" href="#d~6"><code class="Fl">-d</code></a>
1813 <var class="Ar">branch</var></dt>
1814 <dd>Delete the specified <var class="Ar">branch</var> from the remote
1815 repository's &#x201C;refs/heads/&#x201D; reference namespace. This
1816 option may be specified multiple times to build a list of branches to
1817 delete.
1818 <p class="Pp">Only references are deleted. Any commit, tree, tag, and
1819 blob objects belonging to deleted branches may become subject to
1820 deletion by Git's garbage collector running on the server.</p>
1821 <p class="Pp">Requesting deletion of branches results in an error if the
1822 server does not support this feature or disallows the deletion of
1823 branches based on its configuration.</p>
1824 </dd>
1825 <dt id="f~2"><a class="permalink" href="#f~2"><code class="Fl">-f</code></a></dt>
1826 <dd>Attempt to force the server to overwrite existing branches or tags in
1827 the remote repository, even when <code class="Cm">got fetch</code>
1828 followed by <code class="Cm">got rebase</code> or <code class="Cm">got
1829 merge</code> would usually be required before changes can be sent. The
1830 server may reject forced requests regardless, depending on its
1831 configuration.
1832 <p class="Pp">Any commit, tree, tag, and blob objects belonging to
1833 overwritten branches or tags may become subject to deletion by Git's
1834 garbage collector running on the server.</p>
1835 <p class="Pp">The &#x201C;refs/tags&#x201D; reference namespace is
1836 globally shared between all repositories. Use of the
1837 <code class="Fl">-f</code> option to overwrite tags is discouraged
1838 because it can lead to inconsistencies between the tags present in
1839 different repositories. In general, creating a new tag with a
1840 different name is recommended instead of overwriting an existing
1841 tag.</p>
1842 <p class="Pp">Use of the <code class="Fl">-f</code> option is
1843 particularly discouraged if changes being sent are based on an
1844 out-of-date copy of a branch in the remote repository. Instead of
1845 using the <code class="Fl">-f</code> option, new changes should be
1846 fetched with <code class="Cm">got fetch</code> and local branches
1847 should be rebased with <code class="Cm">got rebase</code> or merged
1848 with <code class="Cm">got merge</code>, followed by another attempt
1849 to send the changes.</p>
1850 <p class="Pp">The <code class="Fl">-f</code> option should only be
1851 needed in situations where the remote repository's copy of a branch
1852 or tag is known to be out-of-date and is considered disposable. The
1853 risks of creating inconsistencies between different repositories
1854 should also be taken into account.</p>
1855 </dd>
1856 <dt id="q~5"><a class="permalink" href="#q~5"><code class="Fl">-q</code></a></dt>
1857 <dd>Suppress progress reporting output. The same option will be passed to
1858 <a class="Xr" aria-label="ssh, section 1">ssh(1)</a> if
1859 applicable.</dd>
1860 <dt id="r~10"><a class="permalink" href="#r~10"><code class="Fl">-r</code></a>
1861 <var class="Ar">repository-path</var></dt>
1862 <dd>Use the repository at the specified path. If not specified, assume the
1863 repository is located at or above the current working directory. If
1864 this directory is a <code class="Nm">got</code> work tree, use the
1865 repository path associated with this work tree.</dd>
1866 <dt id="T"><a class="permalink" href="#T"><code class="Fl">-T</code></a></dt>
1867 <dd>Attempt to send all tags from the local repository's
1868 &#x201C;refs/tags/&#x201D; reference namespace. The
1869 <code class="Fl">-T</code> option is equivalent to listing all tags
1870 with multiple <code class="Fl">-t</code> options. Cannot be used
1871 together with the <code class="Fl">-t</code> option.</dd>
1872 <dt id="t~5"><a class="permalink" href="#t~5"><code class="Fl">-t</code></a>
1873 <var class="Ar">tag</var></dt>
1874 <dd>Send the specified <var class="Ar">tag</var> from the local
1875 repository's &#x201C;refs/tags/&#x201D; reference namespace, in
1876 addition to any branches that are being sent. The
1877 <code class="Fl">-t</code> option may be specified multiple times to
1878 build a list of tags to send. No tags will be sent if the
1879 <code class="Fl">-t</code> option is not used.
1880 <p class="Pp">Raise an error if the specified <var class="Ar">tag</var>
1881 already exists in the remote repository, unless the
1882 <code class="Fl">-f</code> option is used to overwrite the server's
1883 copy of the tag. In general, creating a new tag with a different
1884 name is recommended instead of overwriting an existing tag.</p>
1885 <p class="Pp">Cannot be used together with the
1886 <code class="Fl">-T</code> option.</p>
1887 </dd>
1888 <dt id="v~4"><a class="permalink" href="#v~4"><code class="Fl">-v</code></a></dt>
1889 <dd>Verbose mode. Causes <code class="Cm">got send</code> to print
1890 debugging messages to standard error output. The same option will be
1891 passed to <a class="Xr" aria-label="ssh, section 1">ssh(1)</a> if
1892 applicable. Multiple -v options increase the verbosity. The maximum is
1893 3.</dd>
1894 </dl>
1895 </dd>
1896 <dt id="cy"><a class="permalink" href="#cherrypick"><code class="Cm" id="cherrypick">cherrypick</code></a>
1897 [<code class="Fl">-lX</code>] [<var class="Ar">commit</var>]</dt>
1898 <dd>
1899 <div class="Bd Bd-indent"><code class="Li">(alias:
1900 <code class="Cm">cy</code>)</code></div>
1901 Merge changes from a single <var class="Ar">commit</var> into the work tree.
1902 The specified <var class="Ar">commit</var> should be on a different branch
1903 than the work tree's base commit.
1904 <p class="Pp" id="barbaz:+3">The expected argument is a commit ID SHA1 hash,
1905 or a reference name or keyword which will be resolved to a commit ID. An
1906 abbreviated hash argument will be expanded to a full SHA1 hash
1907 automatically, provided the abbreviation is unique. The keywords
1908 &quot;:base&quot; and &quot;:head&quot; resolve to the work tree's base
1909 commit and branch head, respectively. Keywords and references may be
1910 appended with &quot;:+&quot; or &quot;:-&quot; modifiers and an optional
1911 integer N to denote the Nth descendant or antecedent by first parent
1912 traversal, respectively; for example, <b class="Sy">:head:-2</b> denotes
1913 the work tree branch head's 2nd generation ancestor, and
1914 <b class="Sy">:base:+4</b> denotes the 4th generation descendant of the
1915 work tree's base commit. Similarly,
1916 <a class="permalink" href="#barbaz:+3"><b class="Sy">barbaz:+3</b></a>
1917 will denote the 3rd generation descendant of the commit resolved by the
1918 &quot;barbaz&quot; reference. A &quot;:+&quot; or &quot;:-&quot;
1919 modifier without a trailing integer has an implicit &quot;1&quot;
1920 appended (e.g., <b class="Sy">:base:+</b> is equivalent to
1921 <b class="Sy">:base:+1</b>).</p>
1922 <p class="Pp">Show the status of each affected file, using the following
1923 status codes:</p>
1924 <table class="Bl-column">
1925 <tr>
1926 <td>G</td>
1927 <td>file was merged</td>
1928 </tr>
1929 <tr>
1930 <td>C</td>
1931 <td>file was merged and conflicts occurred during merge</td>
1932 </tr>
1933 <tr>
1934 <td>!</td>
1935 <td>changes destined for a missing file were not merged</td>
1936 </tr>
1937 <tr>
1938 <td>D</td>
1939 <td>file was deleted</td>
1940 </tr>
1941 <tr>
1942 <td>d</td>
1943 <td>file's deletion was prevented by local modifications</td>
1944 </tr>
1945 <tr>
1946 <td>A</td>
1947 <td>new file was added</td>
1948 </tr>
1949 <tr>
1950 <td>~</td>
1951 <td>changes destined for a non-regular file were not merged</td>
1952 </tr>
1953 <tr>
1954 <td>?</td>
1955 <td>changes destined for an unversioned file were not merged</td>
1956 </tr>
1957 </table>
1958 <p class="Pp">The merged changes will appear as local changes in the work
1959 tree, which may be viewed with <code class="Cm">got diff</code>, amended
1960 manually or with further <code class="Cm">got cherrypick</code>
1961 commands, committed with <code class="Cm">got commit</code>.</p>
1962 <p class="Pp">If invoked in a work tree where no
1963 <code class="Cm">rebase</code>, <code class="Cm">histedit</code>, or
1964 <code class="Cm">merge</code> operation is taking place,
1965 <code class="Cm">got cherrypick</code> creates a record of commits which
1966 have been merged into the work tree. When a file changed by
1967 <code class="Cm">got cherrypick</code> is committed with
1968 <code class="Cm">got commit</code>, the log messages of relevant merged
1969 commits will then appear in the editor, where the messages should be
1970 further adjusted to convey the reasons for cherrypicking the changes.
1971 Upon exiting the editor, if the time stamp of the log message file is
1972 unchanged or the log message is empty, <code class="Cm">got
1973 commit</code> will fail with an unmodified or empty log message
1974 error.</p>
1975 <p class="Pp">If all the changes in all files touched by a given commit are
1976 discarded, e.g. with <code class="Cm">got revert</code>, this commit's
1977 log message record will also disappear.</p>
1978 <p class="Pp"><code class="Cm">got cherrypick</code> will refuse to run if
1979 certain preconditions are not met. If the work tree contains multiple
1980 base commits, it must first be updated to a single base commit with
1981 <code class="Cm">got update</code>. If any relevant files already
1982 contain merge conflicts, these conflicts must be resolved first.</p>
1983 <p class="Pp">The options for <code class="Nm">got</code>
1984 <code class="Cm">cherrypick</code> are as follows:</p>
1985 <dl class="Bl-tag">
1986 <dt id="l~7"><a class="permalink" href="#l~7"><code class="Fl">-l</code></a></dt>
1987 <dd>Display a list of commit log messages recorded by cherrypick
1988 operations, represented by references in the
1989 &#x201C;refs/got/worktree&#x201D; reference namespace. If a
1990 <var class="Ar">commit</var> is specified, only show the log message
1991 of the specified commit.
1992 <p class="Pp">If invoked in a work tree, only log messages recorded by
1993 cherrypick operations in the current work tree will be displayed.
1994 Otherwise, all commit log messages will be displayed irrespective of
1995 the work tree in which they were created. This option cannot be used
1996 with <code class="Fl">-X</code>.</p>
1997 </dd>
1998 <dt id="X~2"><a class="permalink" href="#X~2"><code class="Fl">-X</code></a></dt>
1999 <dd>Delete log messages created by previous cherrypick operations,
2000 represented by references in the &#x201C;refs/got/worktree&#x201D;
2001 reference namespace. If a <var class="Ar">commit</var> is specified,
2002 only delete the log message of the specified commit.
2003 <p class="Pp">If invoked in a work tree, only log messages recorded by
2004 cherrypick operations in the current work tree will be deleted.
2005 Otherwise, all commit log messages will be deleted irrespective of
2006 the work tree in which they were created. This option cannot be used
2007 with <code class="Fl">-l</code>.</p>
2008 </dd>
2009 </dl>
2010 <p class="Pp"></p>
2011 </dd>
2012 <dt id="bo"><a class="permalink" href="#backout"><code class="Cm" id="backout">backout</code></a>
2013 [<code class="Fl">-lX</code>] [<var class="Ar">commit</var>]</dt>
2014 <dd>
2015 <div class="Bd Bd-indent"><code class="Li">(alias:
2016 <code class="Cm">bo</code>)</code></div>
2017 Reverse-merge changes from a single <var class="Ar">commit</var> into the
2018 work tree. The specified <var class="Ar">commit</var> should be on the
2019 same branch as the work tree's base commit.
2020 <p class="Pp" id="wip:+5">The expected argument is a commit ID SHA1 hash, or
2021 a reference name or keyword which will be resolved to a commit ID. An
2022 abbreviated hash argument will be expanded to a full SHA1 hash
2023 automatically, provided the abbreviation is unique. The keywords
2024 &quot;:base&quot; and &quot;:head&quot; resolve to the work tree's base
2025 commit and branch head, respectively. Keywords and references may be
2026 appended with &quot;:+&quot; or &quot;:-&quot; modifiers and an optional
2027 integer N to denote the Nth descendant or antecedent by first parent
2028 traversal, respectively; for example, <b class="Sy">:head:-2</b> denotes
2029 the work tree branch head's 2nd generation ancestor, and
2030 <b class="Sy">:base:+4</b> denotes the 4th generation descendant of the
2031 work tree's base commit. Similarly,
2032 <a class="permalink" href="#wip:+5"><b class="Sy">wip:+5</b></a> will
2033 denote the 5th generation descendant of the commit resolved by the
2034 &quot;wip&quot; reference. A &quot;:+&quot; or &quot;:-&quot; modifier
2035 without a trailing integer has an implicit &quot;1&quot; appended (e.g.,
2036 <b class="Sy">:base:+</b> is equivalent to
2037 <b class="Sy">:base:+1</b>).</p>
2038 <p class="Pp">Show the status of each affected file, using the following
2039 status codes:</p>
2040 <table class="Bl-column">
2041 <tr>
2042 <td>G</td>
2043 <td>file was merged</td>
2044 </tr>
2045 <tr>
2046 <td>C</td>
2047 <td>file was merged and conflicts occurred during merge</td>
2048 </tr>
2049 <tr>
2050 <td>!</td>
2051 <td>changes destined for a missing file were not merged</td>
2052 </tr>
2053 <tr>
2054 <td>D</td>
2055 <td>file was deleted</td>
2056 </tr>
2057 <tr>
2058 <td>d</td>
2059 <td>file's deletion was prevented by local modifications</td>
2060 </tr>
2061 <tr>
2062 <td>A</td>
2063 <td>new file was added</td>
2064 </tr>
2065 <tr>
2066 <td>~</td>
2067 <td>changes destined for a non-regular file were not merged</td>
2068 </tr>
2069 <tr>
2070 <td>?</td>
2071 <td>changes destined for an unversioned file were not merged</td>
2072 </tr>
2073 </table>
2074 <p class="Pp">The reverse-merged changes will appear as local changes in the
2075 work tree, which may be viewed with <code class="Cm">got diff</code>,
2076 amended manually or with further <code class="Cm">got backout</code>
2077 commands, committed with <code class="Cm">got commit</code>.</p>
2078 <p class="Pp">If invoked in a work tree where no
2079 <code class="Cm">rebase</code>, <code class="Cm">histedit</code>, or
2080 <code class="Cm">merge</code> operation is taking place,
2081 <code class="Cm">got backout</code> creates a record of commits which
2082 have been reverse-merged into the work tree. When a file changed by
2083 <code class="Cm">got backout</code> is committed with
2084 <code class="Cm">got commit</code>, the log messages of relevant
2085 reverse-merged commits will then appear in the editor, where the
2086 messages should be further adjusted to convey the reasons for backing
2087 out the changes. Upon exiting the editor, if the time stamp of the log
2088 message file is unchanged or the log message is empty,
2089 <code class="Cm">got commit</code> will fail with an unmodified or empty
2090 log message error.</p>
2091 <p class="Pp">If all the changes in all files touched by a given commit are
2092 discarded, e.g. with <code class="Cm">got revert</code>, this commit's
2093 log message record will also disappear.</p>
2094 <p class="Pp"><code class="Cm">got backout</code> will refuse to run if
2095 certain preconditions are not met. If the work tree contains multiple
2096 base commits, it must first be updated to a single base commit with
2097 <code class="Cm">got update</code>. If any relevant files already
2098 contain merge conflicts, these conflicts must be resolved first.</p>
2099 <p class="Pp">The options for <code class="Nm">got</code>
2100 <code class="Cm">backout</code> are as follows:</p>
2101 <dl class="Bl-tag">
2102 <dt id="l~8"><a class="permalink" href="#l~8"><code class="Fl">-l</code></a></dt>
2103 <dd>Display a list of commit log messages recorded by backout operations,
2104 represented by references in the &#x201C;refs/got/worktree&#x201D;
2105 reference namespace. If a <var class="Ar">commit</var> is specified,
2106 only show the log message of the specified commit.
2107 <p class="Pp">If invoked in a work tree, only log messages recorded by
2108 backout operations in the current work tree will be displayed.
2109 Otherwise, all commit log messages will be displayed irrespective of
2110 the work tree in which they were created. This option cannot be used
2111 with <code class="Fl">-X</code>.</p>
2112 </dd>
2113 <dt id="X~3"><a class="permalink" href="#X~3"><code class="Fl">-X</code></a></dt>
2114 <dd>Delete log messages created by previous backout operations,
2115 represented by references in the &#x201C;refs/got/worktree&#x201D;
2116 reference namespace. If a <var class="Ar">commit</var> is specified,
2117 only delete the log message of the specified commit.
2118 <p class="Pp">If invoked in a work tree, only log messages recorded by
2119 backout operations in the current work tree will be deleted.
2120 Otherwise, all commit log messages will be deleted irrespective of
2121 the work tree in which they were created. This option cannot be used
2122 with <code class="Fl">-l</code>.</p>
2123 </dd>
2124 </dl>
2125 <p class="Pp"></p>
2126 </dd>
2127 <dt id="rb"><a class="permalink" href="#rebase"><code class="Cm" id="rebase">rebase</code></a>
2128 [<code class="Fl">-aCclX</code>] [<var class="Ar">branch</var>]</dt>
2129 <dd>
2130 <div class="Bd Bd-indent"><code class="Li">(alias:
2131 <code class="Cm">rb</code>)</code></div>
2132 Rebase commits on the specified <var class="Ar">branch</var> onto the tip of
2133 the current branch of the work tree. The <var class="Ar">branch</var> must
2134 share common ancestry with the work tree's current branch. Rebasing begins
2135 with the first descendant commit of the youngest common ancestor commit
2136 shared by the specified <var class="Ar">branch</var> and the work tree's
2137 current branch, and stops once the tip commit of the specified
2138 <var class="Ar">branch</var> has been rebased.
2139 <p class="Pp">When <code class="Cm">got rebase</code> is used as intended,
2140 the specified <var class="Ar">branch</var> represents a local commit
2141 history and may already contain changes that are not yet visible in any
2142 other repositories. The work tree's current branch, which must be set
2143 with <code class="Cm">got update -b</code> before starting the
2144 <code class="Cm">rebase</code> operation, represents a branch from a
2145 remote repository which shares a common history with the specified
2146 <var class="Ar">branch</var> but has progressed, and perhaps diverged,
2147 due to commits added to the remote repository.</p>
2148 <p class="Pp">Rebased commits are accumulated on a temporary branch which
2149 the work tree will remain switched to throughout the entire rebase
2150 operation. Commits on this branch represent the same changes with the
2151 same log messages as their counterparts on the original
2152 <var class="Ar">branch</var>, but with different commit IDs. Once
2153 rebasing has completed successfully, the temporary branch becomes the
2154 new version of the specified <var class="Ar">branch</var> and the work
2155 tree is automatically switched to it. If author information is available
2156 via the <code class="Ev">GOT_AUTHOR</code> environment variable,
2157 <a class="Xr" aria-label="got.conf, section 5">got.conf(5)</a> or Git's
2158 <code class="Dv">user.name</code> and <code class="Dv">user.email</code>
2159 configuration settings, this author information will be used to identify
2160 the &#x201C;committer&#x201D; of rebased commits.</p>
2161 <p class="Pp">Old commits in their pre-rebase state are automatically backed
2162 up in the &#x201C;refs/got/backup/rebase&#x201D; reference namespace. As
2163 long as these references are not removed older versions of rebased
2164 commits will remain in the repository and can be viewed with the
2165 <code class="Cm">got rebase -l</code> command. Removal of these
2166 references makes objects which become unreachable via any reference
2167 subject to removal by Git's garbage collector or
2168 <code class="Cm">gotadmin cleanup</code>.</p>
2169 <p class="Pp">While rebasing commits, show the status of each affected file,
2170 using the following status codes:</p>
2171 <table class="Bl-column">
2172 <tr>
2173 <td>G</td>
2174 <td>file was merged</td>
2175 </tr>
2176 <tr>
2177 <td>C</td>
2178 <td>file was merged and conflicts occurred during merge</td>
2179 </tr>
2180 <tr>
2181 <td>!</td>
2182 <td>changes destined for a missing file were not merged</td>
2183 </tr>
2184 <tr>
2185 <td>D</td>
2186 <td>file was deleted</td>
2187 </tr>
2188 <tr>
2189 <td>d</td>
2190 <td>file's deletion was prevented by local modifications</td>
2191 </tr>
2192 <tr>
2193 <td>A</td>
2194 <td>new file was added</td>
2195 </tr>
2196 <tr>
2197 <td>~</td>
2198 <td>changes destined for a non-regular file were not merged</td>
2199 </tr>
2200 <tr>
2201 <td>?</td>
2202 <td>changes destined for an unversioned file were not merged</td>
2203 </tr>
2204 </table>
2205 <p class="Pp">If merge conflicts occur, the rebase operation is interrupted
2206 and may be continued once conflicts have been resolved. If any files
2207 with destined changes are found to be missing or unversioned, or if
2208 files could not be deleted due to differences in deleted content, the
2209 rebase operation will be interrupted to prevent potentially incomplete
2210 changes from being committed to the repository without user
2211 intervention. The work tree may be modified as desired and the rebase
2212 operation can be continued once the changes present in the work tree are
2213 considered complete. Alternatively, the rebase operation may be aborted
2214 which will leave <var class="Ar">branch</var> unmodified and the work
2215 tree switched back to its original branch.</p>
2216 <p class="Pp">If a merge conflict is resolved in a way which renders the
2217 merged change into a no-op change, the corresponding commit will be
2218 elided when the rebase operation continues.</p>
2219 <p class="Pp"><code class="Cm">got rebase</code> will refuse to run if
2220 certain preconditions are not met. If the <var class="Ar">branch</var>
2221 is not in the &#x201C;refs/heads/&#x201D; reference namespace, the
2222 branch may not be rebased. If the work tree is not yet fully updated to
2223 the tip commit of its branch, then the work tree must first be updated
2224 with <code class="Cm">got update</code>. If changes have been staged
2225 with <code class="Cm">got stage</code>, these changes must first be
2226 committed with <code class="Cm">got commit</code> or unstaged with
2227 <code class="Cm">got unstage</code>. If the work tree contains local
2228 changes, these changes must first be committed with <code class="Cm">got
2229 commit</code> or reverted with <code class="Cm">got revert</code>. If
2230 the <var class="Ar">branch</var> contains changes to files outside of
2231 the work tree's path prefix, the work tree cannot be used to rebase this
2232 branch.</p>
2233 <p class="Pp">The <code class="Cm">got update</code>, <code class="Cm">got
2234 integrate</code>, <code class="Cm">got merge</code>,
2235 <code class="Cm">got commit</code>, and <code class="Cm">got
2236 histedit</code> commands will refuse to run while a rebase operation is
2237 in progress. Other commands which manipulate the work tree may be used
2238 for conflict resolution purposes.</p>
2239 <p class="Pp">If the specified <var class="Ar">branch</var> is already based
2240 on the work tree's current branch, then no commits need to be rebased
2241 and <code class="Cm">got rebase</code> will simply switch the work tree
2242 to the specified <var class="Ar">branch</var> and update files in the
2243 work tree accordingly.</p>
2244 <p class="Pp">The options for <code class="Cm">got rebase</code> are as
2245 follows:</p>
2246 <dl class="Bl-tag">
2247 <dt id="a~5"><a class="permalink" href="#a~5"><code class="Fl">-a</code></a></dt>
2248 <dd>Abort an interrupted rebase operation. If this option is used, no
2249 other command-line arguments are allowed.</dd>
2250 <dt id="C~4"><a class="permalink" href="#C~4"><code class="Fl">-C</code></a></dt>
2251 <dd>Allow a rebase operation to continue with files in conflicted status.
2252 This option should generally be avoided, and can only be used with the
2253 <code class="Fl">-c</code> option.</dd>
2254 <dt id="c~11"><a class="permalink" href="#c~11"><code class="Fl">-c</code></a></dt>
2255 <dd>Continue an interrupted rebase operation. If this option is used, no
2256 other command-line arguments are allowed except
2257 <code class="Fl">-C</code>.</dd>
2258 <dt id="l~9"><a class="permalink" href="#l~9"><code class="Fl">-l</code></a></dt>
2259 <dd>Show a list of past rebase operations, represented by references in
2260 the &#x201C;refs/got/backup/rebase&#x201D; reference namespace.
2261 <p class="Pp">Display the author, date, and log message of each backed
2262 up commit, the object ID of the corresponding post-rebase commit,
2263 and the object ID of their common ancestor commit. Given these
2264 object IDs, the <code class="Cm">got log</code> command with the
2265 <code class="Fl">-c</code> and <code class="Fl">-x</code> options
2266 can be used to examine the history of either version of the branch,
2267 and the <code class="Cm">got branch</code> command with the
2268 <code class="Fl">-c</code> option can be used to create a new branch
2269 from a pre-rebase state if desired.</p>
2270 <p class="Pp">If a <var class="Ar">branch</var> is specified, only show
2271 commits which at some point in time represented this branch.
2272 Otherwise, list all backed up commits for any branches.</p>
2273 <p class="Pp">If this option is used, <code class="Cm">got rebase</code>
2274 does not require a work tree. None of the other options can be used
2275 together with <code class="Fl">-l</code>.</p>
2276 </dd>
2277 <dt id="X~4"><a class="permalink" href="#X~4"><code class="Fl">-X</code></a></dt>
2278 <dd>Delete backups created by past rebase operations, represented by
2279 references in the &#x201C;refs/got/backup/rebase&#x201D; reference
2280 namespace.
2281 <p class="Pp">If a <var class="Ar">branch</var> is specified, only
2282 delete backups which at some point in time represented this branch.
2283 Otherwise, delete all references found within
2284 &#x201C;refs/got/backup/rebase&#x201D;.</p>
2285 <p class="Pp">Any commit, tree, tag, and blob objects belonging to
2286 deleted backups remain in the repository and may be removed
2287 separately with Git's garbage collector or <code class="Cm">gotadmin
2288 cleanup</code>.</p>
2289 <p class="Pp">If this option is used, <code class="Cm">got rebase</code>
2290 does not require a work tree. None of the other options can be used
2291 together with <code class="Fl">-X</code>.</p>
2292 </dd>
2293 </dl>
2294 </dd>
2295 <dt id="he"><a class="permalink" href="#histedit"><code class="Cm" id="histedit">histedit</code></a>
2296 [<code class="Fl">-aCcdeflmX</code>] [<code class="Fl">-F</code>
2297 <var class="Ar">histedit-script</var>] [<var class="Ar">branch</var>]</dt>
2298 <dd>
2299 <div class="Bd Bd-indent"><code class="Li">(alias:
2300 <code class="Cm">he</code>)</code></div>
2301 Edit commit history between the work tree's current base commit and the tip
2302 commit of the work tree's current branch.
2303 <p class="Pp">The <code class="Cm">got histedit</code> command requires the
2304 <code class="Ev">GOT_AUTHOR</code> environment variable to be set,
2305 unless an author has been configured in
2306 <a class="Xr" aria-label="got.conf, section 5">got.conf(5)</a> or Git's
2307 <code class="Dv">user.name</code> and <code class="Dv">user.email</code>
2308 configuration settings can be obtained from the repository's
2309 <span class="Pa">.git/config</span> file or from Git's global
2310 <span class="Pa">~/.gitconfig</span> configuration file.</p>
2311 <p class="Pp">Before starting a <code class="Cm">histedit</code> operation,
2312 the work tree's current branch must be set with <code class="Cm">got
2313 update -b</code> to the branch which should be edited, unless this
2314 branch is already the current branch of the work tree. The tip of this
2315 branch represents the upper bound (inclusive) of commits touched by the
2316 <code class="Cm">histedit</code> operation.</p>
2317 <p class="Pp">Furthermore, the work tree's base commit must be set with
2318 <code class="Cm">got update -c</code> to a point in this branch's commit
2319 history where editing should begin. This commit represents the lower
2320 bound (non-inclusive) of commits touched by the
2321 <code class="Cm">histedit</code> operation.</p>
2322 <p class="Pp">Editing of commit history is controlled via a
2323 <var class="Ar">histedit script</var> which can be written in an editor
2324 based on a template, passed on the command line, or generated with the
2325 <code class="Fl">-d</code>, <code class="Fl">-e</code>,
2326 <code class="Fl">-f</code>, or <code class="Fl">-m</code> options.
2327 Quitting the editor without saving the file will abort the histedit
2328 operation.</p>
2329 <p class="Pp">The format of the histedit script is line-based. Each line in
2330 the script begins with a command name, followed by whitespace and an
2331 argument. For most commands, the expected argument is a commit ID SHA1
2332 hash. Any remaining text on the line is ignored. Lines which begin with
2333 the &#x2018;#&#x2019; character are ignored entirely.</p>
2334 <p class="Pp">The available histedit script commands are as follows:</p>
2335 <table class="Bl-column">
2336 <tr id="pick">
2337 <td><a class="permalink" href="#pick"><code class="Cm">pick</code></a>
2338 <var class="Ar">commit</var></td>
2339 <td>Use the specified commit as it is.</td>
2340 </tr>
2341 <tr id="edit">
2342 <td><a class="permalink" href="#edit"><code class="Cm">edit</code></a>
2343 <var class="Ar">commit</var></td>
2344 <td>Apply the changes from the specified commit, but then interrupt the
2345 histedit operation for amending, without creating a commit. While the
2346 histedit operation is interrupted arbitrary files may be edited, and
2347 commands which manipulate the work tree can be used freely. The
2348 <code class="Cm">got add</code> and <code class="Cm">got remove</code>
2349 commands can be used to add new files or remove existing ones. The
2350 <code class="Cm">got revert -p</code> command can be used to eliminate
2351 arbitrary changes from files in the work tree. The
2352 <code class="Cm">got stage -p</code> command may be used to prepare a
2353 subset of changes for inclusion in the next commit. Finally, the
2354 <code class="Cm">got commit</code> command can be used to insert
2355 arbitrary commits into the edited history. Regular editing of history
2356 must eventually be resumed by running <code class="Cm">got histedit
2357 -c</code>.</td>
2358 </tr>
2359 <tr id="fold">
2360 <td><a class="permalink" href="#fold"><code class="Cm">fold</code></a>
2361 <var class="Ar">commit</var></td>
2362 <td>Combine the specified commit with the next commit listed further
2363 below that will be used.</td>
2364 </tr>
2365 <tr id="drop">
2366 <td><a class="permalink" href="#drop"><code class="Cm">drop</code></a>
2367 <var class="Ar">commit</var></td>
2368 <td>Remove this commit from the edited history.</td>
2369 </tr>
2370 <tr id="mesg">
2371 <td><a class="permalink" href="#mesg"><code class="Cm">mesg</code></a>
2372 <var class="Ar">commit</var></td>
2373 <td>Open an editor to create a new log message for this commit.</td>
2374 </tr>
2375 </table>
2376 <p class="Pp">Every commit in the history being edited must be mentioned in
2377 the script. Lines may be re-ordered to change the order of commits in
2378 the edited history. No commit may be listed more than once.</p>
2379 <p class="Pp">Edited commits are accumulated on a temporary branch which the
2380 work tree will remain switched to throughout the entire histedit
2381 operation. Once history editing has completed successfully, the
2382 temporary branch becomes the new version of the work tree's branch and
2383 the work tree is automatically switched to it.</p>
2384 <p class="Pp">Old commits in their pre-histedit state are automatically
2385 backed up in the &#x201C;refs/got/backup/histedit&#x201D; reference
2386 namespace. As long as these references are not removed older versions of
2387 edited commits will remain in the repository and can be viewed with the
2388 <code class="Cm">got histedit -l</code> command. Removal of these
2389 references makes objects which become unreachable via any reference
2390 subject to removal by Git's garbage collector or
2391 <code class="Cm">gotadmin cleanup</code>.</p>
2392 <p class="Pp">While merging commits, show the status of each affected file,
2393 using the following status codes:</p>
2394 <table class="Bl-column">
2395 <tr>
2396 <td>G</td>
2397 <td>file was merged</td>
2398 </tr>
2399 <tr>
2400 <td>C</td>
2401 <td>file was merged and conflicts occurred during merge</td>
2402 </tr>
2403 <tr>
2404 <td>!</td>
2405 <td>changes destined for a missing file were not merged</td>
2406 </tr>
2407 <tr>
2408 <td>D</td>
2409 <td>file was deleted</td>
2410 </tr>
2411 <tr>
2412 <td>d</td>
2413 <td>file's deletion was prevented by local modifications</td>
2414 </tr>
2415 <tr>
2416 <td>A</td>
2417 <td>new file was added</td>
2418 </tr>
2419 <tr>
2420 <td>~</td>
2421 <td>changes destined for a non-regular file were not merged</td>
2422 </tr>
2423 <tr>
2424 <td>?</td>
2425 <td>changes destined for an unversioned file were not merged</td>
2426 </tr>
2427 </table>
2428 <p class="Pp">If merge conflicts occur, the histedit operation is
2429 interrupted and may be continued once conflicts have been resolved. If
2430 any files with destined changes are found to be missing or unversioned,
2431 or if files could not be deleted due to differences in deleted content,
2432 the histedit operation will be interrupted to prevent potentially
2433 incomplete changes from being committed to the repository without user
2434 intervention. The work tree may be modified as desired and the histedit
2435 operation can be continued once the changes present in the work tree are
2436 considered complete. Alternatively, the histedit operation may be
2437 aborted which will leave the work tree switched back to its original
2438 branch.</p>
2439 <p class="Pp">If a merge conflict is resolved in a way which renders the
2440 merged change into a no-op change, the corresponding commit will be
2441 elided when the histedit operation continues.</p>
2442 <p class="Pp"><code class="Cm">got histedit</code> will refuse to run if
2443 certain preconditions are not met. If the work tree's current branch is
2444 not in the &#x201C;refs/heads/&#x201D; reference namespace, the history
2445 of the branch may not be edited. If the work tree contains multiple base
2446 commits, it must first be updated to a single base commit with
2447 <code class="Cm">got update</code>. If changes have been staged with
2448 <code class="Cm">got stage</code>, these changes must first be committed
2449 with <code class="Cm">got commit</code> or unstaged with
2450 <code class="Cm">got unstage</code>. If the work tree contains local
2451 changes, these changes must first be committed with <code class="Cm">got
2452 commit</code> or reverted with <code class="Cm">got revert</code>. If
2453 the edited history contains changes to files outside of the work tree's
2454 path prefix, the work tree cannot be used to edit the history of this
2455 branch.</p>
2456 <p class="Pp">The <code class="Cm">got update</code>, <code class="Cm">got
2457 rebase</code>, <code class="Cm">got merge</code>, and
2458 <code class="Cm">got integrate</code> commands will refuse to run while
2459 a histedit operation is in progress. Other commands which manipulate the
2460 work tree may be used, and the <code class="Cm">got commit</code>
2461 command may be used to commit arbitrary changes to the temporary branch
2462 while the histedit operation is interrupted.</p>
2463 <p class="Pp">The options for <code class="Cm">got histedit</code> are as
2464 follows:</p>
2465 <dl class="Bl-tag">
2466 <dt id="a~6"><a class="permalink" href="#a~6"><code class="Fl">-a</code></a></dt>
2467 <dd>Abort an interrupted histedit operation. If this option is used, no
2468 other command-line arguments are allowed.</dd>
2469 <dt id="C~5"><a class="permalink" href="#C~5"><code class="Fl">-C</code></a></dt>
2470 <dd>Allow a histedit operation to continue with files in conflicted
2471 status. This option should generally be avoided, and can only be used
2472 with the <code class="Fl">-c</code> option.</dd>
2473 <dt id="c~12"><a class="permalink" href="#c~12"><code class="Fl">-c</code></a></dt>
2474 <dd>Continue an interrupted histedit operation. If this option is used, no
2475 other command-line arguments are allowed except
2476 <code class="Fl">-C</code>.</dd>
2477 <dt id="d~7"><a class="permalink" href="#d~7"><code class="Fl">-d</code></a></dt>
2478 <dd>Drop all commits. This option is a quick equivalent to a histedit
2479 script which drops all commits. The <code class="Fl">-d</code> option
2480 can only be used when starting a new histedit operation. If this
2481 option is used, no other command-line arguments are allowed.</dd>
2482 <dt id="e"><a class="permalink" href="#e"><code class="Fl">-e</code></a></dt>
2483 <dd>Interrupt the histedit operation for editing after merging each
2484 commit. This option is a quick equivalent to a histedit script which
2485 uses the <code class="Cm">edit</code> command for all commits. The
2486 <code class="Fl">-e</code> option can only be used when starting a new
2487 histedit operation. If this option is used, no other command-line
2488 arguments are allowed.</dd>
2489 <dt id="F~3"><a class="permalink" href="#F~3"><code class="Fl">-F</code></a>
2490 <var class="Ar">histedit-script</var></dt>
2491 <dd>Use the specified <var class="Ar">histedit-script</var> instead of
2492 opening a temporary file in an editor where a histedit script can be
2493 written.</dd>
2494 <dt id="f~3"><a class="permalink" href="#f~3"><code class="Fl">-f</code></a></dt>
2495 <dd>Fold all commits into a single commit. This option is a quick
2496 equivalent to a histedit script which folds all commits, combining
2497 them all into one commit. The <code class="Fl">-f</code> option can
2498 only be used when starting a new histedit operation. If this option is
2499 used, no other command-line arguments are allowed.</dd>
2500 <dt id="l~10"><a class="permalink" href="#l~10"><code class="Fl">-l</code></a></dt>
2501 <dd>Show a list of past histedit operations, represented by references in
2502 the &#x201C;refs/got/backup/histedit&#x201D; reference namespace.
2503 <p class="Pp">Display the author, date, and log message of each backed
2504 up commit, the object ID of the corresponding post-histedit commit,
2505 and the object ID of their common ancestor commit. Given these
2506 object IDs, the <code class="Cm">got log</code> command with the
2507 <code class="Fl">-c</code> and <code class="Fl">-x</code> options
2508 can be used to examine the history of either version of the branch,
2509 and the <code class="Cm">got branch</code> command with the
2510 <code class="Fl">-c</code> option can be used to create a new branch
2511 from a pre-histedit state if desired.</p>
2512 <p class="Pp">If a <var class="Ar">branch</var> is specified, only show
2513 commits which at some point in time represented this branch.
2514 Otherwise, list all backed up commits for any branches.</p>
2515 <p class="Pp">If this option is used, <code class="Cm">got
2516 histedit</code> does not require a work tree. None of the other
2517 options can be used together with <code class="Fl">-l</code>.</p>
2518 </dd>
2519 <dt id="m~5"><a class="permalink" href="#m~5"><code class="Fl">-m</code></a></dt>
2520 <dd>Edit log messages only. This option is a quick equivalent to a
2521 histedit script which edits only log messages but otherwise leaves
2522 every picked commit as-is. The <code class="Fl">-m</code> option can
2523 only be used when starting a new histedit operation. If this option is
2524 used, no other command-line arguments are allowed.</dd>
2525 <dt id="X~5"><a class="permalink" href="#X~5"><code class="Fl">-X</code></a></dt>
2526 <dd>Delete backups created by past histedit operations, represented by
2527 references in the &#x201C;refs/got/backup/histedit&#x201D; reference
2528 namespace.
2529 <p class="Pp">If a <var class="Ar">branch</var> is specified, only
2530 delete backups which at some point in time represented this branch.
2531 Otherwise, delete all references found within
2532 &#x201C;refs/got/backup/histedit&#x201D;.</p>
2533 <p class="Pp">Any commit, tree, tag, and blob objects belonging to
2534 deleted backups remain in the repository and may be removed
2535 separately with Git's garbage collector or <code class="Cm">gotadmin
2536 cleanup</code>.</p>
2537 <p class="Pp">If this option is used, <code class="Cm">got
2538 histedit</code> does not require a work tree. None of the other
2539 options can be used together with <code class="Fl">-X</code>.</p>
2540 </dd>
2541 </dl>
2542 </dd>
2543 <dt id="ig"><a class="permalink" href="#integrate"><code class="Cm" id="integrate">integrate</code></a>
2544 <var class="Ar">branch</var></dt>
2545 <dd>
2546 <div class="Bd Bd-indent"><code class="Li">(alias:
2547 <code class="Cm">ig</code>)</code></div>
2548 Integrate the specified <var class="Ar">branch</var> into the work tree's
2549 current branch. Files in the work tree are updated to match the contents
2550 on the integrated <var class="Ar">branch</var>, and the reference of the
2551 work tree's branch is changed to point at the head commit of the
2552 integrated <var class="Ar">branch</var>.
2553 <p class="Pp">Both branches can be considered equivalent after integration
2554 since they will be pointing at the same commit. Both branches remain
2555 available for future work, if desired. In case the integrated
2556 <var class="Ar">branch</var> is no longer needed it may be deleted with
2557 <code class="Cm">got branch -d</code>.</p>
2558 <p class="Pp">Show the status of each affected file, using the following
2559 status codes:</p>
2560 <table class="Bl-column">
2561 <tr>
2562 <td>U</td>
2563 <td>file was updated</td>
2564 </tr>
2565 <tr>
2566 <td>D</td>
2567 <td>file was deleted</td>
2568 </tr>
2569 <tr>
2570 <td>A</td>
2571 <td>new file was added</td>
2572 </tr>
2573 <tr>
2574 <td>~</td>
2575 <td>versioned file is obstructed by a non-regular file</td>
2576 </tr>
2577 <tr>
2578 <td>!</td>
2579 <td>a missing versioned file was restored</td>
2580 </tr>
2581 </table>
2582 <p class="Pp"><code class="Cm">got integrate</code> will refuse to run if
2583 certain preconditions are not met. Most importantly, the
2584 <var class="Ar">branch</var> must have been rebased onto the work tree's
2585 current branch with <code class="Cm">got rebase</code> before it can be
2586 integrated, in order to linearize commit history and resolve merge
2587 conflicts. If the work tree contains multiple base commits, it must
2588 first be updated to a single base commit with <code class="Cm">got
2589 update</code>. If changes have been staged with <code class="Cm">got
2590 stage</code>, these changes must first be committed with
2591 <code class="Cm">got commit</code> or unstaged with <code class="Cm">got
2592 unstage</code>. If the work tree contains local changes, these changes
2593 must first be committed with <code class="Cm">got commit</code> or
2594 reverted with <code class="Cm">got revert</code>.</p>
2595 </dd>
2596 <dt id="mg"><a class="permalink" href="#merge"><code class="Cm" id="merge">merge</code></a>
2597 [<code class="Fl">-aCcMn</code>] [<var class="Ar">branch</var>]</dt>
2598 <dd>
2599 <div class="Bd Bd-indent"><code class="Li">(alias:
2600 <code class="Cm">mg</code>)</code></div>
2601 Merge the specified <var class="Ar">branch</var> into the current branch of
2602 the work tree. If the branches have diverged, merge changes into the work
2603 tree and create a merge commit. Otherwise, if the specified
2604 <var class="Ar">branch</var> is already based on the work tree's current
2605 branch, make the work tree's current branch equivalent to the specified
2606 <var class="Ar">branch</var> and update files in the work tree
2607 accordingly.
2608 <p class="Pp">Merge commits are commits based on multiple parent commits.
2609 The tip commit of the work tree's current branch will be used as the
2610 first parent. The tip commit of the specified
2611 <var class="Ar">branch</var> will be used as the second parent. The work
2612 tree's current branch must be in the &#x201C;refs/heads/&#x201D;
2613 reference namespace and can be set with <code class="Cm">got update
2614 -b</code> before starting the <code class="Cm">merge</code>
2615 operation.</p>
2616 <p class="Pp">No ancestral relationship between the two branches is
2617 required. If the two branches have already been merged previously, only
2618 new changes will be merged.</p>
2619 <p class="Pp">It is not possible to create merge commits with more than two
2620 parents. If more than one branch needs to be merged, then multiple merge
2621 commits with two parents each can be created in sequence.</p>
2622 <p class="Pp">If a linear project history is desired, then use of
2623 <code class="Cm">got rebase</code> should generally be preferred over
2624 <code class="Cm">got merge</code>. However, even strictly linear
2625 projects may require occasional merge commits, for example in order to
2626 merge in new versions of third-party code stored on
2627 &#x201C;vendor&#x201D; branches created with <code class="Cm">got
2628 import</code>.</p>
2629 <p class="Pp">While merging changes found on the
2630 <var class="Ar">branch</var> into the work tree, show the status of each
2631 affected file, using the following status codes:</p>
2632 <table class="Bl-column">
2633 <tr>
2634 <td>G</td>
2635 <td>file was merged</td>
2636 </tr>
2637 <tr>
2638 <td>C</td>
2639 <td>file was merged and conflicts occurred during merge</td>
2640 </tr>
2641 <tr>
2642 <td>!</td>
2643 <td>changes destined for a missing file were not merged</td>
2644 </tr>
2645 <tr>
2646 <td>D</td>
2647 <td>file was deleted</td>
2648 </tr>
2649 <tr>
2650 <td>d</td>
2651 <td>file's deletion was prevented by local modifications</td>
2652 </tr>
2653 <tr>
2654 <td>A</td>
2655 <td>new file was added</td>
2656 </tr>
2657 <tr>
2658 <td>~</td>
2659 <td>changes destined for a non-regular file were not merged</td>
2660 </tr>
2661 <tr>
2662 <td>?</td>
2663 <td>changes destined for an unversioned file were not merged</td>
2664 </tr>
2665 </table>
2666 <p class="Pp">If merge conflicts occur, the merge operation is interrupted
2667 and conflicts must be resolved before the merge operation can continue.
2668 If any files with destined changes are found to be missing or
2669 unversioned, or if files could not be deleted due to differences in
2670 deleted content, the merge operation will be interrupted to prevent
2671 potentially incomplete changes from being committed to the repository
2672 without user intervention. The work tree may be modified as desired and
2673 the merge can be continued once the changes present in the work tree are
2674 considered complete. Alternatively, the merge operation may be aborted
2675 which will leave the work tree's current branch unmodified.</p>
2676 <p class="Pp"><code class="Cm">got merge</code> will refuse to run if
2677 certain preconditions are not met. If the work tree's current branch is
2678 not in the &#x201C;refs/heads/&#x201D; reference namespace then the work
2679 tree must first be switched to a branch in the
2680 &#x201C;refs/heads/&#x201D; namespace with <code class="Cm">got update
2681 -b</code>. If the work tree is not yet fully updated to the tip commit
2682 of its branch, then the work tree must first be updated with
2683 <code class="Cm">got update</code>. If the work tree contains multiple
2684 base commits, it must first be updated to a single base commit with
2685 <code class="Cm">got update</code>. If changes have been staged with
2686 <code class="Cm">got stage</code>, these changes must first be committed
2687 with <code class="Cm">got commit</code> or unstaged with
2688 <code class="Cm">got unstage</code>. If the work tree contains local
2689 changes, these changes must first be committed with <code class="Cm">got
2690 commit</code> or reverted with <code class="Cm">got revert</code>. If
2691 the <var class="Ar">branch</var> contains changes to files outside of
2692 the work tree's path prefix, the work tree cannot be used to merge this
2693 branch.</p>
2694 <p class="Pp">The <code class="Cm">got update</code>, <code class="Cm">got
2695 commit</code>, <code class="Cm">got rebase</code>, <code class="Cm">got
2696 histedit</code>, <code class="Cm">got integrate</code>, and
2697 <code class="Cm">got stage</code> commands will refuse to run while a
2698 merge operation is in progress. Other commands which manipulate the work
2699 tree may be used for conflict resolution purposes.</p>
2700 <p class="Pp">The options for <code class="Cm">got merge</code> are as
2701 follows:</p>
2702 <dl class="Bl-tag">
2703 <dt id="a~7"><a class="permalink" href="#a~7"><code class="Fl">-a</code></a></dt>
2704 <dd>Abort an interrupted merge operation. If this option is used, no other
2705 command-line arguments are allowed.</dd>
2706 <dt id="C~6"><a class="permalink" href="#C~6"><code class="Fl">-C</code></a></dt>
2707 <dd>Allow a merge operation to continue with files in conflicted status.
2708 This option should generally be avoided, and can only be used with the
2709 <code class="Fl">-c</code> option.</dd>
2710 <dt id="c~13"><a class="permalink" href="#c~13"><code class="Fl">-c</code></a></dt>
2711 <dd>Continue an interrupted merge operation. If this option is used, no
2712 other command-line arguments are allowed except
2713 <code class="Fl">-C</code>.</dd>
2714 <dt id="M"><a class="permalink" href="#M"><code class="Fl">-M</code></a></dt>
2715 <dd>Create a merge commit even if the branches have not diverged.</dd>
2716 <dt id="n~4"><a class="permalink" href="#n~4"><code class="Fl">-n</code></a></dt>
2717 <dd>Merge changes into the work tree as usual but do not create a merge
2718 commit immediately. The merge result can be adjusted as desired before
2719 a merge commit is created with <code class="Cm">got merge -c</code>.
2720 Alternatively, the merge may be aborted with <code class="Cm">got
2721 merge -a</code>.</dd>
2722 </dl>
2723 </dd>
2724 <dt id="sg"><a class="permalink" href="#stage"><code class="Cm" id="stage">stage</code></a>
2725 [<code class="Fl">-lpRS</code>] [<code class="Fl">-F</code>
2726 <var class="Ar">response-script</var>] [<var class="Ar">path ...</var>]</dt>
2727 <dd>
2728 <div class="Bd Bd-indent"><code class="Li">(alias:
2729 <code class="Cm">sg</code>)</code></div>
2730 Stage local changes for inclusion in the next commit. If no
2731 <var class="Ar">path</var> is specified, stage all changes in the work
2732 tree. Otherwise, stage changes at or within the specified paths. Paths may
2733 be staged if they are added, modified, or deleted according to
2734 <code class="Cm">got status</code>.
2735 <p class="Pp">Show the status of each affected file, using the following
2736 status codes:</p>
2737 <table class="Bl-column">
2738 <tr>
2739 <td>A</td>
2740 <td>file addition has been staged</td>
2741 </tr>
2742 <tr>
2743 <td>M</td>
2744 <td>file modification has been staged</td>
2745 </tr>
2746 <tr>
2747 <td>D</td>
2748 <td>file deletion has been staged</td>
2749 </tr>
2750 </table>
2751 <p class="Pp">Staged file contents are saved in newly created blob objects
2752 in the repository. These blobs will be referred to by tree objects once
2753 staged changes have been committed.</p>
2754 <p class="Pp">Staged changes affect the behaviour of <code class="Cm">got
2755 commit</code>, <code class="Cm">got status</code>, and
2756 <code class="Cm">got diff</code>. While paths with staged changes exist,
2757 the <code class="Cm">got commit</code> command will refuse to commit any
2758 paths which do not have staged changes. Local changes created on top of
2759 staged changes can only be committed if the path is staged again, or if
2760 the staged changes are committed first. The <code class="Cm">got
2761 status</code> command will show both local changes and staged changes.
2762 The <code class="Cm">got diff</code> command is able to display local
2763 changes relative to staged changes, and to display staged changes
2764 relative to the repository. The <code class="Cm">got revert</code>
2765 command cannot revert staged changes but may be used to revert local
2766 changes created on top of staged changes.</p>
2767 <p class="Pp">The options for <code class="Cm">got stage</code> are as
2768 follows:</p>
2769 <dl class="Bl-tag">
2770 <dt id="F~4"><a class="permalink" href="#F~4"><code class="Fl">-F</code></a>
2771 <var class="Ar">response-script</var></dt>
2772 <dd>With the <code class="Fl">-p</code> option, read &#x201C;y&#x201D;,
2773 &#x201C;n&#x201D;, and &#x201C;q&#x201D; responses line-by-line from
2774 the specified <var class="Ar">response-script</var> file instead of
2775 prompting interactively.</dd>
2776 <dt id="l~11"><a class="permalink" href="#l~11"><code class="Fl">-l</code></a></dt>
2777 <dd>Instead of staging new changes, list paths which are already staged,
2778 along with the IDs of staged blob objects and stage status codes. If
2779 paths were provided on the command line, show the staged paths among
2780 the specified paths. Otherwise, show all staged paths.</dd>
2781 <dt id="p~5"><a class="permalink" href="#p~5"><code class="Fl">-p</code></a></dt>
2782 <dd>Instead of staging the entire content of a changed file, interactively
2783 select or reject changes for staging based on &#x201C;y&#x201D; (stage
2784 change), &#x201C;n&#x201D; (reject change), and &#x201C;q&#x201D;
2785 (quit staging this file) responses. If a file is in modified status,
2786 individual patches derived from the modified file content can be
2787 staged. Files in added or deleted status may only be staged or
2788 rejected in their entirety.</dd>
2789 <dt id="R~9"><a class="permalink" href="#R~9"><code class="Fl">-R</code></a></dt>
2790 <dd>Permit recursion into directories. If this option is not specified,
2791 <code class="Cm">got stage</code> will refuse to run if a specified
2792 <var class="Ar">path</var> is a directory.</dd>
2793 <dt id="S~4"><a class="permalink" href="#S~4"><code class="Fl">-S</code></a></dt>
2794 <dd>Allow staging of symbolic links which point outside of the path space
2795 that is under version control. By default, <code class="Cm">got
2796 stage</code> will reject such symbolic links due to safety concerns.
2797 As a precaution, <code class="Nm">got</code> may decide to represent
2798 such a symbolic link as a regular file which contains the link's
2799 target path, rather than creating an actual symbolic link which points
2800 outside of the work tree. Use of this option is discouraged because
2801 external mechanisms such as &#x201C;make obj&#x201D; are better suited
2802 for managing symbolic links to paths not under version control.</dd>
2803 </dl>
2804 <p class="Pp"><code class="Cm">got stage</code> will refuse to run if
2805 certain preconditions are not met. If a file contains merge conflicts,
2806 these conflicts must be resolved first. If a file is found to be out of
2807 date relative to the head commit on the work tree's current branch, the
2808 file must be updated with <code class="Cm">got update</code> before it
2809 can be staged (however, this does not prevent the file from becoming
2810 out-of-date at some point after having been staged).</p>
2811 <p class="Pp">The <code class="Cm">got update</code>, <code class="Cm">got
2812 rebase</code>, <code class="Cm">got merge</code>, and
2813 <code class="Cm">got histedit</code> commands will refuse to run while
2814 staged changes exist. If staged changes cannot be committed because a
2815 staged path is out of date, the path must be unstaged with
2816 <code class="Cm">got unstage</code> before it can be updated with
2817 <code class="Cm">got update</code>, and may then be staged again if
2818 necessary.</p>
2819 </dd>
2820 <dt id="ug"><a class="permalink" href="#unstage"><code class="Cm" id="unstage">unstage</code></a>
2821 [<code class="Fl">-pR</code>] [<code class="Fl">-F</code>
2822 <var class="Ar">response-script</var>] [<var class="Ar">path ...</var>]</dt>
2823 <dd>
2824 <div class="Bd Bd-indent"><code class="Li">(alias:
2825 <code class="Cm">ug</code>)</code></div>
2826 Merge staged changes back into the work tree and put affected paths back
2827 into non-staged status. If no <var class="Ar">path</var> is specified,
2828 unstage all staged changes across the entire work tree. Otherwise, unstage
2829 changes at or within the specified paths.
2830 <p class="Pp">Show the status of each affected file, using the following
2831 status codes:</p>
2832 <table class="Bl-column">
2833 <tr>
2834 <td>G</td>
2835 <td>file was unstaged</td>
2836 </tr>
2837 <tr>
2838 <td>C</td>
2839 <td>file was unstaged and conflicts occurred during merge</td>
2840 </tr>
2841 <tr>
2842 <td>!</td>
2843 <td>changes destined for a missing file were not merged</td>
2844 </tr>
2845 <tr>
2846 <td>D</td>
2847 <td>file was staged as deleted and still is deleted</td>
2848 </tr>
2849 <tr>
2850 <td>d</td>
2851 <td>file's deletion was prevented by local modifications</td>
2852 </tr>
2853 <tr>
2854 <td>~</td>
2855 <td>changes destined for a non-regular file were not merged</td>
2856 </tr>
2857 </table>
2858 <p class="Pp">The options for <code class="Cm">got unstage</code> are as
2859 follows:</p>
2860 <dl class="Bl-tag">
2861 <dt id="F~5"><a class="permalink" href="#F~5"><code class="Fl">-F</code></a>
2862 <var class="Ar">response-script</var></dt>
2863 <dd>With the <code class="Fl">-p</code> option, read &#x201C;y&#x201D;,
2864 &#x201C;n&#x201D;, and &#x201C;q&#x201D; responses line-by-line from
2865 the specified <var class="Ar">response-script</var> file instead of
2866 prompting interactively.</dd>
2867 <dt id="p~6"><a class="permalink" href="#p~6"><code class="Fl">-p</code></a></dt>
2868 <dd>Instead of unstaging the entire content of a changed file,
2869 interactively select or reject changes for unstaging based on
2870 &#x201C;y&#x201D; (unstage change), &#x201C;n&#x201D; (keep change
2871 staged), and &#x201C;q&#x201D; (quit unstaging this file) responses.
2872 If a file is staged in modified status, individual patches derived
2873 from the staged file content can be unstaged. Files staged in added or
2874 deleted status may only be unstaged in their entirety.</dd>
2875 <dt id="R~10"><a class="permalink" href="#R~10"><code class="Fl">-R</code></a></dt>
2876 <dd>Permit recursion into directories. If this option is not specified,
2877 <code class="Cm">got unstage</code> will refuse to run if a specified
2878 <var class="Ar">path</var> is a directory.</dd>
2879 </dl>
2880 </dd>
2881 <dt id="cat"><a class="permalink" href="#cat"><code class="Cm">cat</code></a>
2882 [<code class="Fl">-P</code>] [<code class="Fl">-c</code>
2883 <var class="Ar">commit</var>] [<code class="Fl">-r</code>
2884 <var class="Ar">repository-path</var>] <var class="Ar">arg ...</var></dt>
2885 <dd>Parse and print contents of objects to standard output in a line-based
2886 text format. Content of commit, tree, and tag objects is printed in a way
2887 similar to the actual content stored in such objects. Blob object contents
2888 are printed as they would appear in files on disk.
2889 <p class="Pp">Attempt to interpret each argument as a reference, a tag name,
2890 or an object ID SHA1 hash. References will be resolved to an object ID.
2891 Tag names will resolved to a tag object. An abbreviated hash argument
2892 will be expanded to a full SHA1 hash automatically, provided the
2893 abbreviation is unique.</p>
2894 <p class="Pp">If none of the above interpretations produce a valid result,
2895 or if the <code class="Fl">-P</code> option is used, attempt to
2896 interpret the argument as a path which will be resolved to the ID of an
2897 object found at this path in the repository.</p>
2898 <p class="Pp">The options for <code class="Cm">got cat</code> are as
2899 follows:</p>
2900 <dl class="Bl-tag">
2901 <dt id="c~14"><a class="permalink" href="#c~14"><code class="Fl">-c</code></a>
2902 <var class="Ar">commit</var></dt>
2903 <dd>Look up paths in the specified <var class="Ar">commit</var>. If this
2904 option is not used, paths are looked up in the commit resolved via the
2905 repository's HEAD reference.
2906 <p class="Pp" id="quux:-8">The expected argument is a commit ID SHA1
2907 hash, or a reference name or keyword which will be resolved to a
2908 commit ID. An abbreviated hash argument will be expanded to a full
2909 SHA1 hash automatically, provided the abbreviation is unique. The
2910 keywords &quot;:base&quot; and &quot;:head&quot; resolve to the work
2911 tree's base commit and branch head, respectively. The former is only
2912 valid if invoked in a work tree, while the latter will resolve to
2913 the tip of the work tree's current branch if invoked in a work tree,
2914 otherwise it will resolve to the repository's HEAD reference.
2915 Keywords and references may be appended with &quot;:+&quot; or
2916 &quot;:-&quot; modifiers and an optional integer N to denote the Nth
2917 descendant or antecedent by first parent traversal, respectively;
2918 for example, <b class="Sy">:head:-2</b> denotes the work tree branch
2919 head's 2nd generation ancestor, and <b class="Sy">:base:+4</b>
2920 denotes the 4th generation descendant of the work tree's base
2921 commit. Similarly,
2922 <a class="permalink" href="#quux:-8"><b class="Sy">quux:-8</b></a>
2923 will denote the 8th generation ancestor of the commit resolved by
2924 the &quot;quux&quot; reference. A &quot;:+&quot; or &quot;:-&quot;
2925 modifier without a trailing integer has an implicit &quot;1&quot;
2926 appended (e.g., <b class="Sy">:base:+</b> is equivalent to
2927 <b class="Sy">:base:+1</b>).</p>
2928 </dd>
2929 <dt id="P~3"><a class="permalink" href="#P~3"><code class="Fl">-P</code></a></dt>
2930 <dd>Interpret all arguments as paths only. This option can be used to
2931 resolve ambiguity in cases where paths look like tag names, reference
2932 names, or object IDs.</dd>
2933 <dt id="r~11"><a class="permalink" href="#r~11"><code class="Fl">-r</code></a>
2934 <var class="Ar">repository-path</var></dt>
2935 <dd>Use the repository at the specified path. If not specified, assume the
2936 repository is located at or above the current working directory. If
2937 this directory is a <code class="Nm">got</code> work tree, use the
2938 repository path associated with this work tree.</dd>
2939 </dl>
2940 </dd>
2941 <dt id="info"><a class="permalink" href="#info"><code class="Cm">info</code></a>
2942 [<var class="Ar">path ...</var>]</dt>
2943 <dd>Display meta-data stored in a work tree. See
2944 <a class="Xr" aria-label="got-worktree, section 5">got-worktree(5)</a> for
2945 details.
2946 <p class="Pp">The work tree to use is resolved implicitly by walking upwards
2947 from the current working directory.</p>
2948 <p class="Pp">If one or more <var class="Ar">path</var> arguments are
2949 specified, show additional per-file information for tracked files
2950 located at or within these paths. If a <var class="Ar">path</var>
2951 argument corresponds to the work tree's root directory, display
2952 information for all tracked files.</p>
2953 </dd>
2954 </dl>
2955 </section>
2956 <section class="Sh">
2957 <h2 class="Sh" id="ENVIRONMENT"><a class="permalink" href="#ENVIRONMENT">ENVIRONMENT</a></h2>
2958 <dl class="Bl-tag">
2959 <dt id="GOT_AUTHOR"><a class="permalink" href="#GOT_AUTHOR"><code class="Ev">GOT_AUTHOR</code></a></dt>
2960 <dd>The author's name and email address, such as &quot;<span class="An">Flan
2961 Hacker</span>
2962 &lt;<a class="Mt" href="mailto:flan_hacker@openbsd.org">flan_hacker@openbsd.org</a>&gt;&quot;.
2963 Used by the <code class="Cm">got commit</code>, <code class="Cm">got
2964 import</code>, <code class="Cm">got rebase</code>, <code class="Cm">got
2965 merge</code>, and <code class="Cm">got histedit</code> commands. Because
2966 <a class="Xr" aria-label="git, section 1">git(1)</a> may fail to parse
2967 commits without an email address in author data,
2968 <code class="Nm">got</code> attempts to reject
2969 <code class="Ev">GOT_AUTHOR</code> environment variables with a missing
2970 email address.
2971 <p class="Pp"><code class="Ev">GOT_AUTHOR will be overridden by
2972 configuration settings in</code> <a class="Xr" aria-label="got.conf,
2973 section 5">got.conf(5)</a> or by Git's <code class="Dv">user.name</code>
2974 and <code class="Dv">user.email</code> configuration settings in the
2975 repository's <span class="Pa">.git/config</span> file. The
2976 <code class="Dv">user.name</code> and <code class="Dv">user.email</code>
2977 configuration settings contained in Git's global
2978 <span class="Pa">~/.gitconfig</span> configuration file will only be
2979 used if neither <a class="Xr" aria-label="got.conf, section
2980 5">got.conf(5)</a> nor the <code class="Ev">GOT_AUTHOR</code>
2981 environment variable provide author information.</p>
2982 </dd>
2983 <dt id="GOT_IGNORE_GITCONFIG"><a class="permalink" href="#GOT_IGNORE_GITCONFIG"><code class="Ev">GOT_IGNORE_GITCONFIG</code></a></dt>
2984 <dd>If this variable is set then any remote repository definitions or author
2985 information found in Git configuration files will be ignored.</dd>
2986 <dt id="GOT_LOG_DEFAULT_LIMIT"><a class="permalink" href="#GOT_LOG_DEFAULT_LIMIT"><code class="Ev">GOT_LOG_DEFAULT_LIMIT</code></a></dt>
2987 <dd>The default limit on the number of commits traversed by
2988 <code class="Cm">got log</code>. If set to zero, the limit is unbounded.
2989 This variable will be silently ignored if it is set to a non-numeric
2990 value.</dd>
2991 <dt id="VISUAL"><a class="permalink" href="#VISUAL"><code class="Ev">VISUAL</code></a>,
2992 <code class="Ev">EDITOR</code></dt>
2993 <dd>The editor spawned by <code class="Cm">got commit</code>,
2994 <code class="Cm">got histedit</code>, <code class="Cm">got import</code>,
2995 or <code class="Cm">got tag</code>. If not set, the
2996 <a class="Xr" aria-label="vi, section 1">vi(1)</a> text editor will be
2997 spawned.</dd>
2998 </dl>
2999 </section>
3000 <section class="Sh">
3001 <h2 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h2>
3002 <dl class="Bl-tag Bl-compact">
3003 <dt><span class="Pa">got.conf</span></dt>
3004 <dd>Repository-wide configuration settings for <code class="Nm">got</code>. If
3005 present, a <a class="Xr" aria-label="got.conf, section 5">got.conf(5)</a>
3006 configuration file located in the root directory of a Git repository
3007 supersedes any relevant settings in Git's <span class="Pa">config</span>
3008 file.
3009 <p class="Pp"></p>
3010 </dd>
3011 <dt><span class="Pa">.got/got.conf</span></dt>
3012 <dd>Worktree-specific configuration settings for <code class="Nm">got</code>.
3013 If present, a <a class="Xr" aria-label="got.conf, section
3014 5">got.conf(5)</a> configuration file in the <span class="Pa">.got</span>
3015 meta-data directory of a work tree supersedes any relevant settings in the
3016 repository's <a class="Xr" aria-label="got.conf, section
3017 5">got.conf(5)</a> configuration file and Git's
3018 <span class="Pa">config</span> file.</dd>
3019 </dl>
3020 </section>
3021 <section class="Sh">
3022 <h2 class="Sh" id="EXIT_STATUS"><a class="permalink" href="#EXIT_STATUS">EXIT
3023 STATUS</a></h2>
3024 <p class="Pp">The <code class="Nm">got</code> utility exits&#x00A0;0 on success,
3025 and&#x00A0;&gt;0 if an error occurs.</p>
3026 </section>
3027 <section class="Sh">
3028 <h2 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h2>
3029 <p class="Pp">Enable tab-completion of <code class="Nm">got</code> command names
3030 in <a class="Xr" aria-label="ksh, section 1">ksh(1)</a>:</p>
3031 <p class="Pp"></p>
3032 <div class="Bd Bd-indent"><code class="Li">$ set -A complete_got_1 -- $(got -h
3033 2&gt;&amp;1 | sed -n s/commands://p)</code></div>
3034 <p class="Pp">Clone an existing Git repository for use with
3035 <code class="Nm">got</code>:</p>
3036 <p class="Pp"></p>
3037 <div class="Bd Bd-indent"><code class="Li">$ cd /var/git/</code></div>
3038 <div class="Bd Bd-indent"><code class="Li">$ got clone
3039 ssh://git@github.com/openbsd/src.git</code></div>
3040 <p class="Pp">Unfortunately, many of the popular Git hosting sites do not offer
3041 anonymous access via SSH. Such sites will require an account to be created,
3042 and a public SSH key to be uploaded to this account, before repository
3043 access via ssh:// URLs will work.</p>
3044 <p class="Pp">Most sites offer anonymous repository access via HTTPS:</p>
3045 <p class="Pp"></p>
3046 <div class="Bd Bd-indent"><code class="Li">$ cd /var/git/</code></div>
3047 <div class="Bd Bd-indent"><code class="Li">$ got clone
3048 https://github.com/openbsd/src.git</code></div>
3049 <p class="Pp">Alternatively, for quick and dirty local testing of
3050 <code class="Nm">got</code> a new Git repository could be created and
3051 populated with files, e.g. from a temporary CVS checkout located at
3052 <span class="Pa">/tmp/src</span>:</p>
3053 <p class="Pp"></p>
3054 <div class="Bd Bd-indent"><code class="Li">$ gotadmin init
3055 /var/git/src.git</code></div>
3056 <div class="Bd Bd-indent"><code class="Li">$ got import -r /var/git/src.git -I
3057 CVS -I obj /tmp/src</code></div>
3058 <p class="Pp">Check out a work tree from the Git repository to /usr/src:</p>
3059 <p class="Pp"></p>
3060 <div class="Bd Bd-indent"><code class="Li">$ got checkout /var/git/src.git
3061 /usr/src</code></div>
3062 <p class="Pp">View local changes in a work tree directory:</p>
3063 <p class="Pp"></p>
3064 <div class="Bd Bd-indent"><code class="Li">$ got diff | less</code></div>
3065 <p class="Pp">In a work tree, display files in a potentially problematic
3066 state:</p>
3067 <p class="Pp"></p>
3068 <div class="Bd Bd-indent"><code class="Li">$ got status -s 'C!~?'</code></div>
3069 <p class="Pp">Interactively revert selected local changes in a work tree
3070 directory:</p>
3071 <p class="Pp"></p>
3072 <div class="Bd Bd-indent"><code class="Li">$ got revert -p
3073 -R&#x00A0;.</code></div>
3074 <p class="Pp">In a work tree or a git repository directory, list all branch
3075 references:</p>
3076 <p class="Pp"></p>
3077 <div class="Bd Bd-indent"><code class="Li">$ got branch -l</code></div>
3078 <p class="Pp">As above, but list the most recently modified branches only:</p>
3079 <p class="Pp"></p>
3080 <div class="Bd Bd-indent"><code class="Li">$ got branch -lt | head</code></div>
3081 <p class="Pp">In a work tree or a git repository directory, create a new branch
3082 called &#x201C;unified-buffer-cache&#x201D; which is forked off the
3083 &#x201C;master&#x201D; branch:</p>
3084 <p class="Pp"></p>
3085 <div class="Bd Bd-indent"><code class="Li">$ got branch -c master
3086 unified-buffer-cache</code></div>
3087 <p class="Pp">Switch an existing work tree to the branch
3088 &#x201C;unified-buffer-cache&#x201D;. Local changes in the work tree will be
3089 preserved and merged if necessary:</p>
3090 <p class="Pp"></p>
3091 <div class="Bd Bd-indent"><code class="Li">$ got update -b
3092 unified-buffer-cache</code></div>
3093 <p class="Pp">Create a new commit from local changes in a work tree directory.
3094 This new commit will become the head commit of the work tree's current
3095 branch:</p>
3096 <p class="Pp"></p>
3097 <div class="Bd Bd-indent"><code class="Li">$ got commit</code></div>
3098 <p class="Pp">In a work tree or a git repository directory, view changes
3099 committed in the 3 most recent commits to the work tree's branch, or the
3100 branch resolved via the repository's HEAD reference, respectively:</p>
3101 <p class="Pp"></p>
3102 <div class="Bd Bd-indent"><code class="Li">$ got log -p -l 3</code></div>
3103 <p class="Pp">As above, but display changes in the order in which
3104 <a class="Xr" aria-label="patch, section 1">patch(1)</a> could apply them in
3105 sequence:</p>
3106 <p class="Pp"></p>
3107 <div class="Bd Bd-indent"><code class="Li">$ got log -p -l 3 -R</code></div>
3108 <p class="Pp">In a work tree or a git repository directory, log the history of a
3109 subdirectory:</p>
3110 <p class="Pp"></p>
3111 <div class="Bd Bd-indent"><code class="Li">$ got log sys/uvm</code></div>
3112 <p class="Pp">While operating inside a work tree, paths are specified relative
3113 to the current working directory, so this command will log the subdirectory
3114 <span class="Pa">sys/uvm</span>:</p>
3115 <p class="Pp"></p>
3116 <div class="Bd Bd-indent"><code class="Li">$ cd sys/uvm &amp;&amp; got
3117 log&#x00A0;.</code></div>
3118 <p class="Pp">And this command has the same effect:</p>
3119 <p class="Pp"></p>
3120 <div class="Bd Bd-indent"><code class="Li">$ cd sys/dev/usb &amp;&amp; got log
3121 ../../uvm</code></div>
3122 <p class="Pp">And this command displays work tree meta-data about all tracked
3123 files:</p>
3124 <p class="Pp"></p>
3125 <div class="Bd Bd-indent"><code class="Li">$ cd /usr/src</code></div>
3126 <div class="Bd Bd-indent"><code class="Li">$ got info&#x00A0;. |
3127 less</code></div>
3128 <p class="Pp">Add new files and remove obsolete files in a work tree
3129 directory:</p>
3130 <p class="Pp"></p>
3131 <div class="Bd Bd-indent"><code class="Li">$ got add
3132 sys/uvm/uvm_ubc.c</code></div>
3133 <div class="Bd Bd-indent"><code class="Li">$ got remove
3134 sys/uvm/uvm_vnode.c</code></div>
3135 <p class="Pp">Create a new commit from local changes in a work tree directory
3136 with a pre-defined log message.</p>
3137 <p class="Pp"></p>
3138 <div class="Bd Bd-indent"><code class="Li">$ got commit -m 'unify the buffer
3139 cache'</code></div>
3140 <p class="Pp">Alternatively, create a new commit from local changes in a work
3141 tree directory with a log message that has been prepared in the file
3142 <span class="Pa">/tmp/msg</span>:</p>
3143 <p class="Pp"></p>
3144 <div class="Bd Bd-indent"><code class="Li">$ got commit -F /tmp/msg</code></div>
3145 <p class="Pp">Update any work tree checked out from the
3146 &#x201C;unified-buffer-cache&#x201D; branch to the latest commit on this
3147 branch:</p>
3148 <p class="Pp"></p>
3149 <div class="Bd Bd-indent"><code class="Li">$ got update</code></div>
3150 <p class="Pp">Roll file content on the unified-buffer-cache branch back by one
3151 commit, and then fetch the rolled-back change into the work tree as a local
3152 change to be amended and perhaps committed again:</p>
3153 <p class="Pp"></p>
3154 <div class="Bd Bd-indent"><code class="Li">$ got backout
3155 unified-buffer-cache</code></div>
3156 <div class="Bd Bd-indent"><code class="Li">$ got commit -m 'roll back
3157 previous'</code></div>
3158 <div class="Bd Bd-indent"><code class="Li">$ # now back out the previous backout
3159 :-)</code></div>
3160 <div class="Bd Bd-indent"><code class="Li">$ got backout
3161 unified-buffer-cache</code></div>
3162 <p class="Pp">Fetch new changes on the remote repository's
3163 &#x201C;master&#x201D; branch, making them visible on the local repository's
3164 &#x201C;origin/master&#x201D; branch:</p>
3165 <p class="Pp"></p>
3166 <div class="Bd Bd-indent"><code class="Li">$ cd /usr/src</code></div>
3167 <div class="Bd Bd-indent"><code class="Li">$ got fetch</code></div>
3168 <p class="Pp">Rebase the local &#x201C;master&#x201D; branch to merge the new
3169 changes that are now visible on the &#x201C;origin/master&#x201D;
3170 branch:</p>
3171 <p class="Pp"></p>
3172 <div class="Bd Bd-indent"><code class="Li">$ cd /usr/src</code></div>
3173 <div class="Bd Bd-indent"><code class="Li">$ got update -b
3174 origin/master</code></div>
3175 <div class="Bd Bd-indent"><code class="Li">$ got rebase master</code></div>
3176 <p class="Pp">Rebase the &#x201C;unified-buffer-cache&#x201D; branch on top of
3177 the new head commit of the &#x201C;master&#x201D; branch.</p>
3178 <p class="Pp"></p>
3179 <div class="Bd Bd-indent"><code class="Li">$ got update -b master</code></div>
3180 <div class="Bd Bd-indent"><code class="Li">$ got rebase
3181 unified-buffer-cache</code></div>
3182 <p class="Pp">Create a patch from all changes on the unified-buffer-cache
3183 branch. The patch can be mailed out for review and applied to
3184 <span class="Ux">OpenBSD</span>'s CVS tree:</p>
3185 <p class="Pp"></p>
3186 <div class="Bd Bd-indent"><code class="Li">$ got diff master
3187 unified-buffer-cache &gt; /tmp/ubc.diff</code></div>
3188 <p class="Pp">Edit the entire commit history of the
3189 &#x201C;unified-buffer-cache&#x201D; branch:</p>
3190 <p class="Pp"></p>
3191 <div class="Bd Bd-indent"><code class="Li">$ got update -b
3192 unified-buffer-cache</code></div>
3193 <div class="Bd Bd-indent"><code class="Li">$ got update -c master</code></div>
3194 <div class="Bd Bd-indent"><code class="Li">$ got histedit</code></div>
3195 <p class="Pp">Before working against existing branches in a repository cloned
3196 with <code class="Cm">git clone --bare</code> instead of
3197 <code class="Cm">got clone</code>, a Git &#x201C;refspec&#x201D; must be
3198 configured to map all references in the remote repository into the
3199 &#x201C;refs/remotes&#x201D; namespace of the local repository. This can be
3200 achieved by setting Git's <span class="Pa">remote.origin.fetch</span>
3201 configuration variable to the value
3202 &#x201C;+refs/heads/*:refs/remotes/origin/*&#x201D; with the
3203 <code class="Cm">git config</code> command:</p>
3204 <p class="Pp"></p>
3205 <div class="Bd Bd-indent"><code class="Li">$ cd /var/git/repo</code></div>
3206 <div class="Bd Bd-indent"><code class="Li">$ git config remote.origin.fetch
3207 '+refs/heads/*:refs/remotes/origin/*'</code></div>
3208 <p class="Pp">Additionally, the &#x201C;mirror&#x201D; option must be
3209 disabled:</p>
3210 <p class="Pp"></p>
3211 <div class="Bd Bd-indent"><code class="Li">$ cd /var/git/repo</code></div>
3212 <div class="Bd Bd-indent"><code class="Li">$ git config remote.origin.mirror
3213 false</code></div>
3214 <p class="Pp">Alternatively, the following <a class="Xr" aria-label="git-fetch,
3215 section 1">git-fetch(1)</a> configuration item can be added manually to the
3216 Git repository's <span class="Pa">config</span> file:</p>
3217 <p class="Pp"></p>
3218 <div class="Bd Bd-indent"><code class="Li">[remote
3219 &quot;origin&quot;]</code></div>
3220 <div class="Bd Bd-indent"><code class="Li">url = ...</code></div>
3221 <div class="Bd Bd-indent"><code class="Li">fetch =
3222 +refs/heads/*:refs/remotes/origin/*</code></div>
3223 <div class="Bd Bd-indent"><code class="Li">mirror = false</code></div>
3224 <p class="Pp">This configuration leaves the local repository's
3225 &#x201C;refs/heads&#x201D; namespace free for use by local branches checked
3226 out with <code class="Cm">got checkout</code> and, if needed, created with
3227 <code class="Cm">got branch</code>. Branches in the
3228 &#x201C;refs/remotes/origin&#x201D; namespace can now be updated with
3229 incoming changes from the remote repository with <code class="Cm">got
3230 fetch</code> or <a class="Xr" aria-label="git-fetch, section
3231 1">git-fetch(1)</a> without extra command line arguments. Newly fetched
3232 changes can be examined with <code class="Cm">got log</code>.</p>
3233 <p class="Pp">Display changes on the remote repository's version of the
3234 &#x201C;master&#x201D; branch, as of the last time <code class="Cm">got
3235 fetch</code> was run:</p>
3236 <p class="Pp"></p>
3237 <div class="Bd Bd-indent"><code class="Li">$ got log -c origin/master |
3238 less</code></div>
3239 <p class="Pp">As shown here, most commands accept abbreviated reference names
3240 such as &#x201C;origin/master&#x201D; instead of
3241 &#x201C;refs/remotes/origin/master&#x201D;. The latter is only needed in
3242 case of ambiguity.</p>
3243 <p class="Pp"><code class="Cm">got rebase</code> can be used to merge changes
3244 which are visible on the &#x201C;origin/master&#x201D; branch into the
3245 &#x201C;master&#x201D; branch. This will also merge local changes, if any,
3246 with the incoming changes:</p>
3247 <p class="Pp"></p>
3248 <div class="Bd Bd-indent"><code class="Li">$ got update -b
3249 origin/master</code></div>
3250 <div class="Bd Bd-indent"><code class="Li">$ got rebase master</code></div>
3251 <p class="Pp">In order to make changes committed to the
3252 &#x201C;unified-buffer-cache&#x201D; visible on the &#x201C;master&#x201D;
3253 branch, the &#x201C;unified-buffer-cache&#x201D; branch can be rebased onto
3254 the &#x201C;master&#x201D; branch:</p>
3255 <p class="Pp"></p>
3256 <div class="Bd Bd-indent"><code class="Li">$ got update -b master</code></div>
3257 <div class="Bd Bd-indent"><code class="Li">$ got rebase
3258 unified-buffer-cache</code></div>
3259 <p class="Pp">Changes on the &#x201C;unified-buffer-cache&#x201D; branch can now
3260 be made visible on the &#x201C;master&#x201D; branch with
3261 <code class="Cm">got integrate</code>. Because the rebase operation switched
3262 the work tree to the &#x201C;unified-buffer-cache&#x201D; branch, the work
3263 tree must be switched back to the &#x201C;master&#x201D; branch first:</p>
3264 <p class="Pp"></p>
3265 <div class="Bd Bd-indent"><code class="Li">$ got update -b master</code></div>
3266 <div class="Bd Bd-indent"><code class="Li">$ got integrate
3267 unified-buffer-cache</code></div>
3268 <p class="Pp">On the &#x201C;master&#x201D; branch, log messages for local
3269 changes can now be amended with &#x201C;OK&#x201D; by other developers and
3270 any other important new information:</p>
3271 <p class="Pp"></p>
3272 <div class="Bd Bd-indent"><code class="Li">$ got update -c
3273 origin/master</code></div>
3274 <div class="Bd Bd-indent"><code class="Li">$ got histedit -m</code></div>
3275 <p class="Pp">If the remote repository offers write access, local changes on the
3276 &#x201C;master&#x201D; branch can be sent to the remote repository with
3277 <code class="Cm">got send</code>. Usually, <code class="Cm">got send</code>
3278 can be run without further arguments. The arguments shown here match
3279 defaults, provided the work tree's current branch is the
3280 &#x201C;master&#x201D; branch:</p>
3281 <p class="Pp"></p>
3282 <div class="Bd Bd-indent"><code class="Li">$ got send -b master
3283 origin</code></div>
3284 <p class="Pp">If the remote repository requires the HTTPS protocol, the
3285 <a class="Xr" aria-label="git-push, section 1">git-push(1)</a> command must
3286 be used instead:</p>
3287 <p class="Pp"></p>
3288 <div class="Bd Bd-indent"><code class="Li">$ cd /var/git/src.git</code></div>
3289 <div class="Bd Bd-indent"><code class="Li">$ git push origin master</code></div>
3290 <p class="Pp">When making contributions to projects which use the &#x201C;pull
3291 request&#x201D; workflow, SSH protocol repository access needs to be set up
3292 first. Once an account has been created on a Git hosting site it should be
3293 possible to upload a public SSH key for repository access
3294 authentication.</p>
3295 <p class="Pp">The &#x201C;pull request&#x201D; workflow will usually involve two
3296 remote repositories. In the real-life example below, the
3297 &#x201C;origin&#x201D; repository was forked from the
3298 &#x201C;upstream&#x201D; repository by using the Git hosting site's web
3299 interface. The <a class="Xr" aria-label="got.conf, section
3300 5">got.conf(5)</a> file in the local repository describes both remote
3301 repositories:</p>
3302 <div class="Bd Pp Bd-indent Li">
3303 <pre># Jelmers's repository, which accepts pull requests
3304 remote &quot;upstream&quot; {
3305 server git@github.com
3306 protocol ssh
3307 repository &quot;/jelmer/dulwich&quot;
3308 branch { &quot;master&quot; }
3311 # Stefan's fork, used as the default remote repository
3312 remote &quot;origin&quot; {
3313 server git@github.com
3314 protocol ssh
3315 repository &quot;/stspdotname/dulwich&quot;
3316 branch { &quot;master&quot; }
3317 }</pre>
3318 </div>
3319 <p class="Pp">With this configuration, Stefan can create commits on
3320 &#x201C;refs/heads/master&#x201D; and send them to the
3321 &#x201C;origin&#x201D; repository by running:</p>
3322 <p class="Pp"></p>
3323 <div class="Bd Bd-indent"><code class="Li">$ got send -b master
3324 origin</code></div>
3325 <p class="Pp">The changes can now be proposed to Jelmer by opening a pull
3326 request via the Git hosting site's web interface. If Jelmer requests further
3327 changes to be made, additional commits can be created on the
3328 &#x201C;master&#x201D; branch and be added to the pull request by running
3329 <code class="Cd">got send</code> again.</p>
3330 <p class="Pp">If Jelmer prefers additional commits to be
3331 &#x201C;squashed&#x201D; then the following commands can be used to achieve
3332 this:</p>
3333 <p class="Pp"></p>
3334 <div class="Bd Bd-indent"><code class="Li">$ got update -b master</code></div>
3335 <div class="Bd Bd-indent"><code class="Li">$ got update -c
3336 origin/master</code></div>
3337 <div class="Bd Bd-indent"><code class="Li">$ got histedit -f</code></div>
3338 <div class="Bd Bd-indent"><code class="Li">$ got send -f -b master
3339 origin</code></div>
3340 <p class="Pp">In addition to reviewing the pull request in the web user
3341 interface, Jelmer can fetch the pull request's branch into his local
3342 repository and create a local branch which contains the proposed
3343 changes:</p>
3344 <p class="Pp"></p>
3345 <div class="Bd Bd-indent"><code class="Li">$ got fetch -R refs/pull/1046/head
3346 origin</code></div>
3347 <div class="Bd Bd-indent"><code class="Li">$ got branch -c
3348 refs/remotes/origin/pull/1046/head pr1046</code></div>
3349 <p class="Pp">Once Jelmer has accepted the pull request, Stefan can fetch the
3350 merged changes, and possibly several other new changes, by running:</p>
3351 <p class="Pp"></p>
3352 <div class="Bd Bd-indent"><code class="Li">$ got fetch upstream</code></div>
3353 <p class="Pp">The merged changes will now be visible under the reference
3354 &#x201C;refs/remotes/upstream/master&#x201D;. The local
3355 &#x201C;master&#x201D; branch can now be rebased on top of the latest
3356 changes from upstream:</p>
3357 <p class="Pp"></p>
3358 <div class="Bd Bd-indent"><code class="Li">$ got update -b
3359 upstream/master</code></div>
3360 <div class="Bd Bd-indent"><code class="Li">$ got rebase master</code></div>
3361 <p class="Pp">As an alternative to <code class="Cm">got rebase</code>, branches
3362 can be merged with <code class="Cm">got merge</code>:</p>
3363 <p class="Pp"></p>
3364 <div class="Bd Bd-indent"><code class="Li">$ got update -b master</code></div>
3365 <div class="Bd Bd-indent"><code class="Li">$ got merge
3366 upstream/master</code></div>
3367 <p class="Pp">The question of whether to rebase or merge branches is
3368 philosophical. When in doubt, refer to the software project's policies set
3369 by project maintainers.</p>
3370 <p class="Pp">As a final step, the forked repository's copy of the master branch
3371 needs to be kept in sync by sending the new changes there:</p>
3372 <p class="Pp"></p>
3373 <div class="Bd Bd-indent"><code class="Li">$ got send -f -b master
3374 origin</code></div>
3375 <p class="Pp">If multiple pull requests need to be managed in parallel, a
3376 separate branch must be created for each pull request with
3377 <code class="Cm">got branch</code>. Each such branch can then be used as
3378 above, in place of &#x201C;refs/heads/master&#x201D;. Changes for any
3379 accepted pull requests will still appear under
3380 &#x201C;refs/remotes/upstream/master,&#x201D; regardless of which branch was
3381 used in the forked repository to create a pull request.</p>
3382 </section>
3383 <section class="Sh">
3384 <h2 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
3385 ALSO</a></h2>
3386 <p class="Pp"><a class="Xr" aria-label="gotadmin, section 1">gotadmin(1)</a>,
3387 <a class="Xr" aria-label="tog, section 1">tog(1)</a>,
3388 <a class="Xr" aria-label="git-repository, section 5">git-repository(5)</a>,
3389 <a class="Xr" aria-label="got-worktree, section 5">got-worktree(5)</a>,
3390 <a class="Xr" aria-label="got.conf, section 5">got.conf(5)</a>,
3391 <a class="Xr" aria-label="gotwebd, section 8">gotwebd(8)</a></p>
3392 </section>
3393 <section class="Sh">
3394 <h2 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h2>
3395 <p class="Pp"><span class="An">Anthony J. Bentley</span>
3396 &lt;<a class="Mt" href="mailto:bentley@openbsd.org">bentley@openbsd.org</a>&gt;
3397 <br/>
3398 <span class="An">Christian Weisgerber</span>
3399 &lt;<a class="Mt" href="mailto:naddy@openbsd.org">naddy@openbsd.org</a>&gt;
3400 <br/>
3401 <span class="An">Hiltjo Posthuma</span>
3402 &lt;<a class="Mt" href="mailto:hiltjo@codemadness.org">hiltjo@codemadness.org</a>&gt;
3403 <br/>
3404 <span class="An">Josh Rickmar</span>
3405 &lt;<a class="Mt" href="mailto:jrick@zettaport.com">jrick@zettaport.com</a>&gt;
3406 <br/>
3407 <span class="An">Joshua Stein</span>
3408 &lt;<a class="Mt" href="mailto:jcs@openbsd.org">jcs@openbsd.org</a>&gt;
3409 <br/>
3410 <span class="An">Klemens Nanni</span>
3411 &lt;<a class="Mt" href="mailto:kn@openbsd.org">kn@openbsd.org</a>&gt;
3412 <br/>
3413 <span class="An">Martin Pieuchot</span>
3414 &lt;<a class="Mt" href="mailto:mpi@openbsd.org">mpi@openbsd.org</a>&gt;
3415 <br/>
3416 <span class="An">Neels Hofmeyr</span>
3417 &lt;<a class="Mt" href="mailto:neels@hofmeyr.de">neels@hofmeyr.de</a>&gt;
3418 <br/>
3419 <span class="An">Omar Polo</span>
3420 &lt;<a class="Mt" href="mailto:op@openbsd.org">op@openbsd.org</a>&gt;
3421 <br/>
3422 <span class="An">Ori Bernstein</span>
3423 &lt;<a class="Mt" href="mailto:ori@openbsd.org">ori@openbsd.org</a>&gt;
3424 <br/>
3425 <span class="An">Sebastien Marie</span>
3426 &lt;<a class="Mt" href="mailto:semarie@openbsd.org">semarie@openbsd.org</a>&gt;
3427 <br/>
3428 <span class="An">Stefan Sperling</span>
3429 &lt;<a class="Mt" href="mailto:stsp@openbsd.org">stsp@openbsd.org</a>&gt;
3430 <br/>
3431 <span class="An">Steven McDonald</span>
3432 &lt;<a class="Mt" href="mailto:steven@steven-mcdonald.id.au">steven@steven-mcdonald.id.au</a>&gt;
3433 <br/>
3434 <span class="An">Theo Buehler</span>
3435 &lt;<a class="Mt" href="mailto:tb@openbsd.org">tb@openbsd.org</a>&gt;
3436 <br/>
3437 <span class="An">Thomas Adam</span>
3438 &lt;<a class="Mt" href="mailto:thomas@xteddy.org">thomas@xteddy.org</a>&gt;
3439 <br/>
3440 <span class="An">Tracey Emery</span>
3441 &lt;<a class="Mt" href="mailto:tracey@traceyemery.net">tracey@traceyemery.net</a>&gt;
3442 <br/>
3443 <span class="An">Yang Zhong</span>
3444 &lt;<a class="Mt" href="mailto:yzhong@freebsdfoundation.org">yzhong@freebsdfoundation.org</a>&gt;</p>
3445 <p class="Pp">Parts of <code class="Nm">got</code>,
3446 <a class="Xr" aria-label="tog, section 1">tog(1)</a>, and
3447 <a class="Xr" aria-label="gotwebd, section 8">gotwebd(8)</a> were derived
3448 from code under copyright by:</p>
3449 <p class="Pp">
3450 <br/>
3451 <span class="An">Caldera International</span>
3452 <br/>
3453 <span class="An">Daniel Hartmeier</span>
3454 <br/>
3455 <span class="An">Esben Norby</span>
3456 <br/>
3457 <span class="An">Henning Brauer</span>
3458 <br/>
3459 <span class="An">H&#x00E5;kan Olsson</span>
3460 <br/>
3461 <span class="An">Ingo Schwarze</span>
3462 <br/>
3463 <span class="An">Jean-Francois Brousseau</span>
3464 <br/>
3465 <span class="An">Joris Vink</span>
3466 <br/>
3467 <span class="An">Jyri J. Virkki</span>
3468 <br/>
3469 <span class="An">Larry Wall</span>
3470 <br/>
3471 <span class="An">Markus Friedl</span>
3472 <br/>
3473 <span class="An">Niall O'Higgins</span>
3474 <br/>
3475 <span class="An">Niklas Hallqvist</span>
3476 <br/>
3477 <span class="An">Ray Lai</span>
3478 <br/>
3479 <span class="An">Ryan McBride</span>
3480 <br/>
3481 <span class="An">Theo de Raadt</span>
3482 <br/>
3483 <span class="An">Todd C. Miller</span>
3484 <br/>
3485 <span class="An">Xavier Santolaria</span></p>
3486 <p class="Pp"><code class="Nm">got</code> contains code contributed to the
3487 public domain by
3488 <br/>
3489 <span class="An">Austin Appleby</span>.</p>
3490 </section>
3491 <section class="Sh">
3492 <h2 class="Sh" id="CAVEATS"><a class="permalink" href="#CAVEATS">CAVEATS</a></h2>
3493 <p class="Pp"><code class="Nm">got</code> is a work-in-progress and some
3494 features remain to be implemented.</p>
3495 <p class="Pp">At present, the user has to fall back on
3496 <a class="Xr" aria-label="git, section 1">git(1)</a> to perform some tasks.
3497 In particular:</p>
3498 <ul class="Bl-bullet">
3499 <li>Writing to remote repositories over HTTP or HTTPS protocols requires
3500 <a class="Xr" aria-label="git-push, section 1">git-push(1)</a>.</li>
3501 <li>The creation of merge commits with more than two parent commits requires
3502 <a class="Xr" aria-label="git-merge, section 1">git-merge(1)</a>.</li>
3503 <li>In situations where files or directories were moved around
3504 <code class="Cm">got</code> will not automatically merge changes to new
3505 locations and <a class="Xr" aria-label="git, section 1">git(1)</a> will
3506 usually produce better results.</li>
3507 </ul>
3508 </section>
3509 </main>
3510 <div class="foot" role="doc-pagefooter" aria-label="Manual footer
3511 line"><span class="foot-left"></span><span class="foot-date">April 23,
3512 2024</span> <span class="foot-os">OpenBSD 7.5</span></div>
3513 </body>
3514 </html>