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