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