Blame


1 8797b228 2019-08-04 stsp <!DOCTYPE html>
2 8797b228 2019-08-04 stsp <html>
3 8797b228 2019-08-04 stsp <!-- This is an automatically generated file. Do not edit.
4 8797b228 2019-08-04 stsp Copyright (c) 2017 Martin Pieuchot
5 8b679b4b 2020-02-17 stsp Copyright (c) 2018, 2019, 2020 Stefan Sperling
6 8797b228 2019-08-04 stsp
7 8797b228 2019-08-04 stsp Permission to use, copy, modify, and distribute this software for any
8 8797b228 2019-08-04 stsp purpose with or without fee is hereby granted, provided that the above
9 8797b228 2019-08-04 stsp copyright notice and this permission notice appear in all copies.
10 8797b228 2019-08-04 stsp
11 8797b228 2019-08-04 stsp THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 8797b228 2019-08-04 stsp WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 8797b228 2019-08-04 stsp MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 8797b228 2019-08-04 stsp ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 8797b228 2019-08-04 stsp WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 8797b228 2019-08-04 stsp ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 8797b228 2019-08-04 stsp OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 8797b228 2019-08-04 stsp -->
19 8797b228 2019-08-04 stsp <head>
20 8797b228 2019-08-04 stsp <meta charset="utf-8"/>
21 a954aa0a 2021-06-22 stsp <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
22 5ca479d6 2021-11-21 stsp <link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
23 8797b228 2019-08-04 stsp <title>GOT(1)</title>
24 8797b228 2019-08-04 stsp </head>
25 8797b228 2019-08-04 stsp <body>
26 8797b228 2019-08-04 stsp <table class="head">
27 8797b228 2019-08-04 stsp <tr>
28 8797b228 2019-08-04 stsp <td class="head-ltitle">GOT(1)</td>
29 8797b228 2019-08-04 stsp <td class="head-vol">General Commands Manual</td>
30 8797b228 2019-08-04 stsp <td class="head-rtitle">GOT(1)</td>
31 8797b228 2019-08-04 stsp </tr>
32 8797b228 2019-08-04 stsp </table>
33 8797b228 2019-08-04 stsp <div class="manual-text">
34 8797b228 2019-08-04 stsp <section class="Sh">
35 8797b228 2019-08-04 stsp <h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
36 d8e62599 2019-10-21 stsp <p class="Pp"><code class="Nm">got</code> &#x2014; <span class="Nd">Game of
37 d8e62599 2019-10-21 stsp Trees</span></p>
38 8797b228 2019-08-04 stsp </section>
39 8797b228 2019-08-04 stsp <section class="Sh">
40 8797b228 2019-08-04 stsp <h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
41 8797b228 2019-08-04 stsp <table class="Nm">
42 8797b228 2019-08-04 stsp <tr>
43 8797b228 2019-08-04 stsp <td><code class="Nm">got</code></td>
44 8797b228 2019-08-04 stsp <td><var class="Ar">command</var> [<code class="Fl">-h</code>]
45 8797b228 2019-08-04 stsp [<var class="Ar">arg ...</var>]</td>
46 8797b228 2019-08-04 stsp </tr>
47 8797b228 2019-08-04 stsp </table>
48 8797b228 2019-08-04 stsp </section>
49 8797b228 2019-08-04 stsp <section class="Sh">
50 8797b228 2019-08-04 stsp <h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
51 d8e62599 2019-10-21 stsp <p class="Pp"><code class="Nm">got</code> is a version control system which
52 d8e62599 2019-10-21 stsp stores the history of tracked files in a Git repository, as used by the Git
53 d8e62599 2019-10-21 stsp version control system. This repository format is described in
54 d8e62599 2019-10-21 stsp <a class="Xr">git-repository(5)</a>.</p>
55 8797b228 2019-08-04 stsp <p class="Pp"><code class="Nm">got</code> is a &#x201C;distributed&#x201D;
56 8797b228 2019-08-04 stsp version control system because every copy of a repository is writeable.
57 8797b228 2019-08-04 stsp Modifications made to files can be synchronized between repositories at any
58 8797b228 2019-08-04 stsp time.</p>
59 2dbbbc3a 2020-07-23 stsp <p class="Pp" id="work">Files managed by <code class="Nm">got</code> must be
60 2dbbbc3a 2020-07-23 stsp checked out from the repository for modification. Checked out files are
61 2dbbbc3a 2020-07-23 stsp stored in a <a class="permalink" href="#work"><i class="Em">work
62 2dbbbc3a 2020-07-23 stsp tree</i></a> which can be placed at an arbitrary directory in the filesystem
63 2dbbbc3a 2020-07-23 stsp hierarchy. The on-disk format of this work tree is described in
64 2dbbbc3a 2020-07-23 stsp <a class="Xr">got-worktree(5)</a>.</p>
65 8797b228 2019-08-04 stsp <p class="Pp"><code class="Nm">got</code> provides global and command-specific
66 91b3da3f 2019-08-18 stsp options. Global options must precede the command name, and are as
67 8797b228 2019-08-04 stsp follows:</p>
68 8797b228 2019-08-04 stsp <dl class="Bl-tag">
69 2dbbbc3a 2020-07-23 stsp <dt id="h"><a class="permalink" href="#h"><code class="Fl">-h</code></a></dt>
70 ae520cae 2019-08-05 stsp <dd>Display usage information and exit immediately.</dd>
71 56dd4d48 2021-04-05 stsp <dt id="V"><a class="permalink" href="#V"><code class="Fl">-V</code></a>,
72 8b679b4b 2020-02-17 stsp <code class="Fl">--version</code></dt>
73 8797b228 2019-08-04 stsp <dd>Display program version and exit immediately.</dd>
74 8797b228 2019-08-04 stsp </dl>
75 8797b228 2019-08-04 stsp <p class="Pp">The commands for <code class="Nm">got</code> are as follows:</p>
76 8797b228 2019-08-04 stsp <dl class="Bl-tag">
77 2dbbbc3a 2020-07-23 stsp <dt id="init"><a class="permalink" href="#init"><code class="Cm">init</code></a>
78 8797b228 2019-08-04 stsp <var class="Ar">repository-path</var></dt>
79 8797b228 2019-08-04 stsp <dd>Create a new empty repository at the specified
80 8797b228 2019-08-04 stsp <var class="Ar">repository-path</var>.
81 8797b228 2019-08-04 stsp <p class="Pp">After <code class="Cm">got init</code>, the
82 8797b228 2019-08-04 stsp <code class="Cm">got import</code> command must be used to populate the
83 8797b228 2019-08-04 stsp empty repository before <code class="Cm">got checkout</code> can be
84 8797b228 2019-08-04 stsp used.</p>
85 8797b228 2019-08-04 stsp </dd>
86 63b69821 2021-10-16 stsp <dt id="im"><a class="permalink" href="#import"><code class="Cm" id="import">import</code></a>
87 8797b228 2019-08-04 stsp [<code class="Fl">-b</code> <var class="Ar">branch</var>]
88 8797b228 2019-08-04 stsp [<code class="Fl">-m</code> <var class="Ar">message</var>]
89 8797b228 2019-08-04 stsp [<code class="Fl">-r</code> <var class="Ar">repository-path</var>]
90 8797b228 2019-08-04 stsp [<code class="Fl">-I</code> <var class="Ar">pattern</var>]
91 8797b228 2019-08-04 stsp <var class="Ar">directory</var></dt>
92 63b69821 2021-10-16 stsp <dd>
93 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
94 46043f6f 2021-11-23 stsp <code class="Cm">im</code>)</code></div>
95 46043f6f 2021-11-23 stsp Create an initial commit in a repository from the file hierarchy within the
96 46043f6f 2021-11-23 stsp specified <var class="Ar">directory</var>. The created commit will not
97 8797b228 2019-08-04 stsp have any parent commits, i.e. it will be a root commit. Also create a new
98 8797b228 2019-08-04 stsp reference which provides a branch name for the newly created commit. Show
99 8797b228 2019-08-04 stsp the path of each imported file to indicate progress.
100 8797b228 2019-08-04 stsp <p class="Pp">The <code class="Cm">got import</code> command requires the
101 c2a52be5 2019-09-08 stsp <code class="Ev">GOT_AUTHOR</code> environment variable to be set,
102 feee6923 2020-09-17 stsp unless an author has been configured in <a class="Xr">got.conf(5)</a> or
103 feee6923 2020-09-17 stsp Git's <code class="Dv">user.name</code> and
104 39293a23 2019-09-08 stsp <code class="Dv">user.email</code> configuration settings can be
105 c2a52be5 2019-09-08 stsp obtained from the repository's <span class="Pa">.git/config</span> file
106 c2a52be5 2019-09-08 stsp or from Git's global <span class="Pa">~/.gitconfig</span> configuration
107 c2a52be5 2019-09-08 stsp file.</p>
108 8797b228 2019-08-04 stsp <p class="Pp">The options for <code class="Cm">got import</code> are as
109 8797b228 2019-08-04 stsp follows:</p>
110 8797b228 2019-08-04 stsp <dl class="Bl-tag">
111 2dbbbc3a 2020-07-23 stsp <dt id="b"><a class="permalink" href="#b"><code class="Fl">-b</code></a>
112 8797b228 2019-08-04 stsp <var class="Ar">branch</var></dt>
113 8797b228 2019-08-04 stsp <dd>Create the specified <var class="Ar">branch</var> instead of creating
114 cc85973b 2019-11-27 stsp the default branch &#x201C;main&#x201D;. Use of this option is
115 cc85973b 2019-11-27 stsp required if the &#x201C;main&#x201D; branch already exists.</dd>
116 2dbbbc3a 2020-07-23 stsp <dt id="m"><a class="permalink" href="#m"><code class="Fl">-m</code></a>
117 8797b228 2019-08-04 stsp <var class="Ar">message</var></dt>
118 8797b228 2019-08-04 stsp <dd>Use the specified log message when creating the new commit. Without
119 8797b228 2019-08-04 stsp the <code class="Fl">-m</code> option, <code class="Cm">got
120 8797b228 2019-08-04 stsp import</code> opens a temporary file in an editor where a log message
121 8797b228 2019-08-04 stsp can be written.</dd>
122 2dbbbc3a 2020-07-23 stsp <dt id="r"><a class="permalink" href="#r"><code class="Fl">-r</code></a>
123 8797b228 2019-08-04 stsp <var class="Ar">repository-path</var></dt>
124 8797b228 2019-08-04 stsp <dd>Use the repository at the specified path. If not specified, assume the
125 8797b228 2019-08-04 stsp repository is located at or above the current working directory.</dd>
126 2dbbbc3a 2020-07-23 stsp <dt id="I"><a class="permalink" href="#I"><code class="Fl">-I</code></a>
127 8797b228 2019-08-04 stsp <var class="Ar">pattern</var></dt>
128 8797b228 2019-08-04 stsp <dd>Ignore files or directories with a name which matches the specified
129 8797b228 2019-08-04 stsp <var class="Ar">pattern</var>. This option may be specified multiple
130 8797b228 2019-08-04 stsp times to build a list of ignore patterns. The
131 8797b228 2019-08-04 stsp <var class="Ar">pattern</var> follows the globbing rules documented in
132 8797b228 2019-08-04 stsp <a class="Xr">glob(7)</a>.</dd>
133 8797b228 2019-08-04 stsp </dl>
134 8797b228 2019-08-04 stsp </dd>
135 63b69821 2021-10-16 stsp <dt id="cl"><a class="permalink" href="#clone"><code class="Cm" id="clone">clone</code></a>
136 b213cbf7 2020-03-23 stsp [<code class="Fl">-a</code>] [<code class="Fl">-b</code>
137 b213cbf7 2020-03-23 stsp <var class="Ar">branch</var>] [<code class="Fl">-l</code>]
138 b213cbf7 2020-03-23 stsp [<code class="Fl">-m</code>] [<code class="Fl">-q</code>]
139 b213cbf7 2020-03-23 stsp [<code class="Fl">-v</code>] [<code class="Fl">-R</code>
140 b213cbf7 2020-03-23 stsp <var class="Ar">reference</var>] <var class="Ar">repository-URL</var>
141 b213cbf7 2020-03-23 stsp [<var class="Ar">directory</var>]</dt>
142 63b69821 2021-10-16 stsp <dd>
143 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
144 46043f6f 2021-11-23 stsp <code class="Cm">cl</code>)</code></div>
145 46043f6f 2021-11-23 stsp Clone a Git repository at the specified <var class="Ar">repository-URL</var>
146 46043f6f 2021-11-23 stsp into the specified <var class="Ar">directory</var>. If no
147 46043f6f 2021-11-23 stsp <var class="Ar">directory</var> is specified the directory name will be
148 46043f6f 2021-11-23 stsp derived from the name of the cloned repository. <code class="Cm">got
149 46043f6f 2021-11-23 stsp clone</code> will refuse to run if the <var class="Ar">directory</var>
150 46043f6f 2021-11-23 stsp already exists.
151 b213cbf7 2020-03-23 stsp <p class="Pp">The <var class="Ar">repository-URL</var> specifies a protocol
152 b213cbf7 2020-03-23 stsp scheme, a server hostname, an optional port number separated from the
153 b213cbf7 2020-03-23 stsp hostname by a colon, and a path to the repository on the server:
154 b213cbf7 2020-03-23 stsp <a class="Lk" href="scheme://hostname:port/path/to/repository">scheme://hostname:port/path/to/repository</a></p>
155 b213cbf7 2020-03-23 stsp <p class="Pp">The following protocol schemes are supported:</p>
156 b213cbf7 2020-03-23 stsp <dl class="Bl-tag">
157 b213cbf7 2020-03-23 stsp <dt>git</dt>
158 b213cbf7 2020-03-23 stsp <dd>The Git protocol as implemented by the <a class="Xr">git-daemon(1)</a>
159 b213cbf7 2020-03-23 stsp server. Use of this protocol is discouraged since it supports neither
160 b213cbf7 2020-03-23 stsp authentication nor encryption.</dd>
161 b213cbf7 2020-03-23 stsp <dt>git+ssh</dt>
162 b213cbf7 2020-03-23 stsp <dd>The Git protocol wrapped in an authenticated and encrypted
163 b213cbf7 2020-03-23 stsp <a class="Xr">ssh(1)</a> tunnel. With this protocol the hostname may
164 b213cbf7 2020-03-23 stsp contain an embedded username for <a class="Xr">ssh(1)</a> to use:
165 b213cbf7 2020-03-23 stsp <a class="Mt" href="mailto:user@hostname">user@hostname</a></dd>
166 b213cbf7 2020-03-23 stsp <dt>ssh</dt>
167 b213cbf7 2020-03-23 stsp <dd>Short alias for git+ssh.</dd>
168 b213cbf7 2020-03-23 stsp </dl>
169 b213cbf7 2020-03-23 stsp <p class="Pp">Objects in the cloned repository are stored in a pack file
170 b213cbf7 2020-03-23 stsp which is downloaded from the server. This pack file will then be indexed
171 b213cbf7 2020-03-23 stsp to facilitate access to the objects stored within. If any objects in the
172 b213cbf7 2020-03-23 stsp pack file are stored in deltified form, all deltas will be fully
173 b213cbf7 2020-03-23 stsp resolved in order to compute the ID of such objects. This can take some
174 b213cbf7 2020-03-23 stsp time. More details about the pack file format are documented in
175 b213cbf7 2020-03-23 stsp <a class="Xr">git-repository(5)</a>.</p>
176 b213cbf7 2020-03-23 stsp <p class="Pp"><code class="Cm">got clone</code> creates a remote repository
177 feee6923 2020-09-17 stsp entry in the <a class="Xr">got.conf(5)</a> and
178 feee6923 2020-09-17 stsp <span class="Pa">config</span> files of the cloned repository to store
179 039953c9 2021-03-22 stsp the <var class="Ar">repository-url</var> and any
180 039953c9 2021-03-22 stsp <var class="Ar">branch</var> or <var class="Ar">reference</var>
181 039953c9 2021-03-22 stsp arguments for future use by <code class="Cm">got fetch</code> or
182 039953c9 2021-03-22 stsp <a class="Xr">git-fetch(1)</a>.</p>
183 b213cbf7 2020-03-23 stsp <p class="Pp">The options for <code class="Cm">got clone</code> are as
184 b213cbf7 2020-03-23 stsp follows:</p>
185 b213cbf7 2020-03-23 stsp <dl class="Bl-tag">
186 2dbbbc3a 2020-07-23 stsp <dt id="a"><a class="permalink" href="#a"><code class="Fl">-a</code></a></dt>
187 b213cbf7 2020-03-23 stsp <dd>Fetch all branches from the remote repository's
188 039953c9 2021-03-22 stsp &#x201C;refs/heads/&#x201D; reference namespace and set
189 039953c9 2021-03-22 stsp <code class="Cm">fetch-all-branches</code> in the cloned repository's
190 039953c9 2021-03-22 stsp <a class="Xr">got.conf(5)</a> file for future use by
191 039953c9 2021-03-22 stsp <code class="Cm">got fetch</code>. If this option is not specified, a
192 039953c9 2021-03-22 stsp branch resolved via the remote repository's HEAD reference will be
193 039953c9 2021-03-22 stsp fetched. Cannot be used together with the <code class="Fl">-b</code>
194 039953c9 2021-03-22 stsp option.</dd>
195 2dbbbc3a 2020-07-23 stsp <dt id="b~2"><a class="permalink" href="#b~2"><code class="Fl">-b</code></a>
196 b213cbf7 2020-03-23 stsp <var class="Ar">branch</var></dt>
197 b213cbf7 2020-03-23 stsp <dd>Fetch the specified <var class="Ar">branch</var> from the remote
198 b213cbf7 2020-03-23 stsp repository's &#x201C;refs/heads/&#x201D; reference namespace. This
199 b213cbf7 2020-03-23 stsp option may be specified multiple times to build a list of branches to
200 b213cbf7 2020-03-23 stsp fetch. If the branch corresponding to the remote repository's HEAD
201 b213cbf7 2020-03-23 stsp reference is not in this list, the cloned repository's HEAD reference
202 b213cbf7 2020-03-23 stsp will be set to the first branch which was fetched. If this option is
203 b213cbf7 2020-03-23 stsp not specified, a branch resolved via the remote repository's HEAD
204 b213cbf7 2020-03-23 stsp reference will be fetched. Cannot be used together with the
205 b213cbf7 2020-03-23 stsp <code class="Fl">-a</code> option.</dd>
206 2dbbbc3a 2020-07-23 stsp <dt id="l"><a class="permalink" href="#l"><code class="Fl">-l</code></a></dt>
207 b213cbf7 2020-03-23 stsp <dd>List branches and tags available for fetching from the remote
208 b213cbf7 2020-03-23 stsp repository and exit immediately. Cannot be used together with any of
209 039953c9 2021-03-22 stsp the other options except <code class="Fl">-q</code> and
210 039953c9 2021-03-22 stsp <code class="Fl">-v</code>.</dd>
211 2dbbbc3a 2020-07-23 stsp <dt id="m~2"><a class="permalink" href="#m~2"><code class="Fl">-m</code></a></dt>
212 b213cbf7 2020-03-23 stsp <dd>Create the cloned repository as a mirror of the original repository.
213 b213cbf7 2020-03-23 stsp This is useful if the cloned repository will not be used to store
214 a462773e 2020-04-19 stsp locally created commits.
215 feee6923 2020-09-17 stsp <p class="Pp">The repository's <a class="Xr">got.conf(5)</a> and
216 feee6923 2020-09-17 stsp <span class="Pa">config</span> files will be set up with the
217 feee6923 2020-09-17 stsp &#x201C;mirror&#x201D; option enabled, such that
218 b213cbf7 2020-03-23 stsp <code class="Cm">got fetch</code> or <a class="Xr">git-fetch(1)</a>
219 a462773e 2020-04-19 stsp will write incoming changes directly to branches in the
220 b213cbf7 2020-03-23 stsp &#x201C;refs/heads/&#x201D; reference namespace, rather than to
221 b213cbf7 2020-03-23 stsp branches in the &#x201C;refs/remotes/&#x201D; namespace. This avoids
222 b213cbf7 2020-03-23 stsp the usual requirement of having to run <code class="Cm">got
223 b213cbf7 2020-03-23 stsp rebase</code> after <code class="Cm">got fetch</code> in order to
224 a462773e 2020-04-19 stsp make incoming changes appear on branches in the
225 a462773e 2020-04-19 stsp &#x201C;refs/heads/&#x201D; namespace. But maintaining custom
226 a462773e 2020-04-19 stsp changes in the cloned repository becomes difficult since such
227 b213cbf7 2020-03-23 stsp changes will be at risk of being discarded whenever incoming changes
228 b213cbf7 2020-03-23 stsp are fetched.</p>
229 b213cbf7 2020-03-23 stsp </dd>
230 2dbbbc3a 2020-07-23 stsp <dt id="q"><a class="permalink" href="#q"><code class="Fl">-q</code></a></dt>
231 b213cbf7 2020-03-23 stsp <dd>Suppress progress reporting output. The same option will be passed to
232 b213cbf7 2020-03-23 stsp <a class="Xr">ssh(1)</a> if applicable.</dd>
233 2dbbbc3a 2020-07-23 stsp <dt id="v"><a class="permalink" href="#v"><code class="Fl">-v</code></a></dt>
234 b213cbf7 2020-03-23 stsp <dd>Verbose mode. Causes <code class="Cm">got clone</code> to print
235 b213cbf7 2020-03-23 stsp debugging messages to standard error output. This option will be
236 b213cbf7 2020-03-23 stsp passed to <a class="Xr">ssh(1)</a> if applicable. Multiple -v options
237 b213cbf7 2020-03-23 stsp increase the verbosity. The maximum is 3.</dd>
238 2dbbbc3a 2020-07-23 stsp <dt id="R"><a class="permalink" href="#R"><code class="Fl">-R</code></a>
239 b213cbf7 2020-03-23 stsp <var class="Ar">reference</var></dt>
240 b213cbf7 2020-03-23 stsp <dd>In addition to the branches and tags that will be fetched, fetch an
241 b213cbf7 2020-03-23 stsp arbitrary <var class="Ar">reference</var> from the remote repository's
242 b213cbf7 2020-03-23 stsp &#x201C;refs/&#x201D; namespace. This option may be specified multiple
243 b213cbf7 2020-03-23 stsp times to build a list of additional references to fetch. The specified
244 b213cbf7 2020-03-23 stsp <var class="Ar">reference</var> may either be a path to a specific
245 b213cbf7 2020-03-23 stsp reference, or a reference namespace which will cause all references in
246 b213cbf7 2020-03-23 stsp this namespace to be fetched.
247 b213cbf7 2020-03-23 stsp <p class="Pp">Each reference will be mapped into the cloned repository's
248 b213cbf7 2020-03-23 stsp &#x201C;refs/remotes/&#x201D; namespace, unless the
249 b213cbf7 2020-03-23 stsp <code class="Fl">-m</code> option is used to mirror references
250 b213cbf7 2020-03-23 stsp directly into the cloned repository's &#x201C;refs/&#x201D;
251 b213cbf7 2020-03-23 stsp namespace.</p>
252 b213cbf7 2020-03-23 stsp <p class="Pp"><code class="Cm">got clone</code> will refuse to fetch
253 b213cbf7 2020-03-23 stsp references from the remote repository's
254 b213cbf7 2020-03-23 stsp &#x201C;refs/remotes/&#x201D; or &#x201C;refs/got/&#x201D;
255 b213cbf7 2020-03-23 stsp namespace.</p>
256 b213cbf7 2020-03-23 stsp </dd>
257 b213cbf7 2020-03-23 stsp </dl>
258 b213cbf7 2020-03-23 stsp </dd>
259 63b69821 2021-10-16 stsp <dt id="fe"><a class="permalink" href="#fetch"><code class="Cm" id="fetch">fetch</code></a>
260 b213cbf7 2020-03-23 stsp [<code class="Fl">-a</code>] [<code class="Fl">-b</code>
261 b213cbf7 2020-03-23 stsp <var class="Ar">branch</var>] [<code class="Fl">-d</code>]
262 b213cbf7 2020-03-23 stsp [<code class="Fl">-l</code>] [<code class="Fl">-r</code>
263 b213cbf7 2020-03-23 stsp <var class="Ar">repository-path</var>] [<code class="Fl">-t</code>]
264 b213cbf7 2020-03-23 stsp [<code class="Fl">-q</code>] [<code class="Fl">-v</code>]
265 b213cbf7 2020-03-23 stsp [<code class="Fl">-R</code> <var class="Ar">reference</var>]
266 16cd1323 2021-07-26 stsp [<code class="Fl">-X</code>] [<var class="Ar">remote-repository</var>]</dt>
267 63b69821 2021-10-16 stsp <dd>
268 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
269 46043f6f 2021-11-23 stsp <code class="Cm">fe</code>)</code></div>
270 46043f6f 2021-11-23 stsp Fetch new changes from a remote repository. If no
271 b213cbf7 2020-03-23 stsp <var class="Ar">remote-repository</var> is specified,
272 b213cbf7 2020-03-23 stsp &#x201C;origin&#x201D; will be used. The remote repository's URL is
273 feee6923 2020-09-17 stsp obtained from the corresponding entry in <a class="Xr">got.conf(5)</a> or
274 feee6923 2020-09-17 stsp Git's <span class="Pa">config</span> file of the local repository, as
275 feee6923 2020-09-17 stsp created by <code class="Cm">got clone</code>.
276 b213cbf7 2020-03-23 stsp <p class="Pp">New changes will be stored in a separate pack file downloaded
277 b213cbf7 2020-03-23 stsp from the server. Optionally, separate pack files stored in the
278 b213cbf7 2020-03-23 stsp repository can be combined with <a class="Xr">git-repack(1)</a>.</p>
279 b213cbf7 2020-03-23 stsp <p class="Pp">By default, branch references in the
280 b213cbf7 2020-03-23 stsp &#x201C;refs/remotes/&#x201D; reference namespace will be updated to
281 b213cbf7 2020-03-23 stsp point at the newly fetched commits. The <code class="Cm">got
282 b213cbf7 2020-03-23 stsp rebase</code> command can then be used to make new changes visible on
283 a462773e 2020-04-19 stsp branches in the &#x201C;refs/heads/&#x201D; namespace, merging incoming
284 a462773e 2020-04-19 stsp changes with the changes on those branches as necessary.</p>
285 b213cbf7 2020-03-23 stsp <p class="Pp">If the repository was created as a mirror with
286 b213cbf7 2020-03-23 stsp <code class="Cm">got clone -m</code> then all branches in the
287 b213cbf7 2020-03-23 stsp &#x201C;refs/heads/&#x201D; namespace will be updated directly to match
288 b213cbf7 2020-03-23 stsp the corresponding branches in the remote repository. If those branches
289 b213cbf7 2020-03-23 stsp contained local commits, these commits will no longer be reachable via a
290 b213cbf7 2020-03-23 stsp reference and will therefore be at risk of being discarded by Git's
291 16cd1323 2021-07-26 stsp garbage collector or <code class="Cm">gotadmin cleanup</code>.
292 16cd1323 2021-07-26 stsp Maintaining custom changes in a mirror repository is therefore
293 16cd1323 2021-07-26 stsp discouraged.</p>
294 b213cbf7 2020-03-23 stsp <p class="Pp">In any case, references in the &#x201C;refs/tags/&#x201D;
295 b213cbf7 2020-03-23 stsp namespace will always be fetched and mapped directly to local references
296 b213cbf7 2020-03-23 stsp in the same namespace.</p>
297 b213cbf7 2020-03-23 stsp <p class="Pp">The options for <code class="Cm">got fetch</code> are as
298 b213cbf7 2020-03-23 stsp follows:</p>
299 b213cbf7 2020-03-23 stsp <dl class="Bl-tag">
300 2dbbbc3a 2020-07-23 stsp <dt id="a~2"><a class="permalink" href="#a~2"><code class="Fl">-a</code></a></dt>
301 b213cbf7 2020-03-23 stsp <dd>Fetch all branches from the remote repository's
302 039953c9 2021-03-22 stsp &#x201C;refs/heads/&#x201D; reference namespace. This option can be
303 039953c9 2021-03-22 stsp enabled by default for specific repositories in
304 039953c9 2021-03-22 stsp <a class="Xr">got.conf(5)</a>. If this option is not specified, a
305 039953c9 2021-03-22 stsp branch resolved via the remote repository's HEAD reference will be
306 039953c9 2021-03-22 stsp fetched. Cannot be used together with the <code class="Fl">-b</code>
307 039953c9 2021-03-22 stsp option.</dd>
308 2dbbbc3a 2020-07-23 stsp <dt id="b~3"><a class="permalink" href="#b~3"><code class="Fl">-b</code></a>
309 b213cbf7 2020-03-23 stsp <var class="Ar">branch</var></dt>
310 b213cbf7 2020-03-23 stsp <dd>Fetch the specified <var class="Ar">branch</var> from the remote
311 b213cbf7 2020-03-23 stsp repository's &#x201C;refs/heads/&#x201D; reference namespace. This
312 b213cbf7 2020-03-23 stsp option may be specified multiple times to build a list of branches to
313 b213cbf7 2020-03-23 stsp fetch. If this option is not specified, a branch resolved via the
314 b213cbf7 2020-03-23 stsp remote repository's HEAD reference will be fetched. Cannot be used
315 b213cbf7 2020-03-23 stsp together with the <code class="Fl">-a</code> option.</dd>
316 2dbbbc3a 2020-07-23 stsp <dt id="d"><a class="permalink" href="#d"><code class="Fl">-d</code></a></dt>
317 b213cbf7 2020-03-23 stsp <dd>Delete branches and tags from the local repository which are no longer
318 b213cbf7 2020-03-23 stsp present in the remote repository. Only references are deleted. Any
319 b213cbf7 2020-03-23 stsp commit, tree, tag, and blob objects belonging to deleted branches or
320 b213cbf7 2020-03-23 stsp tags remain in the repository and may be removed separately with Git's
321 16cd1323 2021-07-26 stsp garbage collector or <code class="Cm">gotadmin cleanup</code>.</dd>
322 2dbbbc3a 2020-07-23 stsp <dt id="l~2"><a class="permalink" href="#l~2"><code class="Fl">-l</code></a></dt>
323 b213cbf7 2020-03-23 stsp <dd>List branches and tags available for fetching from the remote
324 b213cbf7 2020-03-23 stsp repository and exit immediately. Cannot be used together with any of
325 039953c9 2021-03-22 stsp the other options except <code class="Fl">-v</code>,
326 039953c9 2021-03-22 stsp <code class="Fl">-q</code>, and <code class="Fl">-r</code>.</dd>
327 2dbbbc3a 2020-07-23 stsp <dt id="t"><a class="permalink" href="#t"><code class="Fl">-t</code></a></dt>
328 b213cbf7 2020-03-23 stsp <dd>Allow existing references in the &#x201C;refs/tags&#x201D; namespace
329 b213cbf7 2020-03-23 stsp to be updated if they have changed on the server. If not specified,
330 b213cbf7 2020-03-23 stsp only new tag references will be created.</dd>
331 2dbbbc3a 2020-07-23 stsp <dt id="r~2"><a class="permalink" href="#r~2"><code class="Fl">-r</code></a>
332 b213cbf7 2020-03-23 stsp <var class="Ar">repository-path</var></dt>
333 b213cbf7 2020-03-23 stsp <dd>Use the repository at the specified path. If not specified, assume the
334 b213cbf7 2020-03-23 stsp repository is located at or above the current working directory. If
335 b213cbf7 2020-03-23 stsp this directory is a <code class="Nm">got</code> work tree, use the
336 b213cbf7 2020-03-23 stsp repository path associated with this work tree.</dd>
337 2dbbbc3a 2020-07-23 stsp <dt id="q~2"><a class="permalink" href="#q~2"><code class="Fl">-q</code></a></dt>
338 b213cbf7 2020-03-23 stsp <dd>Suppress progress reporting output. The same option will be passed to
339 b213cbf7 2020-03-23 stsp <a class="Xr">ssh(1)</a> if applicable.</dd>
340 2dbbbc3a 2020-07-23 stsp <dt id="v~2"><a class="permalink" href="#v~2"><code class="Fl">-v</code></a></dt>
341 b213cbf7 2020-03-23 stsp <dd>Verbose mode. Causes <code class="Cm">got fetch</code> to print
342 b213cbf7 2020-03-23 stsp debugging messages to standard error output. The same option will be
343 b213cbf7 2020-03-23 stsp passed to <a class="Xr">ssh(1)</a> if applicable. Multiple -v options
344 b213cbf7 2020-03-23 stsp increase the verbosity. The maximum is 3.</dd>
345 2dbbbc3a 2020-07-23 stsp <dt id="R~2"><a class="permalink" href="#R~2"><code class="Fl">-R</code></a>
346 b213cbf7 2020-03-23 stsp <var class="Ar">reference</var></dt>
347 b213cbf7 2020-03-23 stsp <dd>In addition to the branches and tags that will be fetched, fetch an
348 b213cbf7 2020-03-23 stsp arbitrary <var class="Ar">reference</var> from the remote repository's
349 b213cbf7 2020-03-23 stsp &#x201C;refs/&#x201D; namespace. This option may be specified multiple
350 b213cbf7 2020-03-23 stsp times to build a list of additional references to fetch. The specified
351 b213cbf7 2020-03-23 stsp <var class="Ar">reference</var> may either be a path to a specific
352 b213cbf7 2020-03-23 stsp reference, or a reference namespace which will cause all references in
353 b213cbf7 2020-03-23 stsp this namespace to be fetched.
354 b213cbf7 2020-03-23 stsp <p class="Pp">Each reference will be mapped into the local repository's
355 b213cbf7 2020-03-23 stsp &#x201C;refs/remotes/&#x201D; namespace, unless the local repository
356 b213cbf7 2020-03-23 stsp was created as a mirror with <code class="Cm">got clone -m</code> in
357 b213cbf7 2020-03-23 stsp which case references will be mapped directly into the local
358 b213cbf7 2020-03-23 stsp repository's &#x201C;refs/&#x201D; namespace.</p>
359 a462773e 2020-04-19 stsp <p class="Pp">Once a reference has been fetched, a branch based on it
360 a462773e 2020-04-19 stsp can be created with <code class="Cm">got branch</code> if
361 b213cbf7 2020-03-23 stsp needed.</p>
362 b213cbf7 2020-03-23 stsp <p class="Pp"><code class="Cm">got fetch</code> will refuse to fetch
363 b213cbf7 2020-03-23 stsp references from the remote repository's
364 b213cbf7 2020-03-23 stsp &#x201C;refs/remotes/&#x201D; or &#x201C;refs/got/&#x201D;
365 b213cbf7 2020-03-23 stsp namespace.</p>
366 16cd1323 2021-07-26 stsp </dd>
367 16cd1323 2021-07-26 stsp <dt id="X"><a class="permalink" href="#X"><code class="Fl">-X</code></a></dt>
368 16cd1323 2021-07-26 stsp <dd>Delete all references which correspond to a particular
369 16cd1323 2021-07-26 stsp <var class="Ar">remote-repository</var> instead of fetching new
370 16cd1323 2021-07-26 stsp changes. This can be useful when a remote repository is being removed
371 16cd1323 2021-07-26 stsp from <a class="Xr">got.conf(5)</a>.
372 16cd1323 2021-07-26 stsp <p class="Pp">With <code class="Fl">-X</code>, the
373 16cd1323 2021-07-26 stsp <var class="Ar">remote-repository</var> argument is mandatory and no
374 16cd1323 2021-07-26 stsp other options except <code class="Fl">-r</code>,
375 16cd1323 2021-07-26 stsp <code class="Fl">-v</code>, and <code class="Fl">-q</code> are
376 16cd1323 2021-07-26 stsp allowed.</p>
377 16cd1323 2021-07-26 stsp <p class="Pp">Only references are deleted. Any commit, tree, tag, and
378 16cd1323 2021-07-26 stsp blob objects fetched from a remote repository will generally be
379 16cd1323 2021-07-26 stsp stored in pack files and may be removed separately with
380 16cd1323 2021-07-26 stsp <a class="Xr">git-repack(1)</a> and Git's garbage collector.</p>
381 b213cbf7 2020-03-23 stsp </dd>
382 b213cbf7 2020-03-23 stsp </dl>
383 b213cbf7 2020-03-23 stsp </dd>
384 63b69821 2021-10-16 stsp <dt id="co"><a class="permalink" href="#checkout"><code class="Cm" id="checkout">checkout</code></a>
385 8b679b4b 2020-02-17 stsp [<code class="Fl">-E</code>] [<code class="Fl">-b</code>
386 8b679b4b 2020-02-17 stsp <var class="Ar">branch</var>] [<code class="Fl">-c</code>
387 8b679b4b 2020-02-17 stsp <var class="Ar">commit</var>] [<code class="Fl">-p</code>
388 4448c231 2021-09-15 stsp <var class="Ar">path-prefix</var>] [<code class="Fl">-q</code>]
389 4448c231 2021-09-15 stsp <var class="Ar">repository-path</var>
390 8797b228 2019-08-04 stsp [<var class="Ar">work-tree-path</var>]</dt>
391 63b69821 2021-10-16 stsp <dd>
392 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
393 46043f6f 2021-11-23 stsp <code class="Cm">co</code>)</code></div>
394 46043f6f 2021-11-23 stsp Copy files from a repository into a new work tree. Show the status of each
395 8b679b4b 2020-02-17 stsp affected file, using the following status codes:
396 8b679b4b 2020-02-17 stsp <table class="Bl-column">
397 8b679b4b 2020-02-17 stsp <tr>
398 8b679b4b 2020-02-17 stsp <td>A</td>
399 8b679b4b 2020-02-17 stsp <td>new file was added</td>
400 8b679b4b 2020-02-17 stsp </tr>
401 8b679b4b 2020-02-17 stsp <tr>
402 8b679b4b 2020-02-17 stsp <td>E</td>
403 8b679b4b 2020-02-17 stsp <td>file already exists in work tree's meta-data</td>
404 8b679b4b 2020-02-17 stsp </tr>
405 8b679b4b 2020-02-17 stsp </table>
406 8b679b4b 2020-02-17 stsp <p class="Pp">If the <var class="Ar">work tree path</var> is not specified,
407 8b679b4b 2020-02-17 stsp either use the last component of <var class="Ar">repository path</var>,
408 8b679b4b 2020-02-17 stsp or if a <var class="Ar">path prefix</var> was specified use the last
409 8b679b4b 2020-02-17 stsp component of <var class="Ar">path prefix</var>.</p>
410 8797b228 2019-08-04 stsp <p class="Pp">The options for <code class="Cm">got checkout</code> are as
411 8797b228 2019-08-04 stsp follows:</p>
412 8797b228 2019-08-04 stsp <dl class="Bl-tag">
413 2dbbbc3a 2020-07-23 stsp <dt id="E"><a class="permalink" href="#E"><code class="Fl">-E</code></a></dt>
414 8b679b4b 2020-02-17 stsp <dd>Proceed with the checkout operation even if the directory at
415 8b679b4b 2020-02-17 stsp <var class="Ar">work-tree-path</var> is not empty. Existing files will
416 8b679b4b 2020-02-17 stsp be left intact.</dd>
417 2dbbbc3a 2020-07-23 stsp <dt id="b~4"><a class="permalink" href="#b~4"><code class="Fl">-b</code></a>
418 8797b228 2019-08-04 stsp <var class="Ar">branch</var></dt>
419 8797b228 2019-08-04 stsp <dd>Check out files from a commit on the specified
420 8797b228 2019-08-04 stsp <var class="Ar">branch</var>. If this option is not specified, a
421 8797b228 2019-08-04 stsp branch resolved via the repository's HEAD reference will be used.</dd>
422 2dbbbc3a 2020-07-23 stsp <dt id="c"><a class="permalink" href="#c"><code class="Fl">-c</code></a>
423 8797b228 2019-08-04 stsp <var class="Ar">commit</var></dt>
424 8797b228 2019-08-04 stsp <dd>Check out files from the specified <var class="Ar">commit</var> on the
425 8797b228 2019-08-04 stsp selected branch. The expected argument is a commit ID SHA1 hash or an
426 97e00196 2019-08-09 stsp existing reference or tag name which will be resolved to a commit ID.
427 97e00196 2019-08-09 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
428 8797b228 2019-08-04 stsp automatically, provided the abbreviation is unique. If this option is
429 8797b228 2019-08-04 stsp not specified, the most recent commit on the selected branch will be
430 ae803b74 2020-03-06 stsp used.
431 ae803b74 2020-03-06 stsp <p class="Pp">If the specified <var class="Ar">commit</var> is not
432 ae803b74 2020-03-06 stsp contained in the selected branch, a different branch which contains
433 ae803b74 2020-03-06 stsp this commit must be specified with the <code class="Fl">-b</code>
434 ae803b74 2020-03-06 stsp option. If no such branch is known a new branch must be created for
435 ae803b74 2020-03-06 stsp this commit with <code class="Cm">got branch</code> before
436 ae803b74 2020-03-06 stsp <code class="Cm">got checkout</code> can be used. Checking out work
437 ae803b74 2020-03-06 stsp trees with an unknown branch is intentionally not supported.</p>
438 ae803b74 2020-03-06 stsp </dd>
439 2dbbbc3a 2020-07-23 stsp <dt id="p"><a class="permalink" href="#p"><code class="Fl">-p</code></a>
440 8797b228 2019-08-04 stsp <var class="Ar">path-prefix</var></dt>
441 8797b228 2019-08-04 stsp <dd>Restrict the work tree to a subset of the repository's tree hierarchy.
442 8797b228 2019-08-04 stsp Only files beneath the specified <var class="Ar">path-prefix</var>
443 8797b228 2019-08-04 stsp will be checked out.</dd>
444 4448c231 2021-09-15 stsp <dt id="q~3"><a class="permalink" href="#q~3"><code class="Fl">-q</code></a></dt>
445 4448c231 2021-09-15 stsp <dd>Silence progress output.</dd>
446 8797b228 2019-08-04 stsp </dl>
447 8797b228 2019-08-04 stsp </dd>
448 63b69821 2021-10-16 stsp <dt id="up"><a class="permalink" href="#update"><code class="Cm" id="update">update</code></a>
449 8797b228 2019-08-04 stsp [<code class="Fl">-b</code> <var class="Ar">branch</var>]
450 8797b228 2019-08-04 stsp [<code class="Fl">-c</code> <var class="Ar">commit</var>]
451 4448c231 2021-09-15 stsp [<code class="Fl">-q</code>] [<var class="Ar">path ...</var>]</dt>
452 63b69821 2021-10-16 stsp <dd>
453 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
454 46043f6f 2021-11-23 stsp <code class="Cm">up</code>)</code></div>
455 46043f6f 2021-11-23 stsp Update an existing work tree to a different <var class="Ar">commit</var>.
456 9e67ab87 2020-04-14 stsp Change existing files in the work tree as necessary to match file contents
457 9e67ab87 2020-04-14 stsp of this commit. Preserve any local changes in the work tree and merge them
458 9e67ab87 2020-04-14 stsp with the incoming changes.
459 a462773e 2020-04-19 stsp <p class="Pp">Files which already contain merge conflicts will not be
460 a462773e 2020-04-19 stsp updated to avoid further complications. Such files will be updated when
461 a462773e 2020-04-19 stsp <code class="Cm">got update</code> is run again after merge conflicts
462 a462773e 2020-04-19 stsp have been resolved. If the conflicting changes are no longer needed
463 a462773e 2020-04-19 stsp affected files can be reverted with <code class="Cm">got revert</code>
464 a462773e 2020-04-19 stsp before running <code class="Cm">got update</code> again.</p>
465 9e67ab87 2020-04-14 stsp <p class="Pp">Show the status of each affected file, using the following
466 9e67ab87 2020-04-14 stsp status codes:</p>
467 8797b228 2019-08-04 stsp <table class="Bl-column">
468 8797b228 2019-08-04 stsp <tr>
469 8797b228 2019-08-04 stsp <td>U</td>
470 8797b228 2019-08-04 stsp <td>file was updated and contained no local changes</td>
471 8797b228 2019-08-04 stsp </tr>
472 8797b228 2019-08-04 stsp <tr>
473 8797b228 2019-08-04 stsp <td>G</td>
474 8797b228 2019-08-04 stsp <td>file was updated and local changes were merged cleanly</td>
475 8797b228 2019-08-04 stsp </tr>
476 8797b228 2019-08-04 stsp <tr>
477 8797b228 2019-08-04 stsp <td>C</td>
478 8797b228 2019-08-04 stsp <td>file was updated and conflicts occurred during merge</td>
479 8797b228 2019-08-04 stsp </tr>
480 8797b228 2019-08-04 stsp <tr>
481 8797b228 2019-08-04 stsp <td>D</td>
482 8797b228 2019-08-04 stsp <td>file was deleted</td>
483 8797b228 2019-08-04 stsp </tr>
484 8797b228 2019-08-04 stsp <tr>
485 8797b228 2019-08-04 stsp <td>A</td>
486 8797b228 2019-08-04 stsp <td>new file was added</td>
487 8797b228 2019-08-04 stsp </tr>
488 8797b228 2019-08-04 stsp <tr>
489 8797b228 2019-08-04 stsp <td>~</td>
490 8797b228 2019-08-04 stsp <td>versioned file is obstructed by a non-regular file</td>
491 8797b228 2019-08-04 stsp </tr>
492 8797b228 2019-08-04 stsp <tr>
493 8797b228 2019-08-04 stsp <td>!</td>
494 8797b228 2019-08-04 stsp <td>a missing versioned file was restored</td>
495 a462773e 2020-04-19 stsp </tr>
496 a462773e 2020-04-19 stsp <tr>
497 a462773e 2020-04-19 stsp <td>#</td>
498 a462773e 2020-04-19 stsp <td>file was not updated because it contains merge conflicts</td>
499 8797b228 2019-08-04 stsp </tr>
500 1554b334 2020-08-02 stsp <tr>
501 1554b334 2020-08-02 stsp <td>?</td>
502 1554b334 2020-08-02 stsp <td>changes destined for an unversioned file were not merged</td>
503 1554b334 2020-08-02 stsp </tr>
504 8797b228 2019-08-04 stsp </table>
505 8797b228 2019-08-04 stsp <p class="Pp">If no <var class="Ar">path</var> is specified, update the
506 8797b228 2019-08-04 stsp entire work tree. Otherwise, restrict the update operation to files at
507 8797b228 2019-08-04 stsp or within the specified paths. Each path is required to exist in the
508 8797b228 2019-08-04 stsp update operation's target commit. Files in the work tree outside
509 8797b228 2019-08-04 stsp specified paths will remain unchanged and will retain their previously
510 8797b228 2019-08-04 stsp recorded base commit. Some <code class="Nm">got</code> commands may
511 8797b228 2019-08-04 stsp refuse to run while the work tree contains files from multiple base
512 8797b228 2019-08-04 stsp commits. The base commit of such a work tree can be made consistent by
513 8797b228 2019-08-04 stsp running <code class="Cm">got update</code> across the entire work tree.
514 8797b228 2019-08-04 stsp Specifying a <var class="Ar">path</var> is incompatible with the
515 8797b228 2019-08-04 stsp <code class="Fl">-b</code> option.</p>
516 8797b228 2019-08-04 stsp <p class="Pp"><code class="Cm">got update</code> cannot update paths with
517 8797b228 2019-08-04 stsp staged changes. If changes have been staged with <code class="Cm">got
518 91b3da3f 2019-08-18 stsp stage</code>, these changes must first be committed with
519 8797b228 2019-08-04 stsp <code class="Cm">got commit</code> or unstaged with <code class="Cm">got
520 8797b228 2019-08-04 stsp unstage</code>.</p>
521 8797b228 2019-08-04 stsp <p class="Pp">The options for <code class="Cm">got update</code> are as
522 8797b228 2019-08-04 stsp follows:</p>
523 8797b228 2019-08-04 stsp <dl class="Bl-tag">
524 2dbbbc3a 2020-07-23 stsp <dt id="b~5"><a class="permalink" href="#b~5"><code class="Fl">-b</code></a>
525 8797b228 2019-08-04 stsp <var class="Ar">branch</var></dt>
526 8797b228 2019-08-04 stsp <dd>Switch the work tree's branch reference to the specified
527 8797b228 2019-08-04 stsp <var class="Ar">branch</var> before updating the work tree. This
528 9e67ab87 2020-04-14 stsp option requires that all paths in the work tree are updated.
529 9e67ab87 2020-04-14 stsp <p class="Pp">As usual, any local changes in the work tree will be
530 9e67ab87 2020-04-14 stsp preserved. This can be useful when switching to a newly created
531 9e67ab87 2020-04-14 stsp branch in order to commit existing local changes to this branch.</p>
532 9e67ab87 2020-04-14 stsp <p class="Pp">Any local changes must be dealt with separately in order
533 9e67ab87 2020-04-14 stsp to obtain a work tree with pristine file contents corresponding
534 9e67ab87 2020-04-14 stsp exactly to the specified <var class="Ar">branch</var>. Such changes
535 9e67ab87 2020-04-14 stsp could first be committed to a different branch with
536 9e67ab87 2020-04-14 stsp <code class="Cm">got commit</code>, or could be discarded with
537 9e67ab87 2020-04-14 stsp <code class="Cm">got revert</code>.</p>
538 9e67ab87 2020-04-14 stsp </dd>
539 2dbbbc3a 2020-07-23 stsp <dt id="c~2"><a class="permalink" href="#c~2"><code class="Fl">-c</code></a>
540 8797b228 2019-08-04 stsp <var class="Ar">commit</var></dt>
541 8797b228 2019-08-04 stsp <dd>Update the work tree to the specified <var class="Ar">commit</var>.
542 8797b228 2019-08-04 stsp The expected argument is a commit ID SHA1 hash or an existing
543 97e00196 2019-08-09 stsp reference or tag name which will be resolved to a commit ID. An
544 97e00196 2019-08-09 stsp abbreviated hash argument will be expanded to a full SHA1 hash
545 97e00196 2019-08-09 stsp automatically, provided the abbreviation is unique. If this option is
546 97e00196 2019-08-09 stsp not specified, the most recent commit on the work tree's branch will
547 97e00196 2019-08-09 stsp be used.</dd>
548 4448c231 2021-09-15 stsp <dt id="q~4"><a class="permalink" href="#q~4"><code class="Fl">-q</code></a></dt>
549 4448c231 2021-09-15 stsp <dd>Silence progress output.</dd>
550 8797b228 2019-08-04 stsp </dl>
551 8797b228 2019-08-04 stsp </dd>
552 63b69821 2021-10-16 stsp <dt id="st"><a class="permalink" href="#status"><code class="Cm" id="status">status</code></a>
553 a954aa0a 2021-06-22 stsp [<code class="Fl">-I</code>] [<code class="Fl">-s</code>
554 cb0c453b 2021-09-15 stsp <var class="Ar">status-codes</var>] [<code class="Fl">-S</code>
555 cb0c453b 2021-09-15 stsp <var class="Ar">status-codes</var>] [<var class="Ar">path ...</var>]</dt>
556 63b69821 2021-10-16 stsp <dd>
557 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
558 46043f6f 2021-11-23 stsp <code class="Cm">st</code>)</code></div>
559 46043f6f 2021-11-23 stsp Show the current modification status of files in a work tree, using the
560 8797b228 2019-08-04 stsp following status codes:
561 8797b228 2019-08-04 stsp <table class="Bl-column">
562 8797b228 2019-08-04 stsp <tr>
563 8797b228 2019-08-04 stsp <td>M</td>
564 8797b228 2019-08-04 stsp <td>modified file</td>
565 8797b228 2019-08-04 stsp </tr>
566 8797b228 2019-08-04 stsp <tr>
567 8797b228 2019-08-04 stsp <td>A</td>
568 8797b228 2019-08-04 stsp <td>file scheduled for addition in next commit</td>
569 8797b228 2019-08-04 stsp </tr>
570 8797b228 2019-08-04 stsp <tr>
571 8797b228 2019-08-04 stsp <td>D</td>
572 8797b228 2019-08-04 stsp <td>file scheduled for deletion in next commit</td>
573 8797b228 2019-08-04 stsp </tr>
574 8797b228 2019-08-04 stsp <tr>
575 8797b228 2019-08-04 stsp <td>C</td>
576 8797b228 2019-08-04 stsp <td>modified or added file which contains merge conflicts</td>
577 8797b228 2019-08-04 stsp </tr>
578 8797b228 2019-08-04 stsp <tr>
579 8797b228 2019-08-04 stsp <td>!</td>
580 8797b228 2019-08-04 stsp <td>versioned file was expected on disk but is missing</td>
581 8797b228 2019-08-04 stsp </tr>
582 8797b228 2019-08-04 stsp <tr>
583 8797b228 2019-08-04 stsp <td>~</td>
584 8797b228 2019-08-04 stsp <td>versioned file is obstructed by a non-regular file</td>
585 8797b228 2019-08-04 stsp </tr>
586 8797b228 2019-08-04 stsp <tr>
587 8797b228 2019-08-04 stsp <td>?</td>
588 8797b228 2019-08-04 stsp <td>unversioned item not tracked by <code class="Nm">got</code></td>
589 ba0a4168 2019-08-26 stsp </tr>
590 ba0a4168 2019-08-26 stsp <tr>
591 d8e62599 2019-10-21 stsp <td>m</td>
592 d8e62599 2019-10-21 stsp <td>modified file modes (executable bit only)</td>
593 d8e62599 2019-10-21 stsp </tr>
594 d8e62599 2019-10-21 stsp <tr>
595 ba0a4168 2019-08-26 stsp <td>N</td>
596 ba0a4168 2019-08-26 stsp <td>non-existent <var class="Ar">path</var> specified on the command
597 ba0a4168 2019-08-26 stsp line</td>
598 8797b228 2019-08-04 stsp </tr>
599 8797b228 2019-08-04 stsp </table>
600 8797b228 2019-08-04 stsp <p class="Pp">If no <var class="Ar">path</var> is specified, show
601 8797b228 2019-08-04 stsp modifications in the entire work tree. Otherwise, show modifications at
602 8797b228 2019-08-04 stsp or within the specified paths.</p>
603 8797b228 2019-08-04 stsp <p class="Pp">If changes have been staged with <code class="Cm">got
604 8797b228 2019-08-04 stsp stage</code>, staged changes are shown in the second output column,
605 8797b228 2019-08-04 stsp using the following status codes:</p>
606 8797b228 2019-08-04 stsp <table class="Bl-column">
607 8797b228 2019-08-04 stsp <tr>
608 8797b228 2019-08-04 stsp <td>M</td>
609 8797b228 2019-08-04 stsp <td>file modification is staged</td>
610 8797b228 2019-08-04 stsp </tr>
611 8797b228 2019-08-04 stsp <tr>
612 8797b228 2019-08-04 stsp <td>A</td>
613 8797b228 2019-08-04 stsp <td>file addition is staged</td>
614 8797b228 2019-08-04 stsp </tr>
615 8797b228 2019-08-04 stsp <tr>
616 8797b228 2019-08-04 stsp <td>D</td>
617 8797b228 2019-08-04 stsp <td>file deletion is staged</td>
618 8797b228 2019-08-04 stsp </tr>
619 8797b228 2019-08-04 stsp </table>
620 fc62dacd 2019-08-08 stsp <p class="Pp">Changes created on top of staged changes are indicated in the
621 fc62dacd 2019-08-08 stsp first column:</p>
622 8797b228 2019-08-04 stsp <table class="Bl-column">
623 8797b228 2019-08-04 stsp <tr>
624 8797b228 2019-08-04 stsp <td>MM</td>
625 fc62dacd 2019-08-08 stsp <td>file was modified after earlier changes have been staged</td>
626 8797b228 2019-08-04 stsp </tr>
627 8797b228 2019-08-04 stsp <tr>
628 8797b228 2019-08-04 stsp <td>MA</td>
629 fc62dacd 2019-08-08 stsp <td>file was modified after having been staged for addition</td>
630 8797b228 2019-08-04 stsp </tr>
631 8797b228 2019-08-04 stsp </table>
632 feee6923 2020-09-17 stsp <p class="Pp">The options for <code class="Cm">got status</code> are as
633 feee6923 2020-09-17 stsp follows:</p>
634 feee6923 2020-09-17 stsp <dl class="Bl-tag">
635 a954aa0a 2021-06-22 stsp <dt id="I~2"><a class="permalink" href="#I~2"><code class="Fl">-I</code></a></dt>
636 a954aa0a 2021-06-22 stsp <dd>Show unversioned files even if they match an ignore pattern.</dd>
637 feee6923 2020-09-17 stsp <dt id="s"><a class="permalink" href="#s"><code class="Fl">-s</code></a>
638 feee6923 2020-09-17 stsp <var class="Ar">status-codes</var></dt>
639 feee6923 2020-09-17 stsp <dd>Only show files with a modification status matching any of the
640 feee6923 2020-09-17 stsp single-character status codes contained in the
641 feee6923 2020-09-17 stsp <var class="Ar">status-codes</var> argument. Any combination of codes
642 feee6923 2020-09-17 stsp from the above list of possible status codes may be specified. For
643 4448c231 2021-09-15 stsp staged files, status codes displayed in either column will be matched.
644 4448c231 2021-09-15 stsp Cannot be used together with the <code class="Fl">-S</code>
645 4448c231 2021-09-15 stsp option.</dd>
646 4448c231 2021-09-15 stsp <dt id="S"><a class="permalink" href="#S"><code class="Fl">-S</code></a>
647 4448c231 2021-09-15 stsp <var class="Ar">status-codes</var></dt>
648 4448c231 2021-09-15 stsp <dd>Suppress the output of files with a modification status matching any
649 4448c231 2021-09-15 stsp of the single-character status codes contained in the
650 4448c231 2021-09-15 stsp <var class="Ar">status-codes</var> argument. Any combination of codes
651 4448c231 2021-09-15 stsp from the above list of possible status codes may be specified. For
652 4448c231 2021-09-15 stsp staged files, status codes displayed in either column will be matched.
653 4448c231 2021-09-15 stsp Cannot be used together with the <code class="Fl">-s</code>
654 4448c231 2021-09-15 stsp option.</dd>
655 feee6923 2020-09-17 stsp </dl>
656 2b499410 2019-10-06 stsp <p class="Pp">For compatibility with <a class="Xr">cvs(1)</a> and
657 2b499410 2019-10-06 stsp <a class="Xr">git(1)</a>, <code class="Cm">got status</code> reads
658 2b499410 2019-10-06 stsp <a class="Xr">glob(7)</a> patterns from
659 2b499410 2019-10-06 stsp <span class="Pa">.cvsignore</span> and
660 2b499410 2019-10-06 stsp <span class="Pa">.gitignore</span> files in each traversed directory and
661 2b499410 2019-10-06 stsp will not display unversioned files which match these patterns. As an
662 2b499410 2019-10-06 stsp extension to <a class="Xr">glob(7)</a> matching rules,
663 2b499410 2019-10-06 stsp <code class="Cm">got status</code> supports consecutive asterisks,
664 2b499410 2019-10-06 stsp &#x201C;**&#x201D;, which will match an arbitrary amount of directories.
665 1ff80c7c 2019-08-08 stsp Unlike <a class="Xr">cvs(1)</a>, <code class="Cm">got status</code> only
666 2b499410 2019-10-06 stsp supports a single ignore pattern per line. Unlike
667 2b499410 2019-10-06 stsp <a class="Xr">git(1)</a>, <code class="Cm">got status</code> does not
668 2b499410 2019-10-06 stsp support negated ignore patterns prefixed with &#x201C;!&#x201D;, and
669 2b499410 2019-10-06 stsp gives no special significance to the location of path component
670 2b499410 2019-10-06 stsp separators, &#x201C;/&#x201D;, in a pattern.</p>
671 8797b228 2019-08-04 stsp </dd>
672 2dbbbc3a 2020-07-23 stsp <dt id="log"><a class="permalink" href="#log"><code class="Cm">log</code></a>
673 8b679b4b 2020-02-17 stsp [<code class="Fl">-b</code>] [<code class="Fl">-c</code>
674 8b679b4b 2020-02-17 stsp <var class="Ar">commit</var>] [<code class="Fl">-C</code>
675 8b679b4b 2020-02-17 stsp <var class="Ar">number</var>] [<code class="Fl">-l</code>
676 8797b228 2019-08-04 stsp <var class="Ar">N</var>] [<code class="Fl">-p</code>]
677 ec51d4a3 2020-05-05 stsp [<code class="Fl">-P</code>] [<code class="Fl">-s</code>
678 ec51d4a3 2020-05-05 stsp <var class="Ar">search-pattern</var>] [<code class="Fl">-r</code>
679 ec51d4a3 2020-05-05 stsp <var class="Ar">repository-path</var>] [<code class="Fl">-R</code>]
680 ec51d4a3 2020-05-05 stsp [<code class="Fl">-x</code> <var class="Ar">commit</var>]
681 ec51d4a3 2020-05-05 stsp [<var class="Ar">path</var>]</dt>
682 8797b228 2019-08-04 stsp <dd>Display history of a repository. If a <var class="Ar">path</var> is
683 7c3b4ab8 2020-02-25 stsp specified, show only commits which modified this path. If invoked in a
684 7c3b4ab8 2020-02-25 stsp work tree, the <var class="Ar">path</var> is interpreted relative to the
685 7c3b4ab8 2020-02-25 stsp current working directory, and the work tree's path prefix is implicitly
686 7c3b4ab8 2020-02-25 stsp prepended. Otherwise, the path is interpreted relative to the repository
687 7c3b4ab8 2020-02-25 stsp root.
688 8797b228 2019-08-04 stsp <p class="Pp">The options for <code class="Cm">got log</code> are as
689 8797b228 2019-08-04 stsp follows:</p>
690 8797b228 2019-08-04 stsp <dl class="Bl-tag">
691 2dbbbc3a 2020-07-23 stsp <dt id="b~6"><a class="permalink" href="#b~6"><code class="Fl">-b</code></a></dt>
692 8b679b4b 2020-02-17 stsp <dd>Display individual commits which were merged into the current branch
693 8b679b4b 2020-02-17 stsp from other branches. By default, <code class="Cm">got log</code> shows
694 8b679b4b 2020-02-17 stsp the linear history of the current branch only.</dd>
695 2dbbbc3a 2020-07-23 stsp <dt id="c~3"><a class="permalink" href="#c~3"><code class="Fl">-c</code></a>
696 8797b228 2019-08-04 stsp <var class="Ar">commit</var></dt>
697 8797b228 2019-08-04 stsp <dd>Start traversing history at the specified
698 8797b228 2019-08-04 stsp <var class="Ar">commit</var>. The expected argument is a commit ID
699 97e00196 2019-08-09 stsp SHA1 hash or an existing reference or tag name which will be resolved
700 97e00196 2019-08-09 stsp to a commit ID. An abbreviated hash argument will be expanded to a
701 97e00196 2019-08-09 stsp full SHA1 hash automatically, provided the abbreviation is unique. If
702 97e00196 2019-08-09 stsp this option is not specified, default to the work tree's current
703 97e00196 2019-08-09 stsp branch if invoked in a work tree, or to the repository's HEAD
704 97e00196 2019-08-09 stsp reference.</dd>
705 2dbbbc3a 2020-07-23 stsp <dt id="C"><a class="permalink" href="#C"><code class="Fl">-C</code></a>
706 8797b228 2019-08-04 stsp <var class="Ar">number</var></dt>
707 8797b228 2019-08-04 stsp <dd>Set the number of context lines shown in diffs with
708 8797b228 2019-08-04 stsp <code class="Fl">-p</code>. By default, 3 lines of context are
709 8797b228 2019-08-04 stsp shown.</dd>
710 2dbbbc3a 2020-07-23 stsp <dt id="l~3"><a class="permalink" href="#l~3"><code class="Fl">-l</code></a>
711 8797b228 2019-08-04 stsp <var class="Ar">N</var></dt>
712 91b3da3f 2019-08-18 stsp <dd>Limit history traversal to a given number of commits. If this option
713 91b3da3f 2019-08-18 stsp is not specified, a default limit value of zero is used, which is
714 91b3da3f 2019-08-18 stsp treated as an unbounded limit. The
715 91b3da3f 2019-08-18 stsp <code class="Ev">GOT_LOG_DEFAULT_LIMIT</code> environment variable may
716 91b3da3f 2019-08-18 stsp be set to change this default value.</dd>
717 2dbbbc3a 2020-07-23 stsp <dt id="p~2"><a class="permalink" href="#p~2"><code class="Fl">-p</code></a></dt>
718 ba0a4168 2019-08-26 stsp <dd>Display the patch of modifications made in each commit. If a
719 ba0a4168 2019-08-26 stsp <var class="Ar">path</var> is specified, only show the patch of
720 ba0a4168 2019-08-26 stsp modifications at or within this path.</dd>
721 2dbbbc3a 2020-07-23 stsp <dt id="P"><a class="permalink" href="#P"><code class="Fl">-P</code></a></dt>
722 ec51d4a3 2020-05-05 stsp <dd>Display the list of file paths changed in each commit, using the
723 ec51d4a3 2020-05-05 stsp following status codes:
724 ec51d4a3 2020-05-05 stsp <table class="Bl-column">
725 ec51d4a3 2020-05-05 stsp <tr>
726 ec51d4a3 2020-05-05 stsp <td>M</td>
727 ec51d4a3 2020-05-05 stsp <td>modified file</td>
728 ec51d4a3 2020-05-05 stsp </tr>
729 ec51d4a3 2020-05-05 stsp <tr>
730 ec51d4a3 2020-05-05 stsp <td>D</td>
731 ec51d4a3 2020-05-05 stsp <td>file was deleted</td>
732 ec51d4a3 2020-05-05 stsp </tr>
733 ec51d4a3 2020-05-05 stsp <tr>
734 ec51d4a3 2020-05-05 stsp <td>A</td>
735 ec51d4a3 2020-05-05 stsp <td>new file was added</td>
736 ec51d4a3 2020-05-05 stsp </tr>
737 ec51d4a3 2020-05-05 stsp <tr>
738 ec51d4a3 2020-05-05 stsp <td>m</td>
739 ec51d4a3 2020-05-05 stsp <td>modified file modes (executable bit only)</td>
740 ec51d4a3 2020-05-05 stsp </tr>
741 ec51d4a3 2020-05-05 stsp </table>
742 ec51d4a3 2020-05-05 stsp </dd>
743 feee6923 2020-09-17 stsp <dt id="s~2"><a class="permalink" href="#s~2"><code class="Fl">-s</code></a>
744 8b679b4b 2020-02-17 stsp <var class="Ar">search-pattern</var></dt>
745 8b679b4b 2020-02-17 stsp <dd>If specified, show only commits with a log message matched by the
746 ec51d4a3 2020-05-05 stsp extended regular expression <var class="Ar">search-pattern</var>. When
747 ec51d4a3 2020-05-05 stsp used together with <code class="Fl">-P</code> then the file paths
748 ec51d4a3 2020-05-05 stsp changed by a commit can be matched as well. Regular expression syntax
749 ec51d4a3 2020-05-05 stsp is documented in <a class="Xr">re_format(7)</a>.</dd>
750 2dbbbc3a 2020-07-23 stsp <dt id="r~3"><a class="permalink" href="#r~3"><code class="Fl">-r</code></a>
751 8797b228 2019-08-04 stsp <var class="Ar">repository-path</var></dt>
752 8797b228 2019-08-04 stsp <dd>Use the repository at the specified path. If not specified, assume the
753 8797b228 2019-08-04 stsp repository is located at or above the current working directory. If
754 8797b228 2019-08-04 stsp this directory is a <code class="Nm">got</code> work tree, use the
755 8797b228 2019-08-04 stsp repository path associated with this work tree.</dd>
756 2dbbbc3a 2020-07-23 stsp <dt id="R~3"><a class="permalink" href="#R~3"><code class="Fl">-R</code></a></dt>
757 a462773e 2020-04-19 stsp <dd>Determine a set of commits to display as usual, but display these
758 a462773e 2020-04-19 stsp commits in reverse order.</dd>
759 2dbbbc3a 2020-07-23 stsp <dt id="x"><a class="permalink" href="#x"><code class="Fl">-x</code></a>
760 a462773e 2020-04-19 stsp <var class="Ar">commit</var></dt>
761 039953c9 2021-03-22 stsp <dd>Stop traversing commit history immediately after the specified
762 a462773e 2020-04-19 stsp <var class="Ar">commit</var> has been traversed. This option has no
763 a462773e 2020-04-19 stsp effect if the specified <var class="Ar">commit</var> is never
764 a462773e 2020-04-19 stsp traversed.</dd>
765 8797b228 2019-08-04 stsp </dl>
766 8797b228 2019-08-04 stsp </dd>
767 63b69821 2021-10-16 stsp <dt id="di"><a class="permalink" href="#diff"><code class="Cm" id="diff">diff</code></a>
768 63b69821 2021-10-16 stsp [<code class="Fl">-a</code>] [<code class="Fl">-c</code>
769 63b69821 2021-10-16 stsp <var class="Ar">commit</var>] [<code class="Fl">-C</code>
770 1b792db0 2020-12-13 stsp <var class="Ar">number</var>] [<code class="Fl">-r</code>
771 1b792db0 2020-12-13 stsp <var class="Ar">repository-path</var>] [<code class="Fl">-s</code>]
772 63b69821 2021-10-16 stsp [<code class="Fl">-P</code>] [<code class="Fl">-w</code>]
773 63b69821 2021-10-16 stsp [<var class="Ar">object1</var> <var class="Ar">object2</var> |
774 63b69821 2021-10-16 stsp <var class="Ar">path ...</var>]</dt>
775 63b69821 2021-10-16 stsp <dd>
776 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
777 46043f6f 2021-11-23 stsp <code class="Cm">di</code>)</code></div>
778 46043f6f 2021-11-23 stsp When invoked within a work tree without any arguments, display all local
779 63b69821 2021-10-16 stsp changes in the work tree. If one or more <var class="Ar">path</var>
780 63b69821 2021-10-16 stsp arguments are specified, only show changes within the specified paths.
781 8797b228 2019-08-04 stsp <p class="Pp">If two arguments are provided, treat each argument as a
782 7fe2a942 2019-08-11 stsp reference, a tag name, or an object ID SHA1 hash, and display
783 7fe2a942 2019-08-11 stsp differences between the corresponding objects. Both objects must be of
784 7fe2a942 2019-08-11 stsp the same type (blobs, trees, or commits). An abbreviated hash argument
785 7fe2a942 2019-08-11 stsp will be expanded to a full SHA1 hash automatically, provided the
786 63b69821 2021-10-16 stsp abbreviation is unique. If none of these interpretations produce a valid
787 63b69821 2021-10-16 stsp result or if the <code class="Fl">-P</code> option is used, and if
788 63b69821 2021-10-16 stsp <code class="Cm">got diff</code> is running in a work tree, attempt to
789 63b69821 2021-10-16 stsp interpret the two arguments as paths.</p>
790 8797b228 2019-08-04 stsp <p class="Pp">The options for <code class="Cm">got diff</code> are as
791 8797b228 2019-08-04 stsp follows:</p>
792 8797b228 2019-08-04 stsp <dl class="Bl-tag">
793 1b792db0 2020-12-13 stsp <dt id="a~3"><a class="permalink" href="#a~3"><code class="Fl">-a</code></a></dt>
794 1b792db0 2020-12-13 stsp <dd>Treat file contents as ASCII text even if binary data is
795 1b792db0 2020-12-13 stsp detected.</dd>
796 63b69821 2021-10-16 stsp <dt id="c~4"><a class="permalink" href="#c~4"><code class="Fl">-c</code></a>
797 63b69821 2021-10-16 stsp <var class="Ar">commit</var></dt>
798 63b69821 2021-10-16 stsp <dd>Show differences between commits in the repository. This options may
799 63b69821 2021-10-16 stsp be used up to two times. When used only once, show differences between
800 63b69821 2021-10-16 stsp the specified <var class="Ar">commit</var> and its first parent
801 63b69821 2021-10-16 stsp commit. When used twice, show differences between the two specified
802 63b69821 2021-10-16 stsp commits.
803 63b69821 2021-10-16 stsp <p class="Pp">The expected argument is a commit ID SHA1 hash or an
804 63b69821 2021-10-16 stsp existing reference or tag name which will be resolved to a commit
805 63b69821 2021-10-16 stsp ID. An abbreviated hash argument will be expanded to a full SHA1
806 63b69821 2021-10-16 stsp hash automatically, provided the abbreviation is unique.</p>
807 63b69821 2021-10-16 stsp <p class="Pp">If the <code class="Fl">-c</code> option is used, all
808 63b69821 2021-10-16 stsp non-option arguments will be interpreted as paths. If one or more
809 63b69821 2021-10-16 stsp such <var class="Ar">path</var> arguments are provided, only show
810 63b69821 2021-10-16 stsp differences for the specified paths.</p>
811 63b69821 2021-10-16 stsp <p class="Pp">Cannot be used together with the
812 63b69821 2021-10-16 stsp <code class="Fl">-P</code> option.</p>
813 63b69821 2021-10-16 stsp </dd>
814 2dbbbc3a 2020-07-23 stsp <dt id="C~2"><a class="permalink" href="#C~2"><code class="Fl">-C</code></a>
815 8797b228 2019-08-04 stsp <var class="Ar">number</var></dt>
816 8797b228 2019-08-04 stsp <dd>Set the number of context lines shown in the diff. By default, 3 lines
817 8797b228 2019-08-04 stsp of context are shown.</dd>
818 2dbbbc3a 2020-07-23 stsp <dt id="r~4"><a class="permalink" href="#r~4"><code class="Fl">-r</code></a>
819 8797b228 2019-08-04 stsp <var class="Ar">repository-path</var></dt>
820 8797b228 2019-08-04 stsp <dd>Use the repository at the specified path. If not specified, assume the
821 8797b228 2019-08-04 stsp repository is located at or above the current working directory. If
822 8797b228 2019-08-04 stsp this directory is a <code class="Nm">got</code> work tree, use the
823 8797b228 2019-08-04 stsp repository path associated with this work tree.</dd>
824 feee6923 2020-09-17 stsp <dt id="s~3"><a class="permalink" href="#s~3"><code class="Fl">-s</code></a></dt>
825 8797b228 2019-08-04 stsp <dd>Show changes staged with <code class="Cm">got stage</code> instead of
826 a462773e 2020-04-19 stsp showing local changes in the work tree. This option is only valid when
827 8797b228 2019-08-04 stsp <code class="Cm">got diff</code> is invoked in a work tree.</dd>
828 63b69821 2021-10-16 stsp <dt id="P~2"><a class="permalink" href="#P~2"><code class="Fl">-P</code></a></dt>
829 63b69821 2021-10-16 stsp <dd>Interpret all arguments as paths only. This option can be used to
830 63b69821 2021-10-16 stsp resolve ambiguity in cases where paths look like tag names, reference
831 63b69821 2021-10-16 stsp names, or object IDs. This option is only valid when
832 63b69821 2021-10-16 stsp <code class="Cm">got diff</code> is invoked in a work tree.</dd>
833 2dbbbc3a 2020-07-23 stsp <dt id="w"><a class="permalink" href="#w"><code class="Fl">-w</code></a></dt>
834 d8e62599 2019-10-21 stsp <dd>Ignore whitespace-only changes.</dd>
835 8797b228 2019-08-04 stsp </dl>
836 8797b228 2019-08-04 stsp </dd>
837 63b69821 2021-10-16 stsp <dt id="bl"><a class="permalink" href="#blame"><code class="Cm" id="blame">blame</code></a>
838 8797b228 2019-08-04 stsp [<code class="Fl">-c</code> <var class="Ar">commit</var>]
839 8797b228 2019-08-04 stsp [<code class="Fl">-r</code> <var class="Ar">repository-path</var>]
840 8797b228 2019-08-04 stsp <var class="Ar">path</var></dt>
841 63b69821 2021-10-16 stsp <dd>
842 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
843 46043f6f 2021-11-23 stsp <code class="Cm">bl</code>)</code></div>
844 46043f6f 2021-11-23 stsp Display line-by-line history of a file at the specified path.
845 8797b228 2019-08-04 stsp <p class="Pp">The options for <code class="Cm">got blame</code> are as
846 8797b228 2019-08-04 stsp follows:</p>
847 8797b228 2019-08-04 stsp <dl class="Bl-tag">
848 63b69821 2021-10-16 stsp <dt id="c~5"><a class="permalink" href="#c~5"><code class="Fl">-c</code></a>
849 8797b228 2019-08-04 stsp <var class="Ar">commit</var></dt>
850 8797b228 2019-08-04 stsp <dd>Start traversing history at the specified
851 8797b228 2019-08-04 stsp <var class="Ar">commit</var>. The expected argument is a commit ID
852 97e00196 2019-08-09 stsp SHA1 hash or an existing reference or tag name which will be resolved
853 97e00196 2019-08-09 stsp to a commit ID. An abbreviated hash argument will be expanded to a
854 97e00196 2019-08-09 stsp full SHA1 hash automatically, provided the abbreviation is
855 97e00196 2019-08-09 stsp unique.</dd>
856 2dbbbc3a 2020-07-23 stsp <dt id="r~5"><a class="permalink" href="#r~5"><code class="Fl">-r</code></a>
857 8797b228 2019-08-04 stsp <var class="Ar">repository-path</var></dt>
858 8797b228 2019-08-04 stsp <dd>Use the repository at the specified path. If not specified, assume the
859 8797b228 2019-08-04 stsp repository is located at or above the current working directory. If
860 8797b228 2019-08-04 stsp this directory is a <code class="Nm">got</code> work tree, use the
861 8797b228 2019-08-04 stsp repository path associated with this work tree.</dd>
862 8797b228 2019-08-04 stsp </dl>
863 8797b228 2019-08-04 stsp </dd>
864 63b69821 2021-10-16 stsp <dt id="tr"><a class="permalink" href="#tree"><code class="Cm" id="tree">tree</code></a>
865 8797b228 2019-08-04 stsp [<code class="Fl">-c</code> <var class="Ar">commit</var>]
866 8797b228 2019-08-04 stsp [<code class="Fl">-r</code> <var class="Ar">repository-path</var>]
867 27b5d592 2019-08-11 stsp [<code class="Fl">-i</code>] [<code class="Fl">-R</code>]
868 8797b228 2019-08-04 stsp [<var class="Ar">path</var>]</dt>
869 63b69821 2021-10-16 stsp <dd>
870 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
871 46043f6f 2021-11-23 stsp <code class="Cm">tr</code>)</code></div>
872 46043f6f 2021-11-23 stsp Display a listing of files and directories at the specified directory path
873 8797b228 2019-08-04 stsp in the repository. Entries shown in this listing may carry one of the
874 8797b228 2019-08-04 stsp following trailing annotations:
875 8797b228 2019-08-04 stsp <table class="Bl-column">
876 e8022e04 2019-08-13 stsp <tr>
877 e8022e04 2019-08-13 stsp <td>@</td>
878 e8022e04 2019-08-13 stsp <td>entry is a symbolic link</td>
879 e8022e04 2019-08-13 stsp </tr>
880 8797b228 2019-08-04 stsp <tr>
881 8797b228 2019-08-04 stsp <td>/</td>
882 8797b228 2019-08-04 stsp <td>entry is a directory</td>
883 8797b228 2019-08-04 stsp </tr>
884 8797b228 2019-08-04 stsp <tr>
885 8797b228 2019-08-04 stsp <td>*</td>
886 8797b228 2019-08-04 stsp <td>entry is an executable file</td>
887 8797b228 2019-08-04 stsp </tr>
888 ba0a4168 2019-08-26 stsp <tr>
889 ba0a4168 2019-08-26 stsp <td>$</td>
890 ba0a4168 2019-08-26 stsp <td>entry is a Git submodule</td>
891 ba0a4168 2019-08-26 stsp </tr>
892 8797b228 2019-08-04 stsp </table>
893 2dbbbc3a 2020-07-23 stsp <p class="Pp">Symbolic link entries are also annotated with the target path
894 2dbbbc3a 2020-07-23 stsp of the link.</p>
895 8797b228 2019-08-04 stsp <p class="Pp">If no <var class="Ar">path</var> is specified, list the
896 8797b228 2019-08-04 stsp repository path corresponding to the current directory of the work tree,
897 8797b228 2019-08-04 stsp or the root directory of the repository if there is no work tree.</p>
898 8797b228 2019-08-04 stsp <p class="Pp">The options for <code class="Cm">got tree</code> are as
899 8797b228 2019-08-04 stsp follows:</p>
900 8797b228 2019-08-04 stsp <dl class="Bl-tag">
901 63b69821 2021-10-16 stsp <dt id="c~6"><a class="permalink" href="#c~6"><code class="Fl">-c</code></a>
902 8797b228 2019-08-04 stsp <var class="Ar">commit</var></dt>
903 8797b228 2019-08-04 stsp <dd>List files and directories as they appear in the specified
904 8797b228 2019-08-04 stsp <var class="Ar">commit</var>. The expected argument is a commit ID
905 97e00196 2019-08-09 stsp SHA1 hash or an existing reference or tag name which will be resolved
906 97e00196 2019-08-09 stsp to a commit ID. An abbreviated hash argument will be expanded to a
907 97e00196 2019-08-09 stsp full SHA1 hash automatically, provided the abbreviation is
908 97e00196 2019-08-09 stsp unique.</dd>
909 2dbbbc3a 2020-07-23 stsp <dt id="r~6"><a class="permalink" href="#r~6"><code class="Fl">-r</code></a>
910 8797b228 2019-08-04 stsp <var class="Ar">repository-path</var></dt>
911 8797b228 2019-08-04 stsp <dd>Use the repository at the specified path. If not specified, assume the
912 8797b228 2019-08-04 stsp repository is located at or above the current working directory. If
913 8797b228 2019-08-04 stsp this directory is a <code class="Nm">got</code> work tree, use the
914 8797b228 2019-08-04 stsp repository path associated with this work tree.</dd>
915 2dbbbc3a 2020-07-23 stsp <dt id="i"><a class="permalink" href="#i"><code class="Fl">-i</code></a></dt>
916 8797b228 2019-08-04 stsp <dd>Show object IDs of files (blob objects) and directories (tree
917 8797b228 2019-08-04 stsp objects).</dd>
918 2dbbbc3a 2020-07-23 stsp <dt id="R~4"><a class="permalink" href="#R~4"><code class="Fl">-R</code></a></dt>
919 8797b228 2019-08-04 stsp <dd>Recurse into sub-directories in the repository.</dd>
920 8797b228 2019-08-04 stsp </dl>
921 8797b228 2019-08-04 stsp </dd>
922 2dbbbc3a 2020-07-23 stsp <dt id="ref"><a class="permalink" href="#ref"><code class="Cm">ref</code></a>
923 8797b228 2019-08-04 stsp [<code class="Fl">-r</code> <var class="Ar">repository-path</var>]
924 46043f6f 2021-11-23 stsp [<code class="Fl">-l</code>] [<code class="Fl">-t</code>]
925 46043f6f 2021-11-23 stsp [<code class="Fl">-c</code> <var class="Ar">object</var>]
926 46043f6f 2021-11-23 stsp [<code class="Fl">-s</code> <var class="Ar">reference</var>]
927 46043f6f 2021-11-23 stsp [<code class="Fl">-d</code>] [<var class="Ar">name</var>]</dt>
928 8797b228 2019-08-04 stsp <dd>Manage references in a repository.
929 b213cbf7 2020-03-23 stsp <p class="Pp">References may be listed, created, deleted, and changed. When
930 b213cbf7 2020-03-23 stsp creating, deleting, or changing a reference the specified
931 b213cbf7 2020-03-23 stsp <var class="Ar">name</var> must be an absolute reference name, i.e. it
932 b213cbf7 2020-03-23 stsp must begin with &#x201C;refs/&#x201D;.</p>
933 8797b228 2019-08-04 stsp <p class="Pp">The options for <code class="Cm">got ref</code> are as
934 8797b228 2019-08-04 stsp follows:</p>
935 8797b228 2019-08-04 stsp <dl class="Bl-tag">
936 2dbbbc3a 2020-07-23 stsp <dt id="r~7"><a class="permalink" href="#r~7"><code class="Fl">-r</code></a>
937 8797b228 2019-08-04 stsp <var class="Ar">repository-path</var></dt>
938 8797b228 2019-08-04 stsp <dd>Use the repository at the specified path. If not specified, assume the
939 8797b228 2019-08-04 stsp repository is located at or above the current working directory. If
940 8797b228 2019-08-04 stsp this directory is a <code class="Nm">got</code> work tree, use the
941 8797b228 2019-08-04 stsp repository path associated with this work tree.</dd>
942 2dbbbc3a 2020-07-23 stsp <dt id="l~4"><a class="permalink" href="#l~4"><code class="Fl">-l</code></a></dt>
943 b213cbf7 2020-03-23 stsp <dd>List references in the repository. If no <var class="Ar">name</var> is
944 b213cbf7 2020-03-23 stsp specified, list all existing references in the repository. If
945 b213cbf7 2020-03-23 stsp <var class="Ar">name</var> is a reference namespace, list all
946 b213cbf7 2020-03-23 stsp references in this namespace. Otherwise, show only the reference with
947 b213cbf7 2020-03-23 stsp the given <var class="Ar">name</var>. Cannot be used together with any
948 46043f6f 2021-11-23 stsp other options except <code class="Fl">-r</code> and
949 46043f6f 2021-11-23 stsp <code class="Fl">-t</code>.</dd>
950 46043f6f 2021-11-23 stsp <dt id="t~2"><a class="permalink" href="#t~2"><code class="Fl">-t</code></a></dt>
951 46043f6f 2021-11-23 stsp <dd>Sort listed references by modification time (most recently modified
952 46043f6f 2021-11-23 stsp first) instead of sorting by lexicographical order. Use of this option
953 46043f6f 2021-11-23 stsp requires the <code class="Fl">-l</code> option to be used as
954 46043f6f 2021-11-23 stsp well.</dd>
955 63b69821 2021-10-16 stsp <dt id="c~7"><a class="permalink" href="#c~7"><code class="Fl">-c</code></a>
956 b213cbf7 2020-03-23 stsp <var class="Ar">object</var></dt>
957 b213cbf7 2020-03-23 stsp <dd>Create a reference or change an existing reference. The reference with
958 b213cbf7 2020-03-23 stsp the specified <var class="Ar">name</var> will point at the specified
959 56dd4d48 2021-04-05 stsp <var class="Ar">object</var>. The expected
960 b213cbf7 2020-03-23 stsp <var class="Ar">object</var> argument is a ID SHA1 hash or an existing
961 b213cbf7 2020-03-23 stsp reference or tag name which will be resolved to the ID of a
962 b213cbf7 2020-03-23 stsp corresponding commit, tree, tag, or blob object. Cannot be used
963 b213cbf7 2020-03-23 stsp together with any other options except
964 b213cbf7 2020-03-23 stsp <code class="Fl">-r</code>.</dd>
965 feee6923 2020-09-17 stsp <dt id="s~4"><a class="permalink" href="#s~4"><code class="Fl">-s</code></a>
966 b213cbf7 2020-03-23 stsp <var class="Ar">reference</var></dt>
967 b213cbf7 2020-03-23 stsp <dd>Create a symbolic reference, or change an existing symbolic reference.
968 b213cbf7 2020-03-23 stsp The symbolic reference with the specified <var class="Ar">name</var>
969 b213cbf7 2020-03-23 stsp will point at the specified <var class="Ar">reference</var> which must
970 b213cbf7 2020-03-23 stsp already exist in the repository. Care should be taken not to create
971 b213cbf7 2020-03-23 stsp loops between references when this option is used. Cannot be used
972 b213cbf7 2020-03-23 stsp together with any other options except
973 b213cbf7 2020-03-23 stsp <code class="Fl">-r</code>.</dd>
974 2dbbbc3a 2020-07-23 stsp <dt id="d~2"><a class="permalink" href="#d~2"><code class="Fl">-d</code></a></dt>
975 b213cbf7 2020-03-23 stsp <dd>Delete the reference with the specified <var class="Ar">name</var>
976 039953c9 2021-03-22 stsp from the repository. Any commit, tree, tag, and blob objects belonging
977 039953c9 2021-03-22 stsp to deleted references remain in the repository and may be removed
978 16cd1323 2021-07-26 stsp separately with Git's garbage collector or <code class="Cm">gotadmin
979 16cd1323 2021-07-26 stsp cleanup</code>. Cannot be used together with any other options except
980 16cd1323 2021-07-26 stsp <code class="Fl">-r</code>.</dd>
981 8797b228 2019-08-04 stsp </dl>
982 8797b228 2019-08-04 stsp </dd>
983 63b69821 2021-10-16 stsp <dt id="br"><a class="permalink" href="#branch"><code class="Cm" id="branch">branch</code></a>
984 cc85973b 2019-11-27 stsp [<code class="Fl">-c</code> <var class="Ar">commit</var>]
985 8797b228 2019-08-04 stsp [<code class="Fl">-r</code> <var class="Ar">repository-path</var>]
986 8797b228 2019-08-04 stsp [<code class="Fl">-l</code>] [<code class="Fl">-d</code>
987 7c3b4ab8 2020-02-25 stsp <var class="Ar">name</var>] [<code class="Fl">-n</code>]
988 7c3b4ab8 2020-02-25 stsp [<var class="Ar">name</var>]</dt>
989 63b69821 2021-10-16 stsp <dd>
990 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
991 46043f6f 2021-11-23 stsp <code class="Cm">br</code>)</code></div>
992 46043f6f 2021-11-23 stsp Create, list, or delete branches.
993 039953c9 2021-03-22 stsp <p class="Pp">Local branches are managed via references which live in the
994 8797b228 2019-08-04 stsp &#x201C;refs/heads/&#x201D; reference namespace. The
995 def5be4a 2021-08-31 stsp <code class="Cm">got branch</code> command creates references in this
996 def5be4a 2021-08-31 stsp namespace only.</p>
997 def5be4a 2021-08-31 stsp <p class="Pp">When deleting branches the specified
998 def5be4a 2021-08-31 stsp <var class="Ar">name</var> is searched in the &#x201C;refs/heads&#x201D;
999 def5be4a 2021-08-31 stsp reference namespace first. If no corresponding branch is found the
1000 def5be4a 2021-08-31 stsp &#x201C;refs/remotes&#x201D; namespace will be searched next.</p>
1001 2b499410 2019-10-06 stsp <p class="Pp">If invoked in a work tree without any arguments, print the
1002 7c3b4ab8 2020-02-25 stsp name of the work tree's current branch.</p>
1003 7c3b4ab8 2020-02-25 stsp <p class="Pp">If a <var class="Ar">name</var> argument is passed, attempt to
1004 7c3b4ab8 2020-02-25 stsp create a branch reference with the given name. By default the new branch
1005 7c3b4ab8 2020-02-25 stsp reference will point at the latest commit on the work tree's current
1006 7c3b4ab8 2020-02-25 stsp branch if invoked in a work tree, and otherwise to a commit resolved via
1007 7c3b4ab8 2020-02-25 stsp the repository's HEAD reference.</p>
1008 7c3b4ab8 2020-02-25 stsp <p class="Pp">If invoked in a work tree, once the branch was created
1009 7c3b4ab8 2020-02-25 stsp successfully switch the work tree's head reference to the newly created
1010 7c3b4ab8 2020-02-25 stsp branch and update files across the entire work tree, just like
1011 7c3b4ab8 2020-02-25 stsp <code class="Cm">got update -b</code> <var class="Ar">name</var> would
1012 7c3b4ab8 2020-02-25 stsp do. Show the status of each affected file, using the following status
1013 7c3b4ab8 2020-02-25 stsp codes:</p>
1014 7c3b4ab8 2020-02-25 stsp <table class="Bl-column">
1015 7c3b4ab8 2020-02-25 stsp <tr>
1016 7c3b4ab8 2020-02-25 stsp <td>U</td>
1017 7c3b4ab8 2020-02-25 stsp <td>file was updated and contained no local changes</td>
1018 7c3b4ab8 2020-02-25 stsp </tr>
1019 7c3b4ab8 2020-02-25 stsp <tr>
1020 7c3b4ab8 2020-02-25 stsp <td>G</td>
1021 7c3b4ab8 2020-02-25 stsp <td>file was updated and local changes were merged cleanly</td>
1022 7c3b4ab8 2020-02-25 stsp </tr>
1023 7c3b4ab8 2020-02-25 stsp <tr>
1024 7c3b4ab8 2020-02-25 stsp <td>C</td>
1025 7c3b4ab8 2020-02-25 stsp <td>file was updated and conflicts occurred during merge</td>
1026 7c3b4ab8 2020-02-25 stsp </tr>
1027 7c3b4ab8 2020-02-25 stsp <tr>
1028 7c3b4ab8 2020-02-25 stsp <td>D</td>
1029 7c3b4ab8 2020-02-25 stsp <td>file was deleted</td>
1030 7c3b4ab8 2020-02-25 stsp </tr>
1031 7c3b4ab8 2020-02-25 stsp <tr>
1032 7c3b4ab8 2020-02-25 stsp <td>A</td>
1033 7c3b4ab8 2020-02-25 stsp <td>new file was added</td>
1034 7c3b4ab8 2020-02-25 stsp </tr>
1035 7c3b4ab8 2020-02-25 stsp <tr>
1036 7c3b4ab8 2020-02-25 stsp <td>~</td>
1037 7c3b4ab8 2020-02-25 stsp <td>versioned file is obstructed by a non-regular file</td>
1038 7c3b4ab8 2020-02-25 stsp </tr>
1039 7c3b4ab8 2020-02-25 stsp <tr>
1040 7c3b4ab8 2020-02-25 stsp <td>!</td>
1041 7c3b4ab8 2020-02-25 stsp <td>a missing versioned file was restored</td>
1042 7c3b4ab8 2020-02-25 stsp </tr>
1043 7c3b4ab8 2020-02-25 stsp </table>
1044 8797b228 2019-08-04 stsp <p class="Pp">The options for <code class="Cm">got branch</code> are as
1045 8797b228 2019-08-04 stsp follows:</p>
1046 8797b228 2019-08-04 stsp <dl class="Bl-tag">
1047 63b69821 2021-10-16 stsp <dt id="c~8"><a class="permalink" href="#c~8"><code class="Fl">-c</code></a>
1048 cc85973b 2019-11-27 stsp <var class="Ar">commit</var></dt>
1049 cc85973b 2019-11-27 stsp <dd>Make a newly created branch reference point at the specified
1050 cc85973b 2019-11-27 stsp <var class="Ar">commit</var>. The expected
1051 cc85973b 2019-11-27 stsp <var class="Ar">commit</var> argument is a commit ID SHA1 hash or an
1052 cc85973b 2019-11-27 stsp existing reference or tag name which will be resolved to a commit
1053 cc85973b 2019-11-27 stsp ID.</dd>
1054 2dbbbc3a 2020-07-23 stsp <dt id="r~8"><a class="permalink" href="#r~8"><code class="Fl">-r</code></a>
1055 8797b228 2019-08-04 stsp <var class="Ar">repository-path</var></dt>
1056 8797b228 2019-08-04 stsp <dd>Use the repository at the specified path. If not specified, assume the
1057 8797b228 2019-08-04 stsp repository is located at or above the current working directory. If
1058 8797b228 2019-08-04 stsp this directory is a <code class="Nm">got</code> work tree, use the
1059 8797b228 2019-08-04 stsp repository path associated with this work tree.</dd>
1060 2dbbbc3a 2020-07-23 stsp <dt id="l~5"><a class="permalink" href="#l~5"><code class="Fl">-l</code></a></dt>
1061 039953c9 2021-03-22 stsp <dd>List all existing branches in the repository, including copies of
1062 039953c9 2021-03-22 stsp remote repositories' branches in the &#x201C;refs/remotes/&#x201D;
1063 039953c9 2021-03-22 stsp reference namespace.
1064 039953c9 2021-03-22 stsp <p class="Pp">If invoked in a work tree, the work tree's current branch
1065 039953c9 2021-03-22 stsp is shown with one the following annotations:</p>
1066 8797b228 2019-08-04 stsp <table class="Bl-column">
1067 8797b228 2019-08-04 stsp <tr>
1068 8797b228 2019-08-04 stsp <td>*</td>
1069 8797b228 2019-08-04 stsp <td>work tree's base commit matches the branch tip</td>
1070 8797b228 2019-08-04 stsp </tr>
1071 8797b228 2019-08-04 stsp <tr>
1072 8797b228 2019-08-04 stsp <td>~</td>
1073 8797b228 2019-08-04 stsp <td>work tree's base commit is out-of-date</td>
1074 8797b228 2019-08-04 stsp </tr>
1075 8797b228 2019-08-04 stsp </table>
1076 8797b228 2019-08-04 stsp </dd>
1077 46043f6f 2021-11-23 stsp <dt id="t~3"><a class="permalink" href="#t~3"><code class="Fl">-t</code></a></dt>
1078 46043f6f 2021-11-23 stsp <dd>Sort listed branches by modification time (most recently modified
1079 46043f6f 2021-11-23 stsp first) instead of sorting by lexicographical order. Branches in the
1080 46043f6f 2021-11-23 stsp &#x201C;refs/heads/&#x201D; reference namespace are listed before
1081 46043f6f 2021-11-23 stsp branches in &#x201C;refs/remotes/&#x201D; regardless. Use of this
1082 46043f6f 2021-11-23 stsp option requires the <code class="Fl">-l</code> option to be used as
1083 46043f6f 2021-11-23 stsp well.</dd>
1084 2dbbbc3a 2020-07-23 stsp <dt id="d~3"><a class="permalink" href="#d~3"><code class="Fl">-d</code></a>
1085 8797b228 2019-08-04 stsp <var class="Ar">name</var></dt>
1086 def5be4a 2021-08-31 stsp <dd>Delete the branch with the specified <var class="Ar">name</var> from
1087 def5be4a 2021-08-31 stsp the &#x201C;refs/heads&#x201D; or &#x201C;refs/remotes&#x201D;
1088 def5be4a 2021-08-31 stsp reference namespace.
1089 def5be4a 2021-08-31 stsp <p class="Pp">Only the branch reference is deleted. Any commit, tree,
1090 def5be4a 2021-08-31 stsp and blob objects belonging to the branch remain in the repository
1091 def5be4a 2021-08-31 stsp and may be removed separately with Git's garbage collector or
1092 def5be4a 2021-08-31 stsp <code class="Cm">gotadmin cleanup</code>.</p>
1093 def5be4a 2021-08-31 stsp </dd>
1094 2dbbbc3a 2020-07-23 stsp <dt id="n"><a class="permalink" href="#n"><code class="Fl">-n</code></a></dt>
1095 7c3b4ab8 2020-02-25 stsp <dd>Do not switch and update the work tree after creating a new
1096 7c3b4ab8 2020-02-25 stsp branch.</dd>
1097 8797b228 2019-08-04 stsp </dl>
1098 8797b228 2019-08-04 stsp </dd>
1099 2dbbbc3a 2020-07-23 stsp <dt id="tag"><a class="permalink" href="#tag"><code class="Cm">tag</code></a>
1100 7c3b4ab8 2020-02-25 stsp [<code class="Fl">-c</code> <var class="Ar">commit</var>]
1101 f447d26b 2019-08-23 stsp [<code class="Fl">-m</code> <var class="Ar">message</var>]
1102 f447d26b 2019-08-23 stsp [<code class="Fl">-r</code> <var class="Ar">repository-path</var>]
1103 7c3b4ab8 2020-02-25 stsp [<code class="Fl">-l</code>] <var class="Ar">name</var></dt>
1104 f447d26b 2019-08-23 stsp <dd>Manage tags in a repository.
1105 f447d26b 2019-08-23 stsp <p class="Pp">Tags are managed via references which live in the
1106 f447d26b 2019-08-23 stsp &#x201C;refs/tags/&#x201D; reference namespace. The <code class="Cm">got
1107 f447d26b 2019-08-23 stsp tag</code> command operates on references in this namespace only.
1108 f447d26b 2019-08-23 stsp References in this namespace point at tag objects which contain a
1109 f447d26b 2019-08-23 stsp pointer to another object, a tag message, as well as author and
1110 f447d26b 2019-08-23 stsp timestamp information.</p>
1111 7c3b4ab8 2020-02-25 stsp <p class="Pp">Attempt to create a tag with the given
1112 7c3b4ab8 2020-02-25 stsp <var class="Ar">name</var>, and make this tag point at the given
1113 7c3b4ab8 2020-02-25 stsp <var class="Ar">commit</var>. If no commit is specified, default to the
1114 7c3b4ab8 2020-02-25 stsp latest commit on the work tree's current branch if invoked in a work
1115 7c3b4ab8 2020-02-25 stsp tree, and to a commit resolved via the repository's HEAD reference
1116 7c3b4ab8 2020-02-25 stsp otherwise.</p>
1117 f447d26b 2019-08-23 stsp <p class="Pp">The options for <code class="Cm">got tag</code> are as
1118 f447d26b 2019-08-23 stsp follows:</p>
1119 f447d26b 2019-08-23 stsp <dl class="Bl-tag">
1120 63b69821 2021-10-16 stsp <dt id="c~9"><a class="permalink" href="#c~9"><code class="Fl">-c</code></a>
1121 7c3b4ab8 2020-02-25 stsp <var class="Ar">commit</var></dt>
1122 7c3b4ab8 2020-02-25 stsp <dd>Make the newly created tag reference point at the specified
1123 7c3b4ab8 2020-02-25 stsp <var class="Ar">commit</var>. The expected
1124 7c3b4ab8 2020-02-25 stsp <var class="Ar">commit</var> argument is a commit ID SHA1 hash or an
1125 7c3b4ab8 2020-02-25 stsp existing reference or tag name which will be resolved to a commit ID.
1126 7c3b4ab8 2020-02-25 stsp An abbreviated hash argument will be expanded to a full SHA1 hash
1127 7c3b4ab8 2020-02-25 stsp automatically, provided the abbreviation is unique.</dd>
1128 2dbbbc3a 2020-07-23 stsp <dt id="m~3"><a class="permalink" href="#m~3"><code class="Fl">-m</code></a>
1129 f447d26b 2019-08-23 stsp <var class="Ar">message</var></dt>
1130 7c3b4ab8 2020-02-25 stsp <dd>Use the specified tag message when creating the new tag. Without the
1131 cc85973b 2019-11-27 stsp <code class="Fl">-m</code> option, <code class="Cm">got tag</code>
1132 f447d26b 2019-08-23 stsp opens a temporary file in an editor where a tag message can be
1133 f447d26b 2019-08-23 stsp written.</dd>
1134 2dbbbc3a 2020-07-23 stsp <dt id="r~9"><a class="permalink" href="#r~9"><code class="Fl">-r</code></a>
1135 f447d26b 2019-08-23 stsp <var class="Ar">repository-path</var></dt>
1136 f447d26b 2019-08-23 stsp <dd>Use the repository at the specified path. If not specified, assume the
1137 f447d26b 2019-08-23 stsp repository is located at or above the current working directory. If
1138 f447d26b 2019-08-23 stsp this directory is a <code class="Nm">got</code> work tree, use the
1139 f447d26b 2019-08-23 stsp repository path associated with this work tree.</dd>
1140 2dbbbc3a 2020-07-23 stsp <dt id="l~6"><a class="permalink" href="#l~6"><code class="Fl">-l</code></a></dt>
1141 f447d26b 2019-08-23 stsp <dd>List all existing tags in the repository instead of creating a new
1142 f447d26b 2019-08-23 stsp tag. If this option is used, no other command-line arguments are
1143 f447d26b 2019-08-23 stsp allowed.</dd>
1144 f447d26b 2019-08-23 stsp </dl>
1145 f447d26b 2019-08-23 stsp <p class="Pp">By design, the <code class="Cm">got tag</code> command will
1146 f447d26b 2019-08-23 stsp not delete tags or change existing tags. If a tag must be deleted, the
1147 f447d26b 2019-08-23 stsp <code class="Cm">got ref</code> command may be used to delete a tag's
1148 f447d26b 2019-08-23 stsp reference. This should only be done if the tag has not already been
1149 f447d26b 2019-08-23 stsp copied to another repository.</p>
1150 f447d26b 2019-08-23 stsp </dd>
1151 2dbbbc3a 2020-07-23 stsp <dt id="add"><a class="permalink" href="#add"><code class="Cm">add</code></a>
1152 8b679b4b 2020-02-17 stsp [<code class="Fl">-R</code>] [<code class="Fl">-I</code>]
1153 8b679b4b 2020-02-17 stsp <var class="Ar">path ...</var></dt>
1154 8797b228 2019-08-04 stsp <dd>Schedule unversioned files in a work tree for addition to the repository
1155 16cd1323 2021-07-26 stsp in the next commit. By default, files which match a <code class="Cm">got
1156 16cd1323 2021-07-26 stsp status</code> ignore pattern will not be added.
1157 cc85973b 2019-11-27 stsp <p class="Pp">The options for <code class="Cm">got add</code> are as
1158 cc85973b 2019-11-27 stsp follows:</p>
1159 cc85973b 2019-11-27 stsp <dl class="Bl-tag">
1160 2dbbbc3a 2020-07-23 stsp <dt id="R~5"><a class="permalink" href="#R~5"><code class="Fl">-R</code></a></dt>
1161 cc85973b 2019-11-27 stsp <dd>Permit recursion into directories. If this option is not specified,
1162 cc85973b 2019-11-27 stsp <code class="Cm">got add</code> will refuse to run if a specified
1163 cc85973b 2019-11-27 stsp <var class="Ar">path</var> is a directory.</dd>
1164 a954aa0a 2021-06-22 stsp <dt id="I~3"><a class="permalink" href="#I~3"><code class="Fl">-I</code></a></dt>
1165 16cd1323 2021-07-26 stsp <dd>Add files even if they match a <code class="Cm">got status</code>
1166 16cd1323 2021-07-26 stsp ignore pattern.</dd>
1167 cc85973b 2019-11-27 stsp </dl>
1168 cc85973b 2019-11-27 stsp </dd>
1169 63b69821 2021-10-16 stsp <dt id="rm"><a class="permalink" href="#remove"><code class="Cm" id="remove">remove</code></a>
1170 8b679b4b 2020-02-17 stsp [<code class="Fl">-f</code>] [<code class="Fl">-k</code>]
1171 feee6923 2020-09-17 stsp [<code class="Fl">-R</code>] [<code class="Fl">-s</code>
1172 feee6923 2020-09-17 stsp <var class="Ar">status-codes</var>] <var class="Ar">path ...</var></dt>
1173 63b69821 2021-10-16 stsp <dd>
1174 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
1175 46043f6f 2021-11-23 stsp <code class="Cm">rm</code>)</code></div>
1176 46043f6f 2021-11-23 stsp Remove versioned files from a work tree and schedule them for deletion from
1177 46043f6f 2021-11-23 stsp the repository in the next commit.
1178 8797b228 2019-08-04 stsp <p class="Pp">The options for <code class="Cm">got remove</code> are as
1179 8797b228 2019-08-04 stsp follows:</p>
1180 8797b228 2019-08-04 stsp <dl class="Bl-tag">
1181 2dbbbc3a 2020-07-23 stsp <dt id="f"><a class="permalink" href="#f"><code class="Fl">-f</code></a></dt>
1182 a462773e 2020-04-19 stsp <dd>Perform the operation even if a file contains local
1183 a462773e 2020-04-19 stsp modifications.</dd>
1184 2dbbbc3a 2020-07-23 stsp <dt id="k"><a class="permalink" href="#k"><code class="Fl">-k</code></a></dt>
1185 8b679b4b 2020-02-17 stsp <dd>Keep affected files on disk.</dd>
1186 2dbbbc3a 2020-07-23 stsp <dt id="R~6"><a class="permalink" href="#R~6"><code class="Fl">-R</code></a></dt>
1187 8b679b4b 2020-02-17 stsp <dd>Permit recursion into directories. If this option is not specified,
1188 8b679b4b 2020-02-17 stsp <code class="Cm">got remove</code> will refuse to run if a specified
1189 8b679b4b 2020-02-17 stsp <var class="Ar">path</var> is a directory.</dd>
1190 feee6923 2020-09-17 stsp <dt id="s~5"><a class="permalink" href="#s~5"><code class="Fl">-s</code></a>
1191 feee6923 2020-09-17 stsp <var class="Ar">status-codes</var></dt>
1192 feee6923 2020-09-17 stsp <dd>Only delete files with a modification status matching one of the
1193 feee6923 2020-09-17 stsp single-character status codes contained in the
1194 feee6923 2020-09-17 stsp <var class="Ar">status-codes</var> argument. The following status
1195 feee6923 2020-09-17 stsp codes may be specified:
1196 feee6923 2020-09-17 stsp <table class="Bl-column">
1197 feee6923 2020-09-17 stsp <tr>
1198 feee6923 2020-09-17 stsp <td>M</td>
1199 feee6923 2020-09-17 stsp <td>modified file (this implies the <code class="Fl">-f</code>
1200 feee6923 2020-09-17 stsp option)</td>
1201 feee6923 2020-09-17 stsp </tr>
1202 feee6923 2020-09-17 stsp <tr>
1203 feee6923 2020-09-17 stsp <td>!</td>
1204 feee6923 2020-09-17 stsp <td>versioned file expected on disk but missing</td>
1205 feee6923 2020-09-17 stsp </tr>
1206 feee6923 2020-09-17 stsp </table>
1207 feee6923 2020-09-17 stsp </dd>
1208 8797b228 2019-08-04 stsp </dl>
1209 8797b228 2019-08-04 stsp </dd>
1210 63b69821 2021-10-16 stsp <dt id="rv"><a class="permalink" href="#revert"><code class="Cm" id="revert">revert</code></a>
1211 7da3b7f6 2019-08-08 stsp [<code class="Fl">-p</code>] [<code class="Fl">-F</code>
1212 7da3b7f6 2019-08-08 stsp <var class="Ar">response-script</var>] [<code class="Fl">-R</code>]
1213 7da3b7f6 2019-08-08 stsp <var class="Ar">path ...</var></dt>
1214 63b69821 2021-10-16 stsp <dd>
1215 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
1216 46043f6f 2021-11-23 stsp <code class="Cm">rv</code>)</code></div>
1217 46043f6f 2021-11-23 stsp Revert any local changes in files at the specified paths in a work tree.
1218 a462773e 2020-04-19 stsp File contents will be overwritten with those contained in the work tree's
1219 a462773e 2020-04-19 stsp base commit. There is no way to bring discarded changes back after
1220 8797b228 2019-08-04 stsp <code class="Cm">got revert</code>!
1221 8797b228 2019-08-04 stsp <p class="Pp">If a file was added with <code class="Cm">got add</code> it
1222 8797b228 2019-08-04 stsp will become an unversioned file again. If a file was deleted with
1223 8797b228 2019-08-04 stsp <code class="Cm">got remove</code> it will be restored.</p>
1224 7da3b7f6 2019-08-08 stsp <p class="Pp">The options for <code class="Cm">got revert</code> are as
1225 7da3b7f6 2019-08-08 stsp follows:</p>
1226 7da3b7f6 2019-08-08 stsp <dl class="Bl-tag">
1227 2dbbbc3a 2020-07-23 stsp <dt id="p~3"><a class="permalink" href="#p~3"><code class="Fl">-p</code></a></dt>
1228 7da3b7f6 2019-08-08 stsp <dd>Instead of reverting all changes in files, interactively select or
1229 7da3b7f6 2019-08-08 stsp reject changes to revert based on &#x201C;y&#x201D; (revert change),
1230 7da3b7f6 2019-08-08 stsp &#x201C;n&#x201D; (keep change), and &#x201C;q&#x201D; (quit reverting
1231 7da3b7f6 2019-08-08 stsp this file) responses. If a file is in modified status, individual
1232 7da3b7f6 2019-08-08 stsp patches derived from the modified file content can be reverted. Files
1233 7da3b7f6 2019-08-08 stsp in added or deleted status may only be reverted in their
1234 7da3b7f6 2019-08-08 stsp entirety.</dd>
1235 2dbbbc3a 2020-07-23 stsp <dt id="F"><a class="permalink" href="#F"><code class="Fl">-F</code></a>
1236 7da3b7f6 2019-08-08 stsp <var class="Ar">response-script</var></dt>
1237 7da3b7f6 2019-08-08 stsp <dd>With the <code class="Fl">-p</code> option, read &#x201C;y&#x201D;,
1238 7da3b7f6 2019-08-08 stsp &#x201C;n&#x201D;, and &#x201C;q&#x201D; responses line-by-line from
1239 7da3b7f6 2019-08-08 stsp the specified <var class="Ar">response-script</var> file instead of
1240 7da3b7f6 2019-08-08 stsp prompting interactively.</dd>
1241 2dbbbc3a 2020-07-23 stsp <dt id="R~7"><a class="permalink" href="#R~7"><code class="Fl">-R</code></a></dt>
1242 7da3b7f6 2019-08-08 stsp <dd>Permit recursion into directories. If this option is not specified,
1243 7da3b7f6 2019-08-08 stsp <code class="Cm">got revert</code> will refuse to run if a specified
1244 7da3b7f6 2019-08-08 stsp <var class="Ar">path</var> is a directory.</dd>
1245 7da3b7f6 2019-08-08 stsp </dl>
1246 8797b228 2019-08-04 stsp </dd>
1247 63b69821 2021-10-16 stsp <dt id="ci"><a class="permalink" href="#commit"><code class="Cm" id="commit">commit</code></a>
1248 039953c9 2021-03-22 stsp [<code class="Fl">-F</code> <var class="Ar">path</var>]
1249 8797b228 2019-08-04 stsp [<code class="Fl">-m</code> <var class="Ar">message</var>]
1250 039953c9 2021-03-22 stsp [<code class="Fl">-N</code>] [<code class="Fl">-S</code>]
1251 039953c9 2021-03-22 stsp [<var class="Ar">path ...</var>]</dt>
1252 63b69821 2021-10-16 stsp <dd>
1253 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
1254 46043f6f 2021-11-23 stsp <code class="Cm">ci</code>)</code></div>
1255 46043f6f 2021-11-23 stsp Create a new commit in the repository from changes in a work tree and use
1256 8797b228 2019-08-04 stsp this commit as the new base commit for the work tree. If no
1257 8797b228 2019-08-04 stsp <var class="Ar">path</var> is specified, commit all changes in the work
1258 8797b228 2019-08-04 stsp tree. Otherwise, commit changes at or within the specified paths.
1259 8797b228 2019-08-04 stsp <p class="Pp">If changes have been explicitly staged for commit with
1260 4967d3c2 2019-08-12 stsp <code class="Cm">got stage</code>, only commit staged changes and reject
1261 8797b228 2019-08-04 stsp any specified paths which have not been staged.</p>
1262 039953c9 2021-03-22 stsp <p class="Pp"><code class="Cm">got commit</code> opens a temporary file in
1263 039953c9 2021-03-22 stsp an editor where a log message can be written unless the
1264 039953c9 2021-03-22 stsp <code class="Fl">-m</code> option is used or the
1265 039953c9 2021-03-22 stsp <code class="Fl">-F</code> and <code class="Fl">-N</code> options are
1266 039953c9 2021-03-22 stsp used together.</p>
1267 8797b228 2019-08-04 stsp <p class="Pp">Show the status of each affected file, using the following
1268 8797b228 2019-08-04 stsp status codes:</p>
1269 8797b228 2019-08-04 stsp <table class="Bl-column">
1270 8797b228 2019-08-04 stsp <tr>
1271 8797b228 2019-08-04 stsp <td>M</td>
1272 8797b228 2019-08-04 stsp <td>modified file</td>
1273 8797b228 2019-08-04 stsp </tr>
1274 8797b228 2019-08-04 stsp <tr>
1275 8797b228 2019-08-04 stsp <td>D</td>
1276 8797b228 2019-08-04 stsp <td>file was deleted</td>
1277 8797b228 2019-08-04 stsp </tr>
1278 8797b228 2019-08-04 stsp <tr>
1279 8797b228 2019-08-04 stsp <td>A</td>
1280 8797b228 2019-08-04 stsp <td>new file was added</td>
1281 d8e62599 2019-10-21 stsp </tr>
1282 d8e62599 2019-10-21 stsp <tr>
1283 d8e62599 2019-10-21 stsp <td>m</td>
1284 d8e62599 2019-10-21 stsp <td>modified file modes (executable bit only)</td>
1285 8797b228 2019-08-04 stsp </tr>
1286 8797b228 2019-08-04 stsp </table>
1287 ae520cae 2019-08-05 stsp <p class="Pp">Files which are not part of the new commit will retain their
1288 ae520cae 2019-08-05 stsp previously recorded base commit. Some <code class="Nm">got</code>
1289 ae520cae 2019-08-05 stsp commands may refuse to run while the work tree contains files from
1290 ae520cae 2019-08-05 stsp multiple base commits. The base commit of such a work tree can be made
1291 ae520cae 2019-08-05 stsp consistent by running <code class="Cm">got update</code> across the
1292 ae520cae 2019-08-05 stsp entire work tree.</p>
1293 8797b228 2019-08-04 stsp <p class="Pp">The <code class="Cm">got commit</code> command requires the
1294 c2a52be5 2019-09-08 stsp <code class="Ev">GOT_AUTHOR</code> environment variable to be set,
1295 feee6923 2020-09-17 stsp unless an author has been configured in <a class="Xr">got.conf(5)</a> or
1296 feee6923 2020-09-17 stsp Git's <code class="Dv">user.name</code> and
1297 39293a23 2019-09-08 stsp <code class="Dv">user.email</code> configuration settings can be
1298 c2a52be5 2019-09-08 stsp obtained from the repository's <span class="Pa">.git/config</span> file
1299 c2a52be5 2019-09-08 stsp or from Git's global <span class="Pa">~/.gitconfig</span> configuration
1300 c2a52be5 2019-09-08 stsp file.</p>
1301 8797b228 2019-08-04 stsp <p class="Pp">The options for <code class="Cm">got commit</code> are as
1302 8797b228 2019-08-04 stsp follows:</p>
1303 8797b228 2019-08-04 stsp <dl class="Bl-tag">
1304 039953c9 2021-03-22 stsp <dt id="F~2"><a class="permalink" href="#F~2"><code class="Fl">-F</code></a>
1305 039953c9 2021-03-22 stsp <var class="Ar">path</var></dt>
1306 039953c9 2021-03-22 stsp <dd>Use the prepared log message stored in the file found at
1307 039953c9 2021-03-22 stsp <var class="Ar">path</var> when creating the new commit.
1308 039953c9 2021-03-22 stsp <code class="Cm">got commit</code> opens a temporary file in an editor
1309 039953c9 2021-03-22 stsp where the prepared log message can be reviewed and edited further if
1310 039953c9 2021-03-22 stsp needed. Cannot be used together with the <code class="Fl">-m</code>
1311 039953c9 2021-03-22 stsp option.</dd>
1312 2dbbbc3a 2020-07-23 stsp <dt id="m~4"><a class="permalink" href="#m~4"><code class="Fl">-m</code></a>
1313 8797b228 2019-08-04 stsp <var class="Ar">message</var></dt>
1314 039953c9 2021-03-22 stsp <dd>Use the specified log message when creating the new commit. Cannot be
1315 039953c9 2021-03-22 stsp used together with the <code class="Fl">-F</code> option.</dd>
1316 039953c9 2021-03-22 stsp <dt id="N"><a class="permalink" href="#N"><code class="Fl">-N</code></a></dt>
1317 039953c9 2021-03-22 stsp <dd>This option prevents <code class="Cm">got commit</code> from opening
1318 039953c9 2021-03-22 stsp the commit message in an editor. It has no effect unless it is used
1319 039953c9 2021-03-22 stsp together with the <code class="Fl">-F</code> option and is intended
1320 039953c9 2021-03-22 stsp for non-interactive use such as scripting.</dd>
1321 4448c231 2021-09-15 stsp <dt id="S~2"><a class="permalink" href="#S~2"><code class="Fl">-S</code></a></dt>
1322 1554b334 2020-08-02 stsp <dd>Allow the addition of symbolic links which point outside of the path
1323 1554b334 2020-08-02 stsp space that is under version control. By default, <code class="Cm">got
1324 1554b334 2020-08-02 stsp commit</code> will reject such symbolic links due to safety concerns.
1325 1554b334 2020-08-02 stsp As a precaution, <code class="Nm">got</code> may decide to represent
1326 1554b334 2020-08-02 stsp such a symbolic link as a regular file which contains the link's
1327 1554b334 2020-08-02 stsp target path, rather than creating an actual symbolic link which points
1328 1554b334 2020-08-02 stsp outside of the work tree. Use of this option is discouraged because
1329 1554b334 2020-08-02 stsp external mechanisms such as &#x201C;make obj&#x201D; are better suited
1330 1554b334 2020-08-02 stsp for managing symbolic links to paths not under version control.</dd>
1331 8797b228 2019-08-04 stsp </dl>
1332 8797b228 2019-08-04 stsp <p class="Pp"><code class="Cm">got commit</code> will refuse to run if
1333 8797b228 2019-08-04 stsp certain preconditions are not met. If the work tree's current branch is
1334 8797b228 2019-08-04 stsp not in the &#x201C;refs/heads/&#x201D; reference namespace, new commits
1335 8797b228 2019-08-04 stsp may not be created on this branch. Local changes may only be committed
1336 8797b228 2019-08-04 stsp if they are based on file content found in the most recent commit on the
1337 8797b228 2019-08-04 stsp work tree's branch. If a path is found to be out of date,
1338 8797b228 2019-08-04 stsp <code class="Cm">got update</code> must be used first in order to merge
1339 8797b228 2019-08-04 stsp local changes with changes made in the repository.</p>
1340 8797b228 2019-08-04 stsp </dd>
1341 63b69821 2021-10-16 stsp <dt id="se"><a class="permalink" href="#send"><code class="Cm" id="send">send</code></a>
1342 def5be4a 2021-08-31 stsp [<code class="Fl">-a</code>] [<code class="Fl">-b</code>
1343 def5be4a 2021-08-31 stsp <var class="Ar">branch</var>] [<code class="Fl">-d</code>
1344 def5be4a 2021-08-31 stsp <var class="Ar">branch</var>] [<code class="Fl">-f</code>]
1345 def5be4a 2021-08-31 stsp [<code class="Fl">-r</code> <var class="Ar">repository-path</var>]
1346 def5be4a 2021-08-31 stsp [<code class="Fl">-t</code> <var class="Ar">tag</var>]
1347 def5be4a 2021-08-31 stsp [<code class="Fl">-T</code>] [<code class="Fl">-q</code>]
1348 def5be4a 2021-08-31 stsp [<code class="Fl">-v</code>] [<var class="Ar">remote-repository</var>]</dt>
1349 63b69821 2021-10-16 stsp <dd>
1350 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
1351 46043f6f 2021-11-23 stsp <code class="Cm">se</code>)</code></div>
1352 46043f6f 2021-11-23 stsp Send new changes to a remote repository. If no
1353 def5be4a 2021-08-31 stsp <var class="Ar">remote-repository</var> is specified,
1354 def5be4a 2021-08-31 stsp &#x201C;origin&#x201D; will be used. The remote repository's URL is
1355 def5be4a 2021-08-31 stsp obtained from the corresponding entry in <a class="Xr">got.conf(5)</a> or
1356 def5be4a 2021-08-31 stsp Git's <span class="Pa">config</span> file of the local repository, as
1357 def5be4a 2021-08-31 stsp created by <code class="Cm">got clone</code>.
1358 def5be4a 2021-08-31 stsp <p class="Pp">All objects corresponding to new changes will be written to a
1359 def5be4a 2021-08-31 stsp temporary pack file which is then uploaded to the server. Upon success,
1360 def5be4a 2021-08-31 stsp references in the &#x201C;refs/remotes/&#x201D; reference namespace of
1361 def5be4a 2021-08-31 stsp the local repository will be updated to point at the commits which have
1362 def5be4a 2021-08-31 stsp been sent.</p>
1363 def5be4a 2021-08-31 stsp <p class="Pp">By default, changes will only be sent if they are based on
1364 def5be4a 2021-08-31 stsp up-to-date copies of relevant branches in the remote repository. If any
1365 def5be4a 2021-08-31 stsp changes to be sent are based on out-of-date copies or would otherwise
1366 def5be4a 2021-08-31 stsp break linear history of existing branches, new changes must be fetched
1367 def5be4a 2021-08-31 stsp from the server with <code class="Cm">got fetch</code> and local
1368 def5be4a 2021-08-31 stsp branches must be rebased with <code class="Cm">got rebase</code> before
1369 def5be4a 2021-08-31 stsp <code class="Cm">got send</code> can succeed. The
1370 def5be4a 2021-08-31 stsp <code class="Fl">-f</code> option can be used to make exceptions to
1371 def5be4a 2021-08-31 stsp these requirements.</p>
1372 def5be4a 2021-08-31 stsp <p class="Pp">The options for <code class="Cm">got send</code> are as
1373 def5be4a 2021-08-31 stsp follows:</p>
1374 def5be4a 2021-08-31 stsp <dl class="Bl-tag">
1375 def5be4a 2021-08-31 stsp <dt id="a~4"><a class="permalink" href="#a~4"><code class="Fl">-a</code></a></dt>
1376 def5be4a 2021-08-31 stsp <dd>Send all branches from the local repository's
1377 def5be4a 2021-08-31 stsp &#x201C;refs/heads/&#x201D; reference namespace. The
1378 def5be4a 2021-08-31 stsp <code class="Fl">-a</code> option is equivalent to listing all
1379 def5be4a 2021-08-31 stsp branches with multiple <code class="Fl">-b</code> options. Cannot be
1380 def5be4a 2021-08-31 stsp used together with the <code class="Fl">-b</code> option.</dd>
1381 def5be4a 2021-08-31 stsp <dt id="b~7"><a class="permalink" href="#b~7"><code class="Fl">-b</code></a>
1382 def5be4a 2021-08-31 stsp <var class="Ar">branch</var></dt>
1383 def5be4a 2021-08-31 stsp <dd>Send the specified <var class="Ar">branch</var> from the local
1384 def5be4a 2021-08-31 stsp repository's &#x201C;refs/heads/&#x201D; reference namespace. This
1385 def5be4a 2021-08-31 stsp option may be specified multiple times to build a list of branches to
1386 def5be4a 2021-08-31 stsp send. If this option is not specified, default to the work tree's
1387 def5be4a 2021-08-31 stsp current branch if invoked in a work tree, or to the repository's HEAD
1388 def5be4a 2021-08-31 stsp reference. Cannot be used together with the <code class="Fl">-a</code>
1389 def5be4a 2021-08-31 stsp option.</dd>
1390 def5be4a 2021-08-31 stsp <dt id="d~4"><a class="permalink" href="#d~4"><code class="Fl">-d</code></a>
1391 def5be4a 2021-08-31 stsp <var class="Ar">branch</var></dt>
1392 def5be4a 2021-08-31 stsp <dd>Delete the specified <var class="Ar">branch</var> from the remote
1393 def5be4a 2021-08-31 stsp repository's &#x201C;refs/heads/&#x201D; reference namespace. This
1394 def5be4a 2021-08-31 stsp option may be specified multiple times to build a list of branches to
1395 def5be4a 2021-08-31 stsp delete.
1396 def5be4a 2021-08-31 stsp <p class="Pp">Only references are deleted. Any commit, tree, tag, and
1397 def5be4a 2021-08-31 stsp blob objects belonging to deleted branches may become subject to
1398 def5be4a 2021-08-31 stsp deletion by Git's garbage collector running on the server.</p>
1399 def5be4a 2021-08-31 stsp <p class="Pp">Requesting deletion of branches results in an error if the
1400 def5be4a 2021-08-31 stsp server does not support this feature or disallows the deletion of
1401 def5be4a 2021-08-31 stsp branches based on its configuration.</p>
1402 def5be4a 2021-08-31 stsp </dd>
1403 def5be4a 2021-08-31 stsp <dt id="f~2"><a class="permalink" href="#f~2"><code class="Fl">-f</code></a></dt>
1404 def5be4a 2021-08-31 stsp <dd>Attempt to force the server to overwrite existing branches or tags in
1405 def5be4a 2021-08-31 stsp the remote repository, even when <code class="Cm">got fetch</code> and
1406 def5be4a 2021-08-31 stsp <code class="Cm">got rebase</code> would usually be required before
1407 def5be4a 2021-08-31 stsp changes can be sent. The server may reject forced requests regardless,
1408 def5be4a 2021-08-31 stsp depending on its configuration.
1409 def5be4a 2021-08-31 stsp <p class="Pp">Any commit, tree, tag, and blob objects belonging to
1410 def5be4a 2021-08-31 stsp overwritten branches or tags may become subject to deletion by Git's
1411 def5be4a 2021-08-31 stsp garbage collector running on the server.</p>
1412 def5be4a 2021-08-31 stsp <p class="Pp">The &#x201C;refs/tags&#x201D; reference namespace is
1413 def5be4a 2021-08-31 stsp globally shared between all repositories. Use of the
1414 def5be4a 2021-08-31 stsp <code class="Fl">-f</code> option to overwrite tags is discouraged
1415 def5be4a 2021-08-31 stsp because it can lead to inconsistencies between the tags present in
1416 def5be4a 2021-08-31 stsp different repositories. In general, creating a new tag with a
1417 def5be4a 2021-08-31 stsp different name is recommended instead of overwriting an existing
1418 def5be4a 2021-08-31 stsp tag.</p>
1419 def5be4a 2021-08-31 stsp <p class="Pp">Use of the <code class="Fl">-f</code> option is
1420 def5be4a 2021-08-31 stsp particularly discouraged if changes being sent are based on an
1421 def5be4a 2021-08-31 stsp out-of-date copy of a branch in the remote repository. Instead of
1422 def5be4a 2021-08-31 stsp using the <code class="Fl">-f</code> option, new changes should be
1423 def5be4a 2021-08-31 stsp fetched with <code class="Cm">got fetch</code> and local branches
1424 def5be4a 2021-08-31 stsp should be rebased with <code class="Cm">got rebase</code>, followed
1425 def5be4a 2021-08-31 stsp by another attempt to send the changes.</p>
1426 def5be4a 2021-08-31 stsp <p class="Pp">The <code class="Fl">-f</code> option should only be
1427 def5be4a 2021-08-31 stsp needed in situations where the remote repository's copy of a branch
1428 def5be4a 2021-08-31 stsp or tag is known to be out-of-date and is considered disposable. The
1429 def5be4a 2021-08-31 stsp risks of creating inconsistencies between different repositories
1430 def5be4a 2021-08-31 stsp should also be taken into account.</p>
1431 def5be4a 2021-08-31 stsp </dd>
1432 def5be4a 2021-08-31 stsp <dt id="r~10"><a class="permalink" href="#r~10"><code class="Fl">-r</code></a>
1433 def5be4a 2021-08-31 stsp <var class="Ar">repository-path</var></dt>
1434 def5be4a 2021-08-31 stsp <dd>Use the repository at the specified path. If not specified, assume the
1435 def5be4a 2021-08-31 stsp repository is located at or above the current working directory. If
1436 def5be4a 2021-08-31 stsp this directory is a <code class="Nm">got</code> work tree, use the
1437 def5be4a 2021-08-31 stsp repository path associated with this work tree.</dd>
1438 46043f6f 2021-11-23 stsp <dt id="t~4"><a class="permalink" href="#t~4"><code class="Fl">-t</code></a>
1439 def5be4a 2021-08-31 stsp <var class="Ar">tag</var></dt>
1440 def5be4a 2021-08-31 stsp <dd>Send the specified <var class="Ar">tag</var> from the local
1441 def5be4a 2021-08-31 stsp repository's &#x201C;refs/tags/&#x201D; reference namespace, in
1442 def5be4a 2021-08-31 stsp addition to any branches that are being sent. The
1443 def5be4a 2021-08-31 stsp <code class="Fl">-t</code> option may be specified multiple times to
1444 def5be4a 2021-08-31 stsp build a list of tags to send. No tags will be sent if the
1445 def5be4a 2021-08-31 stsp <code class="Fl">-t</code> option is not used.
1446 def5be4a 2021-08-31 stsp <p class="Pp">Raise an error if the specified <var class="Ar">tag</var>
1447 def5be4a 2021-08-31 stsp already exists in the remote repository, unless the
1448 def5be4a 2021-08-31 stsp <code class="Fl">-f</code> option is used to overwrite the server's
1449 def5be4a 2021-08-31 stsp copy of the tag. In general, creating a new tag with a different
1450 def5be4a 2021-08-31 stsp name is recommended instead of overwriting an existing tag.</p>
1451 def5be4a 2021-08-31 stsp <p class="Pp">Cannot be used together with the
1452 def5be4a 2021-08-31 stsp <code class="Fl">-T</code> option.</p>
1453 def5be4a 2021-08-31 stsp </dd>
1454 def5be4a 2021-08-31 stsp <dt id="T"><a class="permalink" href="#T"><code class="Fl">-T</code></a></dt>
1455 def5be4a 2021-08-31 stsp <dd>Attempt to send all tags from the local repository's
1456 def5be4a 2021-08-31 stsp &#x201C;refs/tags/&#x201D; reference namespace. The
1457 def5be4a 2021-08-31 stsp <code class="Fl">-T</code> option is equivalent to listing all tags
1458 def5be4a 2021-08-31 stsp with multiple <code class="Fl">-t</code> options. Cannot be used
1459 def5be4a 2021-08-31 stsp together with the <code class="Fl">-t</code> option.</dd>
1460 4448c231 2021-09-15 stsp <dt id="q~5"><a class="permalink" href="#q~5"><code class="Fl">-q</code></a></dt>
1461 def5be4a 2021-08-31 stsp <dd>Suppress progress reporting output. The same option will be passed to
1462 def5be4a 2021-08-31 stsp <a class="Xr">ssh(1)</a> if applicable.</dd>
1463 def5be4a 2021-08-31 stsp <dt id="v~3"><a class="permalink" href="#v~3"><code class="Fl">-v</code></a></dt>
1464 def5be4a 2021-08-31 stsp <dd>Verbose mode. Causes <code class="Cm">got send</code> to print
1465 def5be4a 2021-08-31 stsp debugging messages to standard error output. The same option will be
1466 def5be4a 2021-08-31 stsp passed to <a class="Xr">ssh(1)</a> if applicable. Multiple -v options
1467 def5be4a 2021-08-31 stsp increase the verbosity. The maximum is 3.</dd>
1468 def5be4a 2021-08-31 stsp </dl>
1469 def5be4a 2021-08-31 stsp </dd>
1470 63b69821 2021-10-16 stsp <dt id="cy"><a class="permalink" href="#cherrypick"><code class="Cm" id="cherrypick">cherrypick</code></a>
1471 8797b228 2019-08-04 stsp <var class="Ar">commit</var></dt>
1472 63b69821 2021-10-16 stsp <dd>
1473 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
1474 46043f6f 2021-11-23 stsp <code class="Cm">cy</code>)</code></div>
1475 46043f6f 2021-11-23 stsp Merge changes from a single <var class="Ar">commit</var> into the work tree.
1476 46043f6f 2021-11-23 stsp The specified <var class="Ar">commit</var> should be on a different branch
1477 46043f6f 2021-11-23 stsp than the work tree's base commit. The expected argument is a reference or
1478 46043f6f 2021-11-23 stsp a commit ID SHA1 hash. An abbreviated hash argument will be expanded to a
1479 46043f6f 2021-11-23 stsp full SHA1 hash automatically, provided the abbreviation is unique.
1480 8797b228 2019-08-04 stsp <p class="Pp">Show the status of each affected file, using the following
1481 8797b228 2019-08-04 stsp status codes:</p>
1482 8797b228 2019-08-04 stsp <table class="Bl-column">
1483 8797b228 2019-08-04 stsp <tr>
1484 8797b228 2019-08-04 stsp <td>G</td>
1485 8797b228 2019-08-04 stsp <td>file was merged</td>
1486 8797b228 2019-08-04 stsp </tr>
1487 8797b228 2019-08-04 stsp <tr>
1488 8797b228 2019-08-04 stsp <td>C</td>
1489 8797b228 2019-08-04 stsp <td>file was merged and conflicts occurred during merge</td>
1490 8797b228 2019-08-04 stsp </tr>
1491 8797b228 2019-08-04 stsp <tr>
1492 8797b228 2019-08-04 stsp <td>!</td>
1493 8797b228 2019-08-04 stsp <td>changes destined for a missing file were not merged</td>
1494 8797b228 2019-08-04 stsp </tr>
1495 8797b228 2019-08-04 stsp <tr>
1496 8797b228 2019-08-04 stsp <td>D</td>
1497 8797b228 2019-08-04 stsp <td>file was deleted</td>
1498 8797b228 2019-08-04 stsp </tr>
1499 8797b228 2019-08-04 stsp <tr>
1500 8797b228 2019-08-04 stsp <td>d</td>
1501 417cb057 2021-10-03 stsp <td>file's deletion was prevented by local modifications</td>
1502 8797b228 2019-08-04 stsp </tr>
1503 8797b228 2019-08-04 stsp <tr>
1504 8797b228 2019-08-04 stsp <td>A</td>
1505 8797b228 2019-08-04 stsp <td>new file was added</td>
1506 8797b228 2019-08-04 stsp </tr>
1507 8797b228 2019-08-04 stsp <tr>
1508 8797b228 2019-08-04 stsp <td>~</td>
1509 8797b228 2019-08-04 stsp <td>changes destined for a non-regular file were not merged</td>
1510 8797b228 2019-08-04 stsp </tr>
1511 1554b334 2020-08-02 stsp <tr>
1512 1554b334 2020-08-02 stsp <td>?</td>
1513 1554b334 2020-08-02 stsp <td>changes destined for an unversioned file were not merged</td>
1514 1554b334 2020-08-02 stsp </tr>
1515 8797b228 2019-08-04 stsp </table>
1516 8797b228 2019-08-04 stsp <p class="Pp">The merged changes will appear as local changes in the work
1517 8797b228 2019-08-04 stsp tree, which may be viewed with <code class="Cm">got diff</code>, amended
1518 91b3da3f 2019-08-18 stsp manually or with further <code class="Cm">got cherrypick</code>
1519 91b3da3f 2019-08-18 stsp commands, committed with <code class="Cm">got commit</code>, or
1520 91b3da3f 2019-08-18 stsp discarded again with <code class="Cm">got revert</code>.</p>
1521 8797b228 2019-08-04 stsp <p class="Pp"><code class="Cm">got cherrypick</code> will refuse to run if
1522 8797b228 2019-08-04 stsp certain preconditions are not met. If the work tree contains multiple
1523 8797b228 2019-08-04 stsp base commits it must first be updated to a single base commit with
1524 1e80276a 2021-09-03 stsp <code class="Cm">got update</code>. If any relevant files already
1525 1e80276a 2021-09-03 stsp contain merge conflicts, these conflicts must be resolved first.</p>
1526 8797b228 2019-08-04 stsp </dd>
1527 63b69821 2021-10-16 stsp <dt id="bo"><a class="permalink" href="#backout"><code class="Cm" id="backout">backout</code></a>
1528 8797b228 2019-08-04 stsp <var class="Ar">commit</var></dt>
1529 63b69821 2021-10-16 stsp <dd>
1530 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
1531 46043f6f 2021-11-23 stsp <code class="Cm">bo</code>)</code></div>
1532 46043f6f 2021-11-23 stsp Reverse-merge changes from a single <var class="Ar">commit</var> into the
1533 1e80276a 2021-09-03 stsp work tree. The specified <var class="Ar">commit</var> should be on the
1534 1e80276a 2021-09-03 stsp same branch as the work tree's base commit. The expected argument is a
1535 8797b228 2019-08-04 stsp reference or a commit ID SHA1 hash. An abbreviated hash argument will be
1536 8797b228 2019-08-04 stsp expanded to a full SHA1 hash automatically, provided the abbreviation is
1537 8797b228 2019-08-04 stsp unique.
1538 8797b228 2019-08-04 stsp <p class="Pp">Show the status of each affected file, using the following
1539 8797b228 2019-08-04 stsp status codes:</p>
1540 8797b228 2019-08-04 stsp <table class="Bl-column">
1541 8797b228 2019-08-04 stsp <tr>
1542 8797b228 2019-08-04 stsp <td>G</td>
1543 8797b228 2019-08-04 stsp <td>file was merged</td>
1544 8797b228 2019-08-04 stsp </tr>
1545 8797b228 2019-08-04 stsp <tr>
1546 8797b228 2019-08-04 stsp <td>C</td>
1547 8797b228 2019-08-04 stsp <td>file was merged and conflicts occurred during merge</td>
1548 8797b228 2019-08-04 stsp </tr>
1549 8797b228 2019-08-04 stsp <tr>
1550 8797b228 2019-08-04 stsp <td>!</td>
1551 8797b228 2019-08-04 stsp <td>changes destined for a missing file were not merged</td>
1552 8797b228 2019-08-04 stsp </tr>
1553 8797b228 2019-08-04 stsp <tr>
1554 8797b228 2019-08-04 stsp <td>D</td>
1555 8797b228 2019-08-04 stsp <td>file was deleted</td>
1556 8797b228 2019-08-04 stsp </tr>
1557 8797b228 2019-08-04 stsp <tr>
1558 8797b228 2019-08-04 stsp <td>d</td>
1559 417cb057 2021-10-03 stsp <td>file's deletion was prevented by local modifications</td>
1560 8797b228 2019-08-04 stsp </tr>
1561 8797b228 2019-08-04 stsp <tr>
1562 8797b228 2019-08-04 stsp <td>A</td>
1563 8797b228 2019-08-04 stsp <td>new file was added</td>
1564 8797b228 2019-08-04 stsp </tr>
1565 8797b228 2019-08-04 stsp <tr>
1566 8797b228 2019-08-04 stsp <td>~</td>
1567 8797b228 2019-08-04 stsp <td>changes destined for a non-regular file were not merged</td>
1568 8797b228 2019-08-04 stsp </tr>
1569 1554b334 2020-08-02 stsp <tr>
1570 1554b334 2020-08-02 stsp <td>?</td>
1571 1554b334 2020-08-02 stsp <td>changes destined for an unversioned file were not merged</td>
1572 1554b334 2020-08-02 stsp </tr>
1573 8797b228 2019-08-04 stsp </table>
1574 8797b228 2019-08-04 stsp <p class="Pp">The reverse-merged changes will appear as local changes in the
1575 8797b228 2019-08-04 stsp work tree, which may be viewed with <code class="Cm">got diff</code>,
1576 8797b228 2019-08-04 stsp amended manually or with further <code class="Cm">got backout</code>
1577 91b3da3f 2019-08-18 stsp commands, committed with <code class="Cm">got commit</code>, or
1578 91b3da3f 2019-08-18 stsp discarded again with <code class="Cm">got revert</code>.</p>
1579 8797b228 2019-08-04 stsp <p class="Pp"><code class="Cm">got backout</code> will refuse to run if
1580 8797b228 2019-08-04 stsp certain preconditions are not met. If the work tree contains multiple
1581 8797b228 2019-08-04 stsp base commits it must first be updated to a single base commit with
1582 1e80276a 2021-09-03 stsp <code class="Cm">got update</code>. If any relevant files already
1583 1e80276a 2021-09-03 stsp contain merge conflicts, these conflicts must be resolved first.</p>
1584 8797b228 2019-08-04 stsp </dd>
1585 63b69821 2021-10-16 stsp <dt id="rb"><a class="permalink" href="#rebase"><code class="Cm" id="rebase">rebase</code></a>
1586 27b5d592 2019-08-11 stsp [<code class="Fl">-a</code>] [<code class="Fl">-c</code>]
1587 16cd1323 2021-07-26 stsp [<code class="Fl">-l</code>] [<code class="Fl">-X</code>]
1588 16cd1323 2021-07-26 stsp [<var class="Ar">branch</var>]</dt>
1589 63b69821 2021-10-16 stsp <dd>
1590 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
1591 46043f6f 2021-11-23 stsp <code class="Cm">rb</code>)</code></div>
1592 46043f6f 2021-11-23 stsp Rebase commits on the specified <var class="Ar">branch</var> onto the tip of
1593 46043f6f 2021-11-23 stsp the current branch of the work tree. The <var class="Ar">branch</var> must
1594 46043f6f 2021-11-23 stsp share common ancestry with the work tree's current branch. Rebasing begins
1595 46043f6f 2021-11-23 stsp with the first descendant commit of the youngest common ancestor commit
1596 46043f6f 2021-11-23 stsp shared by the specified <var class="Ar">branch</var> and the work tree's
1597 46043f6f 2021-11-23 stsp current branch, and stops once the tip commit of the specified
1598 8797b228 2019-08-04 stsp <var class="Ar">branch</var> has been rebased.
1599 7c3b4ab8 2020-02-25 stsp <p class="Pp">When <code class="Cm">got rebase</code> is used as intended,
1600 a43c0256 2020-02-25 stsp the specified <var class="Ar">branch</var> represents a local commit
1601 a43c0256 2020-02-25 stsp history and may already contain changes that are not yet visible in any
1602 a43c0256 2020-02-25 stsp other repositories. The work tree's current branch, which must be set
1603 a43c0256 2020-02-25 stsp with <code class="Cm">got update -b</code> before starting the
1604 a43c0256 2020-02-25 stsp <code class="Cm">rebase</code> operation, represents a branch from a
1605 a43c0256 2020-02-25 stsp remote repository which shares a common history with the specified
1606 a43c0256 2020-02-25 stsp <var class="Ar">branch</var> but has progressed, and perhaps diverged,
1607 a43c0256 2020-02-25 stsp due to commits added to the remote repository.</p>
1608 8797b228 2019-08-04 stsp <p class="Pp">Rebased commits are accumulated on a temporary branch which
1609 8797b228 2019-08-04 stsp the work tree will remain switched to throughout the entire rebase
1610 8797b228 2019-08-04 stsp operation. Commits on this branch represent the same changes with the
1611 8797b228 2019-08-04 stsp same log messages as their counterparts on the original
1612 8797b228 2019-08-04 stsp <var class="Ar">branch</var>, but with different commit IDs. Once
1613 8797b228 2019-08-04 stsp rebasing has completed successfully, the temporary branch becomes the
1614 8797b228 2019-08-04 stsp new version of the specified <var class="Ar">branch</var> and the work
1615 8797b228 2019-08-04 stsp tree is automatically switched to it.</p>
1616 039953c9 2021-03-22 stsp <p class="Pp">Old commits in their pre-rebase state are automatically backed
1617 039953c9 2021-03-22 stsp up in the &#x201C;refs/got/backup/rebase&#x201D; reference namespace. As
1618 039953c9 2021-03-22 stsp long as these references are not removed older versions of rebased
1619 039953c9 2021-03-22 stsp commits will remain in the repository and can be viewed with the
1620 039953c9 2021-03-22 stsp <code class="Cm">got rebase -l</code> command. Removal of these
1621 039953c9 2021-03-22 stsp references makes objects which become unreachable via any reference
1622 16cd1323 2021-07-26 stsp subject to removal by Git's garbage collector or
1623 16cd1323 2021-07-26 stsp <code class="Cm">gotadmin cleanup</code>.</p>
1624 8797b228 2019-08-04 stsp <p class="Pp">While rebasing commits, show the status of each affected file,
1625 8797b228 2019-08-04 stsp using the following status codes:</p>
1626 8797b228 2019-08-04 stsp <table class="Bl-column">
1627 8797b228 2019-08-04 stsp <tr>
1628 8797b228 2019-08-04 stsp <td>G</td>
1629 8797b228 2019-08-04 stsp <td>file was merged</td>
1630 8797b228 2019-08-04 stsp </tr>
1631 8797b228 2019-08-04 stsp <tr>
1632 8797b228 2019-08-04 stsp <td>C</td>
1633 8797b228 2019-08-04 stsp <td>file was merged and conflicts occurred during merge</td>
1634 8797b228 2019-08-04 stsp </tr>
1635 8797b228 2019-08-04 stsp <tr>
1636 8797b228 2019-08-04 stsp <td>!</td>
1637 8797b228 2019-08-04 stsp <td>changes destined for a missing file were not merged</td>
1638 8797b228 2019-08-04 stsp </tr>
1639 8797b228 2019-08-04 stsp <tr>
1640 8797b228 2019-08-04 stsp <td>D</td>
1641 8797b228 2019-08-04 stsp <td>file was deleted</td>
1642 8797b228 2019-08-04 stsp </tr>
1643 8797b228 2019-08-04 stsp <tr>
1644 8797b228 2019-08-04 stsp <td>d</td>
1645 417cb057 2021-10-03 stsp <td>file's deletion was prevented by local modifications</td>
1646 8797b228 2019-08-04 stsp </tr>
1647 8797b228 2019-08-04 stsp <tr>
1648 8797b228 2019-08-04 stsp <td>A</td>
1649 8797b228 2019-08-04 stsp <td>new file was added</td>
1650 8797b228 2019-08-04 stsp </tr>
1651 8797b228 2019-08-04 stsp <tr>
1652 8797b228 2019-08-04 stsp <td>~</td>
1653 8797b228 2019-08-04 stsp <td>changes destined for a non-regular file were not merged</td>
1654 8797b228 2019-08-04 stsp </tr>
1655 1554b334 2020-08-02 stsp <tr>
1656 1554b334 2020-08-02 stsp <td>?</td>
1657 1554b334 2020-08-02 stsp <td>changes destined for an unversioned file were not merged</td>
1658 1554b334 2020-08-02 stsp </tr>
1659 8797b228 2019-08-04 stsp </table>
1660 8797b228 2019-08-04 stsp <p class="Pp">If merge conflicts occur the rebase operation is interrupted
1661 417cb057 2021-10-03 stsp and may be continued once conflicts have been resolved. If any files
1662 417cb057 2021-10-03 stsp with destined changes are found to be missing or unversioned, or if
1663 417cb057 2021-10-03 stsp files could not be deleted due to differences in deleted content, the
1664 417cb057 2021-10-03 stsp rebase operation will be interrupted to prevent potentially incomplete
1665 417cb057 2021-10-03 stsp changes from being committed to the repository without user
1666 417cb057 2021-10-03 stsp intervention. The work tree may be modified as desired and the rebase
1667 417cb057 2021-10-03 stsp operation can be continued once the changes present in the work tree are
1668 417cb057 2021-10-03 stsp considered complete. Alternatively, the rebase operation may be aborted
1669 417cb057 2021-10-03 stsp which will leave <var class="Ar">branch</var> unmodified and the work
1670 417cb057 2021-10-03 stsp tree switched back to its original branch.</p>
1671 8797b228 2019-08-04 stsp <p class="Pp">If a merge conflict is resolved in a way which renders the
1672 8797b228 2019-08-04 stsp merged change into a no-op change, the corresponding commit will be
1673 8797b228 2019-08-04 stsp elided when the rebase operation continues.</p>
1674 8797b228 2019-08-04 stsp <p class="Pp"><code class="Cm">got rebase</code> will refuse to run if
1675 8b679b4b 2020-02-17 stsp certain preconditions are not met. If the work tree is not yet fully
1676 8b679b4b 2020-02-17 stsp updated to the tip commit of its branch then the work tree must first be
1677 8b679b4b 2020-02-17 stsp updated with <code class="Cm">got update</code>. If changes have been
1678 8b679b4b 2020-02-17 stsp staged with <code class="Cm">got stage</code>, these changes must first
1679 8b679b4b 2020-02-17 stsp be committed with <code class="Cm">got commit</code> or unstaged with
1680 8797b228 2019-08-04 stsp <code class="Cm">got unstage</code>. If the work tree contains local
1681 8797b228 2019-08-04 stsp changes, these changes must first be committed with <code class="Cm">got
1682 8797b228 2019-08-04 stsp commit</code> or reverted with <code class="Cm">got revert</code>. If
1683 8797b228 2019-08-04 stsp the <var class="Ar">branch</var> contains changes to files outside of
1684 8797b228 2019-08-04 stsp the work tree's path prefix, the work tree cannot be used to rebase this
1685 8797b228 2019-08-04 stsp branch.</p>
1686 8797b228 2019-08-04 stsp <p class="Pp">The <code class="Cm">got update</code> and
1687 8797b228 2019-08-04 stsp <code class="Cm">got commit</code> commands will refuse to run while a
1688 8797b228 2019-08-04 stsp rebase operation is in progress. Other commands which manipulate the
1689 8797b228 2019-08-04 stsp work tree may be used for conflict resolution purposes.</p>
1690 46043f6f 2021-11-23 stsp <p class="Pp">If the specified <var class="Ar">branch</var> is already based
1691 46043f6f 2021-11-23 stsp on the work tree's current branch then no commits need to be rebased and
1692 46043f6f 2021-11-23 stsp <code class="Cm">got rebase</code> will simply switch the work tree to
1693 46043f6f 2021-11-23 stsp the specified <var class="Ar">branch</var> and update files in the work
1694 46043f6f 2021-11-23 stsp tree accordingly.</p>
1695 8797b228 2019-08-04 stsp <p class="Pp">The options for <code class="Cm">got rebase</code> are as
1696 8797b228 2019-08-04 stsp follows:</p>
1697 8797b228 2019-08-04 stsp <dl class="Bl-tag">
1698 def5be4a 2021-08-31 stsp <dt id="a~5"><a class="permalink" href="#a~5"><code class="Fl">-a</code></a></dt>
1699 8797b228 2019-08-04 stsp <dd>Abort an interrupted rebase operation. If this option is used, no
1700 9b0c768d 2019-08-08 stsp other command-line arguments are allowed.</dd>
1701 63b69821 2021-10-16 stsp <dt id="c~10"><a class="permalink" href="#c~10"><code class="Fl">-c</code></a></dt>
1702 8797b228 2019-08-04 stsp <dd>Continue an interrupted rebase operation. If this option is used, no
1703 9b0c768d 2019-08-08 stsp other command-line arguments are allowed.</dd>
1704 039953c9 2021-03-22 stsp <dt id="l~7"><a class="permalink" href="#l~7"><code class="Fl">-l</code></a></dt>
1705 039953c9 2021-03-22 stsp <dd>Show a list of past rebase operations, represented by references in
1706 039953c9 2021-03-22 stsp the &#x201C;refs/got/backup/rebase&#x201D; reference namespace.
1707 039953c9 2021-03-22 stsp <p class="Pp">Display the author, date, and log message of each backed
1708 039953c9 2021-03-22 stsp up commit, the object ID of the corresponding post-rebase commit,
1709 039953c9 2021-03-22 stsp and the object ID of their common ancestor commit. Given these
1710 039953c9 2021-03-22 stsp object IDs, the <code class="Cm">got log</code> command with the
1711 039953c9 2021-03-22 stsp <code class="Fl">-c</code> and <code class="Fl">-x</code> options
1712 039953c9 2021-03-22 stsp can be used to examine the history of either version of the branch,
1713 039953c9 2021-03-22 stsp and the <code class="Cm">got branch</code> command with the
1714 039953c9 2021-03-22 stsp <code class="Fl">-c</code> option can be used to create a new branch
1715 039953c9 2021-03-22 stsp from a pre-rebase state if desired.</p>
1716 039953c9 2021-03-22 stsp <p class="Pp">If a <var class="Ar">branch</var> is specified, only show
1717 039953c9 2021-03-22 stsp commits which at some point in time represented this branch.
1718 039953c9 2021-03-22 stsp Otherwise, list all backed up commits for any branches.</p>
1719 039953c9 2021-03-22 stsp <p class="Pp">If this option is used, <code class="Cm">got rebase</code>
1720 039953c9 2021-03-22 stsp does not require a work tree. None of the other options can be used
1721 039953c9 2021-03-22 stsp together with <code class="Fl">-l</code>.</p>
1722 039953c9 2021-03-22 stsp </dd>
1723 16cd1323 2021-07-26 stsp <dt id="X~2"><a class="permalink" href="#X~2"><code class="Fl">-X</code></a></dt>
1724 16cd1323 2021-07-26 stsp <dd>Delete backups created by past rebase operations, represented by
1725 16cd1323 2021-07-26 stsp references in the &#x201C;refs/got/backup/rebase&#x201D; reference
1726 16cd1323 2021-07-26 stsp namespace.
1727 16cd1323 2021-07-26 stsp <p class="Pp">If a <var class="Ar">branch</var> is specified, only
1728 16cd1323 2021-07-26 stsp delete backups which at some point in time represented this branch.
1729 16cd1323 2021-07-26 stsp Otherwise, delete all references found within
1730 16cd1323 2021-07-26 stsp &#x201C;refs/got/backup/rebase&#x201D;.</p>
1731 16cd1323 2021-07-26 stsp <p class="Pp">Any commit, tree, tag, and blob objects belonging to
1732 16cd1323 2021-07-26 stsp deleted backups remain in the repository and may be removed
1733 16cd1323 2021-07-26 stsp separately with Git's garbage collector or <code class="Cm">gotadmin
1734 16cd1323 2021-07-26 stsp cleanup</code>.</p>
1735 16cd1323 2021-07-26 stsp <p class="Pp">If this option is used, <code class="Cm">got rebase</code>
1736 16cd1323 2021-07-26 stsp does not require a work tree. None of the other options can be used
1737 16cd1323 2021-07-26 stsp together with <code class="Fl">-X</code>.</p>
1738 16cd1323 2021-07-26 stsp </dd>
1739 8797b228 2019-08-04 stsp </dl>
1740 8797b228 2019-08-04 stsp </dd>
1741 63b69821 2021-10-16 stsp <dt id="he"><a class="permalink" href="#histedit"><code class="Cm" id="histedit">histedit</code></a>
1742 27b5d592 2019-08-11 stsp [<code class="Fl">-a</code>] [<code class="Fl">-c</code>]
1743 417cb057 2021-10-03 stsp [<code class="Fl">-e</code>] [<code class="Fl">-f</code>]
1744 417cb057 2021-10-03 stsp [<code class="Fl">-F</code> <var class="Ar">histedit-script</var>]
1745 417cb057 2021-10-03 stsp [<code class="Fl">-m</code>] [<code class="Fl">-l</code>]
1746 417cb057 2021-10-03 stsp [<code class="Fl">-X</code>] [<var class="Ar">branch</var>]</dt>
1747 63b69821 2021-10-16 stsp <dd>
1748 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
1749 46043f6f 2021-11-23 stsp <code class="Cm">he</code>)</code></div>
1750 46043f6f 2021-11-23 stsp Edit commit history between the work tree's current base commit and the tip
1751 46043f6f 2021-11-23 stsp commit of the work tree's current branch.
1752 7c3b4ab8 2020-02-25 stsp <p class="Pp">Before starting a <code class="Cm">histedit</code> operation
1753 7c3b4ab8 2020-02-25 stsp the work tree's current branch must be set with <code class="Cm">got
1754 7c3b4ab8 2020-02-25 stsp update -b</code> to the branch which should be edited, unless this
1755 7c3b4ab8 2020-02-25 stsp branch is already the current branch of the work tree. The tip of this
1756 7c3b4ab8 2020-02-25 stsp branch represents the upper bound (inclusive) of commits touched by the
1757 7c3b4ab8 2020-02-25 stsp <code class="Cm">histedit</code> operation.</p>
1758 7c3b4ab8 2020-02-25 stsp <p class="Pp">Furthermore, the work tree's base commit must be set with
1759 7c3b4ab8 2020-02-25 stsp <code class="Cm">got update -c</code> to a point in this branch's commit
1760 7c3b4ab8 2020-02-25 stsp history where editing should begin. This commit represents the lower
1761 7c3b4ab8 2020-02-25 stsp bound (non-inclusive) of commits touched by the
1762 7c3b4ab8 2020-02-25 stsp <code class="Cm">histedit</code> operation.</p>
1763 8797b228 2019-08-04 stsp <p class="Pp">Editing of commit history is controlled via a
1764 7c3b4ab8 2020-02-25 stsp <var class="Ar">histedit script</var> which can be written in an editor
1765 7c3b4ab8 2020-02-25 stsp based on a template, passed on the command line, or generated with the
1766 1b792db0 2020-12-13 stsp <code class="Fl">-f</code> or <code class="Fl">-m</code> options.</p>
1767 7c3b4ab8 2020-02-25 stsp <p class="Pp">The format of the histedit script is line-based. Each line in
1768 7c3b4ab8 2020-02-25 stsp the script begins with a command name, followed by whitespace and an
1769 7c3b4ab8 2020-02-25 stsp argument. For most commands, the expected argument is a commit ID SHA1
1770 7c3b4ab8 2020-02-25 stsp hash. Any remaining text on the line is ignored. Lines which begin with
1771 7c3b4ab8 2020-02-25 stsp the &#x2018;#&#x2019; character are ignored entirely.</p>
1772 8797b228 2019-08-04 stsp <p class="Pp">The available commands are as follows:</p>
1773 8797b228 2019-08-04 stsp <table class="Bl-column">
1774 8797b228 2019-08-04 stsp <tr>
1775 8797b228 2019-08-04 stsp <td>pick <var class="Ar">commit</var></td>
1776 8797b228 2019-08-04 stsp <td>Use the specified commit as it is.</td>
1777 8797b228 2019-08-04 stsp </tr>
1778 8797b228 2019-08-04 stsp <tr>
1779 8797b228 2019-08-04 stsp <td>edit <var class="Ar">commit</var></td>
1780 8797b228 2019-08-04 stsp <td>Use the specified commit but once changes have been merged into the
1781 8797b228 2019-08-04 stsp work tree interrupt the histedit operation for amending.</td>
1782 8797b228 2019-08-04 stsp </tr>
1783 8797b228 2019-08-04 stsp <tr>
1784 8797b228 2019-08-04 stsp <td>fold <var class="Ar">commit</var></td>
1785 8797b228 2019-08-04 stsp <td>Combine the specified commit with the next commit listed further
1786 8797b228 2019-08-04 stsp below that will be used.</td>
1787 8797b228 2019-08-04 stsp </tr>
1788 8797b228 2019-08-04 stsp <tr>
1789 8797b228 2019-08-04 stsp <td>drop <var class="Ar">commit</var></td>
1790 8797b228 2019-08-04 stsp <td>Remove this commit from the edited history.</td>
1791 8797b228 2019-08-04 stsp </tr>
1792 8797b228 2019-08-04 stsp <tr>
1793 8797b228 2019-08-04 stsp <td>mesg <var class="Ar">log-message</var></td>
1794 8797b228 2019-08-04 stsp <td>Use the specified single-line log message for the commit on the
1795 8797b228 2019-08-04 stsp previous line. If the log message argument is left empty, open an
1796 8797b228 2019-08-04 stsp editor where a new log message can be written.</td>
1797 8797b228 2019-08-04 stsp </tr>
1798 8797b228 2019-08-04 stsp </table>
1799 8797b228 2019-08-04 stsp <p class="Pp">Every commit in the history being edited must be mentioned in
1800 8797b228 2019-08-04 stsp the script. Lines may be re-ordered to change the order of commits in
1801 ae803b74 2020-03-06 stsp the edited history. No commit may be listed more than once.</p>
1802 8797b228 2019-08-04 stsp <p class="Pp">Edited commits are accumulated on a temporary branch which the
1803 8797b228 2019-08-04 stsp work tree will remain switched to throughout the entire histedit
1804 8797b228 2019-08-04 stsp operation. Once history editing has completed successfully, the
1805 8797b228 2019-08-04 stsp temporary branch becomes the new version of the work tree's branch and
1806 8797b228 2019-08-04 stsp the work tree is automatically switched to it.</p>
1807 039953c9 2021-03-22 stsp <p class="Pp">Old commits in their pre-histedit state are automatically
1808 039953c9 2021-03-22 stsp backed up in the &#x201C;refs/got/backup/histedit&#x201D; reference
1809 039953c9 2021-03-22 stsp namespace. As long as these references are not removed older versions of
1810 039953c9 2021-03-22 stsp edited commits will remain in the repository and can be viewed with the
1811 039953c9 2021-03-22 stsp <code class="Cm">got histedit -l</code> command. Removal of these
1812 039953c9 2021-03-22 stsp references makes objects which become unreachable via any reference
1813 16cd1323 2021-07-26 stsp subject to removal by Git's garbage collector or
1814 16cd1323 2021-07-26 stsp <code class="Cm">gotadmin cleanup</code>.</p>
1815 8797b228 2019-08-04 stsp <p class="Pp">While merging commits, show the status of each affected file,
1816 8797b228 2019-08-04 stsp using the following status codes:</p>
1817 8797b228 2019-08-04 stsp <table class="Bl-column">
1818 8797b228 2019-08-04 stsp <tr>
1819 8797b228 2019-08-04 stsp <td>G</td>
1820 8797b228 2019-08-04 stsp <td>file was merged</td>
1821 8797b228 2019-08-04 stsp </tr>
1822 8797b228 2019-08-04 stsp <tr>
1823 8797b228 2019-08-04 stsp <td>C</td>
1824 8797b228 2019-08-04 stsp <td>file was merged and conflicts occurred during merge</td>
1825 8797b228 2019-08-04 stsp </tr>
1826 8797b228 2019-08-04 stsp <tr>
1827 8797b228 2019-08-04 stsp <td>!</td>
1828 8797b228 2019-08-04 stsp <td>changes destined for a missing file were not merged</td>
1829 8797b228 2019-08-04 stsp </tr>
1830 8797b228 2019-08-04 stsp <tr>
1831 8797b228 2019-08-04 stsp <td>D</td>
1832 8797b228 2019-08-04 stsp <td>file was deleted</td>
1833 8797b228 2019-08-04 stsp </tr>
1834 8797b228 2019-08-04 stsp <tr>
1835 8797b228 2019-08-04 stsp <td>d</td>
1836 417cb057 2021-10-03 stsp <td>file's deletion was prevented by local modifications</td>
1837 8797b228 2019-08-04 stsp </tr>
1838 8797b228 2019-08-04 stsp <tr>
1839 8797b228 2019-08-04 stsp <td>A</td>
1840 8797b228 2019-08-04 stsp <td>new file was added</td>
1841 8797b228 2019-08-04 stsp </tr>
1842 8797b228 2019-08-04 stsp <tr>
1843 8797b228 2019-08-04 stsp <td>~</td>
1844 8797b228 2019-08-04 stsp <td>changes destined for a non-regular file were not merged</td>
1845 8797b228 2019-08-04 stsp </tr>
1846 1554b334 2020-08-02 stsp <tr>
1847 1554b334 2020-08-02 stsp <td>?</td>
1848 1554b334 2020-08-02 stsp <td>changes destined for an unversioned file were not merged</td>
1849 1554b334 2020-08-02 stsp </tr>
1850 8797b228 2019-08-04 stsp </table>
1851 8797b228 2019-08-04 stsp <p class="Pp">If merge conflicts occur the histedit operation is interrupted
1852 417cb057 2021-10-03 stsp and may be continued once conflicts have been resolved. If any files
1853 417cb057 2021-10-03 stsp with destined changes are found to be missing or unversioned, or if
1854 417cb057 2021-10-03 stsp files could not be deleted due to differences in deleted content, the
1855 417cb057 2021-10-03 stsp histedit operation will be interrupted to prevent potentially incomplete
1856 417cb057 2021-10-03 stsp changes from being committed to the repository without user
1857 417cb057 2021-10-03 stsp intervention. The work tree may be modified as desired and the histedit
1858 417cb057 2021-10-03 stsp operation can be continued once the changes present in the work tree are
1859 417cb057 2021-10-03 stsp considered complete. Alternatively, the histedit operation may be
1860 417cb057 2021-10-03 stsp aborted which will leave the work tree switched back to its original
1861 417cb057 2021-10-03 stsp branch.</p>
1862 8797b228 2019-08-04 stsp <p class="Pp">If a merge conflict is resolved in a way which renders the
1863 8797b228 2019-08-04 stsp merged change into a no-op change, the corresponding commit will be
1864 8797b228 2019-08-04 stsp elided when the histedit operation continues.</p>
1865 8797b228 2019-08-04 stsp <p class="Pp"><code class="Cm">got histedit</code> will refuse to run if
1866 8797b228 2019-08-04 stsp certain preconditions are not met. If the work tree's current branch is
1867 8797b228 2019-08-04 stsp not in the &#x201C;refs/heads/&#x201D; reference namespace, the history
1868 8797b228 2019-08-04 stsp of the branch may not be edited. If the work tree contains multiple base
1869 8797b228 2019-08-04 stsp commits it must first be updated to a single base commit with
1870 8797b228 2019-08-04 stsp <code class="Cm">got update</code>. If changes have been staged with
1871 91b3da3f 2019-08-18 stsp <code class="Cm">got stage</code>, these changes must first be committed
1872 8797b228 2019-08-04 stsp with <code class="Cm">got commit</code> or unstaged with
1873 8797b228 2019-08-04 stsp <code class="Cm">got unstage</code>. If the work tree contains local
1874 8797b228 2019-08-04 stsp changes, these changes must first be committed with <code class="Cm">got
1875 8797b228 2019-08-04 stsp commit</code> or reverted with <code class="Cm">got revert</code>. If
1876 8797b228 2019-08-04 stsp the edited history contains changes to files outside of the work tree's
1877 8797b228 2019-08-04 stsp path prefix, the work tree cannot be used to edit the history of this
1878 8797b228 2019-08-04 stsp branch.</p>
1879 7c3b4ab8 2020-02-25 stsp <p class="Pp">The <code class="Cm">got update</code>, <code class="Cm">got
1880 7c3b4ab8 2020-02-25 stsp rebase</code>, and <code class="Cm">got integrate</code> commands will
1881 7c3b4ab8 2020-02-25 stsp refuse to run while a histedit operation is in progress. Other commands
1882 7c3b4ab8 2020-02-25 stsp which manipulate the work tree may be used, and the <code class="Cm">got
1883 8797b228 2019-08-04 stsp commit</code> command may be used to commit arbitrary changes to the
1884 8797b228 2019-08-04 stsp temporary branch while the histedit operation is interrupted.</p>
1885 8797b228 2019-08-04 stsp <p class="Pp">The options for <code class="Cm">got histedit</code> are as
1886 8797b228 2019-08-04 stsp follows:</p>
1887 8797b228 2019-08-04 stsp <dl class="Bl-tag">
1888 def5be4a 2021-08-31 stsp <dt id="a~6"><a class="permalink" href="#a~6"><code class="Fl">-a</code></a></dt>
1889 8797b228 2019-08-04 stsp <dd>Abort an interrupted histedit operation. If this option is used, no
1890 9b0c768d 2019-08-08 stsp other command-line arguments are allowed.</dd>
1891 63b69821 2021-10-16 stsp <dt id="c~11"><a class="permalink" href="#c~11"><code class="Fl">-c</code></a></dt>
1892 8797b228 2019-08-04 stsp <dd>Continue an interrupted histedit operation. If this option is used, no
1893 9b0c768d 2019-08-08 stsp other command-line arguments are allowed.</dd>
1894 417cb057 2021-10-03 stsp <dt id="e"><a class="permalink" href="#e"><code class="Fl">-e</code></a></dt>
1895 417cb057 2021-10-03 stsp <dd>Interrupt the histedit operation for editing after merging each
1896 417cb057 2021-10-03 stsp commit. This option is a quick equivalent to a histedit script which
1897 417cb057 2021-10-03 stsp uses the <code class="Cm">edit</code> command for all commits. The
1898 417cb057 2021-10-03 stsp <code class="Fl">-e</code> option can only be used when starting a new
1899 417cb057 2021-10-03 stsp histedit operation. If this option is used, no other command-line
1900 417cb057 2021-10-03 stsp arguments are allowed.</dd>
1901 def5be4a 2021-08-31 stsp <dt id="f~3"><a class="permalink" href="#f~3"><code class="Fl">-f</code></a></dt>
1902 1b792db0 2020-12-13 stsp <dd>Fold all commits into a single commit. This option is a quick
1903 1b792db0 2020-12-13 stsp equivalent to a histedit script which folds all commits, combining
1904 1b792db0 2020-12-13 stsp them all into one commit. The <code class="Fl">-f</code> option can
1905 1b792db0 2020-12-13 stsp only be used when starting a new histedit operation. If this option is
1906 1b792db0 2020-12-13 stsp used, no other command-line arguments are allowed.</dd>
1907 039953c9 2021-03-22 stsp <dt id="F~3"><a class="permalink" href="#F~3"><code class="Fl">-F</code></a>
1908 7c3b4ab8 2020-02-25 stsp <var class="Ar">histedit-script</var></dt>
1909 7c3b4ab8 2020-02-25 stsp <dd>Use the specified <var class="Ar">histedit-script</var> instead of
1910 7c3b4ab8 2020-02-25 stsp opening a temporary file in an editor where a histedit script can be
1911 7c3b4ab8 2020-02-25 stsp written.</dd>
1912 2dbbbc3a 2020-07-23 stsp <dt id="m~5"><a class="permalink" href="#m~5"><code class="Fl">-m</code></a></dt>
1913 7c3b4ab8 2020-02-25 stsp <dd>Edit log messages only. This option is a quick equivalent to a
1914 7c3b4ab8 2020-02-25 stsp histedit script which edits only log messages but otherwise leaves
1915 7c3b4ab8 2020-02-25 stsp every picked commit as-is. The <code class="Fl">-m</code> option can
1916 7c3b4ab8 2020-02-25 stsp only be used when starting a new histedit operation. If this option is
1917 7c3b4ab8 2020-02-25 stsp used, no other command-line arguments are allowed.</dd>
1918 039953c9 2021-03-22 stsp <dt id="l~8"><a class="permalink" href="#l~8"><code class="Fl">-l</code></a></dt>
1919 039953c9 2021-03-22 stsp <dd>Show a list of past histedit operations, represented by references in
1920 039953c9 2021-03-22 stsp the &#x201C;refs/got/backup/histedit&#x201D; reference namespace.
1921 039953c9 2021-03-22 stsp <p class="Pp">Display the author, date, and log message of each backed
1922 039953c9 2021-03-22 stsp up commit, the object ID of the corresponding post-histedit commit,
1923 039953c9 2021-03-22 stsp and the object ID of their common ancestor commit. Given these
1924 039953c9 2021-03-22 stsp object IDs, the <code class="Cm">got log</code> command with the
1925 039953c9 2021-03-22 stsp <code class="Fl">-c</code> and <code class="Fl">-x</code> options
1926 039953c9 2021-03-22 stsp can be used to examine the history of either version of the branch,
1927 039953c9 2021-03-22 stsp and the <code class="Cm">got branch</code> command with the
1928 039953c9 2021-03-22 stsp <code class="Fl">-c</code> option can be used to create a new branch
1929 039953c9 2021-03-22 stsp from a pre-histedit state if desired.</p>
1930 039953c9 2021-03-22 stsp <p class="Pp">If a <var class="Ar">branch</var> is specified, only show
1931 039953c9 2021-03-22 stsp commits which at some point in time represented this branch.
1932 039953c9 2021-03-22 stsp Otherwise, list all backed up commits for any branches.</p>
1933 039953c9 2021-03-22 stsp <p class="Pp">If this option is used, <code class="Cm">got
1934 039953c9 2021-03-22 stsp histedit</code> does not require a work tree. None of the other
1935 039953c9 2021-03-22 stsp options can be used together with <code class="Fl">-l</code>.</p>
1936 16cd1323 2021-07-26 stsp </dd>
1937 16cd1323 2021-07-26 stsp <dt id="X~3"><a class="permalink" href="#X~3"><code class="Fl">-X</code></a></dt>
1938 16cd1323 2021-07-26 stsp <dd>Delete backups created by past histedit operations, represented by
1939 16cd1323 2021-07-26 stsp references in the &#x201C;refs/got/backup/histedit&#x201D; reference
1940 16cd1323 2021-07-26 stsp namespace.
1941 16cd1323 2021-07-26 stsp <p class="Pp">If a <var class="Ar">branch</var> is specified, only
1942 16cd1323 2021-07-26 stsp delete backups which at some point in time represented this branch.
1943 16cd1323 2021-07-26 stsp Otherwise, delete all references found within
1944 16cd1323 2021-07-26 stsp &#x201C;refs/got/backup/histedit&#x201D;.</p>
1945 16cd1323 2021-07-26 stsp <p class="Pp">Any commit, tree, tag, and blob objects belonging to
1946 16cd1323 2021-07-26 stsp deleted backups remain in the repository and may be removed
1947 16cd1323 2021-07-26 stsp separately with Git's garbage collector or <code class="Cm">gotadmin
1948 16cd1323 2021-07-26 stsp cleanup</code>.</p>
1949 16cd1323 2021-07-26 stsp <p class="Pp">If this option is used, <code class="Cm">got
1950 16cd1323 2021-07-26 stsp histedit</code> does not require a work tree. None of the other
1951 16cd1323 2021-07-26 stsp options can be used together with <code class="Fl">-X</code>.</p>
1952 039953c9 2021-03-22 stsp </dd>
1953 8797b228 2019-08-04 stsp </dl>
1954 8797b228 2019-08-04 stsp </dd>
1955 63b69821 2021-10-16 stsp <dt id="ig"><a class="permalink" href="#integrate"><code class="Cm" id="integrate">integrate</code></a>
1956 d8e62599 2019-10-21 stsp <var class="Ar">branch</var></dt>
1957 63b69821 2021-10-16 stsp <dd>
1958 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
1959 46043f6f 2021-11-23 stsp <code class="Cm">ig</code>)</code></div>
1960 46043f6f 2021-11-23 stsp Integrate the specified <var class="Ar">branch</var> into the work tree's
1961 d8e62599 2019-10-21 stsp current branch. Files in the work tree are updated to match the contents
1962 d8e62599 2019-10-21 stsp on the integrated <var class="Ar">branch</var>, and the reference of the
1963 d8e62599 2019-10-21 stsp work tree's branch is changed to point at the head commit of the
1964 d8e62599 2019-10-21 stsp integrated <var class="Ar">branch</var>.
1965 d8e62599 2019-10-21 stsp <p class="Pp">Both branches can be considered equivalent after integration
1966 d8e62599 2019-10-21 stsp since they will be pointing at the same commit. Both branches remain
1967 d8e62599 2019-10-21 stsp available for future work, if desired. In case the integrated
1968 d8e62599 2019-10-21 stsp <var class="Ar">branch</var> is no longer needed it may be deleted with
1969 d8e62599 2019-10-21 stsp <code class="Cm">got branch -d</code>.</p>
1970 d8e62599 2019-10-21 stsp <p class="Pp">Show the status of each affected file, using the following
1971 d8e62599 2019-10-21 stsp status codes:</p>
1972 d8e62599 2019-10-21 stsp <table class="Bl-column">
1973 d8e62599 2019-10-21 stsp <tr>
1974 d8e62599 2019-10-21 stsp <td>U</td>
1975 d8e62599 2019-10-21 stsp <td>file was updated</td>
1976 d8e62599 2019-10-21 stsp </tr>
1977 d8e62599 2019-10-21 stsp <tr>
1978 d8e62599 2019-10-21 stsp <td>D</td>
1979 d8e62599 2019-10-21 stsp <td>file was deleted</td>
1980 d8e62599 2019-10-21 stsp </tr>
1981 d8e62599 2019-10-21 stsp <tr>
1982 d8e62599 2019-10-21 stsp <td>A</td>
1983 d8e62599 2019-10-21 stsp <td>new file was added</td>
1984 d8e62599 2019-10-21 stsp </tr>
1985 d8e62599 2019-10-21 stsp <tr>
1986 d8e62599 2019-10-21 stsp <td>~</td>
1987 d8e62599 2019-10-21 stsp <td>versioned file is obstructed by a non-regular file</td>
1988 d8e62599 2019-10-21 stsp </tr>
1989 d8e62599 2019-10-21 stsp <tr>
1990 d8e62599 2019-10-21 stsp <td>!</td>
1991 d8e62599 2019-10-21 stsp <td>a missing versioned file was restored</td>
1992 d8e62599 2019-10-21 stsp </tr>
1993 d8e62599 2019-10-21 stsp </table>
1994 d8e62599 2019-10-21 stsp <p class="Pp"><code class="Cm">got integrate</code> will refuse to run if
1995 d8e62599 2019-10-21 stsp certain preconditions are not met. Most importantly, the
1996 d8e62599 2019-10-21 stsp <var class="Ar">branch</var> must have been rebased onto the work tree's
1997 d8e62599 2019-10-21 stsp current branch with <code class="Cm">got rebase</code> before it can be
1998 d8e62599 2019-10-21 stsp integrated, in order to linearize commit history and resolve merge
1999 d8e62599 2019-10-21 stsp conflicts. If the work tree contains multiple base commits it must first
2000 d8e62599 2019-10-21 stsp be updated to a single base commit with <code class="Cm">got
2001 d8e62599 2019-10-21 stsp update</code>. If changes have been staged with <code class="Cm">got
2002 d8e62599 2019-10-21 stsp stage</code>, these changes must first be committed with
2003 d8e62599 2019-10-21 stsp <code class="Cm">got commit</code> or unstaged with <code class="Cm">got
2004 d8e62599 2019-10-21 stsp unstage</code>. If the work tree contains local changes, these changes
2005 d8e62599 2019-10-21 stsp must first be committed with <code class="Cm">got commit</code> or
2006 d8e62599 2019-10-21 stsp reverted with <code class="Cm">got revert</code>.</p>
2007 d8e62599 2019-10-21 stsp </dd>
2008 63b69821 2021-10-16 stsp <dt id="mg"><a class="permalink" href="#merge"><code class="Cm" id="merge">merge</code></a>
2009 417cb057 2021-10-03 stsp [<code class="Fl">-a</code>] [<code class="Fl">-c</code>]
2010 417cb057 2021-10-03 stsp [<code class="Fl">-n</code>] [<var class="Ar">branch</var>]</dt>
2011 63b69821 2021-10-16 stsp <dd>
2012 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
2013 46043f6f 2021-11-23 stsp <code class="Cm">mg</code>)</code></div>
2014 46043f6f 2021-11-23 stsp Create a merge commit based on the current branch of the work tree and the
2015 417cb057 2021-10-03 stsp specified <var class="Ar">branch</var>. If a linear project history is
2016 417cb057 2021-10-03 stsp desired, then use of <code class="Cm">got rebase</code> should be
2017 417cb057 2021-10-03 stsp preferred over <code class="Cm">got merge</code>. However, even strictly
2018 417cb057 2021-10-03 stsp linear projects may require merge commits in order to merge in new
2019 417cb057 2021-10-03 stsp versions of third-party code stored on vendor branches created with
2020 417cb057 2021-10-03 stsp <code class="Cm">got import</code>.
2021 417cb057 2021-10-03 stsp <p class="Pp">Merge commits are commits based on multiple parent commits.
2022 417cb057 2021-10-03 stsp The tip commit of the work tree's current branch, which must be set with
2023 417cb057 2021-10-03 stsp <code class="Cm">got update -b</code> before starting the
2024 417cb057 2021-10-03 stsp <code class="Cm">merge</code> operation, will be used as the first
2025 417cb057 2021-10-03 stsp parent. The tip commit of the specified <var class="Ar">branch</var>
2026 417cb057 2021-10-03 stsp will be used as the second parent.</p>
2027 417cb057 2021-10-03 stsp <p class="Pp">No ancestral relationship between the two branches is
2028 417cb057 2021-10-03 stsp required. If the two branches have already been merged previously, only
2029 417cb057 2021-10-03 stsp new changes will be merged.</p>
2030 417cb057 2021-10-03 stsp <p class="Pp">It is not possible to create merge commits with more than two
2031 417cb057 2021-10-03 stsp parents. If more than one branch needs to be merged, then multiple merge
2032 417cb057 2021-10-03 stsp commits with two parents each can be created in sequence.</p>
2033 417cb057 2021-10-03 stsp <p class="Pp">While merging changes found on the
2034 417cb057 2021-10-03 stsp <var class="Ar">branch</var> into the work tree, show the status of each
2035 417cb057 2021-10-03 stsp affected file, using the following status codes:</p>
2036 417cb057 2021-10-03 stsp <table class="Bl-column">
2037 417cb057 2021-10-03 stsp <tr>
2038 417cb057 2021-10-03 stsp <td>G</td>
2039 417cb057 2021-10-03 stsp <td>file was merged</td>
2040 417cb057 2021-10-03 stsp </tr>
2041 417cb057 2021-10-03 stsp <tr>
2042 417cb057 2021-10-03 stsp <td>C</td>
2043 417cb057 2021-10-03 stsp <td>file was merged and conflicts occurred during merge</td>
2044 417cb057 2021-10-03 stsp </tr>
2045 417cb057 2021-10-03 stsp <tr>
2046 417cb057 2021-10-03 stsp <td>!</td>
2047 417cb057 2021-10-03 stsp <td>changes destined for a missing file were not merged</td>
2048 417cb057 2021-10-03 stsp </tr>
2049 417cb057 2021-10-03 stsp <tr>
2050 417cb057 2021-10-03 stsp <td>D</td>
2051 417cb057 2021-10-03 stsp <td>file was deleted</td>
2052 417cb057 2021-10-03 stsp </tr>
2053 417cb057 2021-10-03 stsp <tr>
2054 417cb057 2021-10-03 stsp <td>d</td>
2055 417cb057 2021-10-03 stsp <td>file's deletion was prevented by local modifications</td>
2056 417cb057 2021-10-03 stsp </tr>
2057 417cb057 2021-10-03 stsp <tr>
2058 417cb057 2021-10-03 stsp <td>A</td>
2059 417cb057 2021-10-03 stsp <td>new file was added</td>
2060 417cb057 2021-10-03 stsp </tr>
2061 417cb057 2021-10-03 stsp <tr>
2062 417cb057 2021-10-03 stsp <td>~</td>
2063 417cb057 2021-10-03 stsp <td>changes destined for a non-regular file were not merged</td>
2064 417cb057 2021-10-03 stsp </tr>
2065 417cb057 2021-10-03 stsp <tr>
2066 417cb057 2021-10-03 stsp <td>?</td>
2067 417cb057 2021-10-03 stsp <td>changes destined for an unversioned file were not merged</td>
2068 417cb057 2021-10-03 stsp </tr>
2069 417cb057 2021-10-03 stsp </table>
2070 417cb057 2021-10-03 stsp <p class="Pp">If merge conflicts occur, the merge operation is interrupted
2071 417cb057 2021-10-03 stsp and conflicts must be resolved before the merge operation can continue.
2072 417cb057 2021-10-03 stsp If any files with destined changes are found to be missing or
2073 417cb057 2021-10-03 stsp unversioned, or if files could not be deleted due to differences in
2074 417cb057 2021-10-03 stsp deleted content, the merge operation will be interrupted to prevent
2075 417cb057 2021-10-03 stsp potentially incomplete changes from being committed to the repository
2076 417cb057 2021-10-03 stsp without user intervention. The work tree may be modified as desired and
2077 417cb057 2021-10-03 stsp the merge can be continued once the changes present in the work tree are
2078 417cb057 2021-10-03 stsp considered complete. Alternatively, the merge operation may be aborted
2079 417cb057 2021-10-03 stsp which will leave the work tree's current branch unmodified.</p>
2080 417cb057 2021-10-03 stsp <p class="Pp">If a merge conflict is resolved in a way which renders all
2081 417cb057 2021-10-03 stsp merged changes into no-op changes, the merge operation cannot continue
2082 417cb057 2021-10-03 stsp and must be aborted.</p>
2083 417cb057 2021-10-03 stsp <p class="Pp"><code class="Cm">got merge</code> will refuse to run if
2084 417cb057 2021-10-03 stsp certain preconditions are not met. If history of the
2085 417cb057 2021-10-03 stsp <var class="Ar">branch</var> is based on the work tree's current branch,
2086 417cb057 2021-10-03 stsp then no merge commit can be created and <code class="Cm">got
2087 417cb057 2021-10-03 stsp integrate</code> may be used to integrate the
2088 417cb057 2021-10-03 stsp <var class="Ar">branch</var> instead. If the work tree is not yet fully
2089 417cb057 2021-10-03 stsp updated to the tip commit of its branch, then the work tree must first
2090 417cb057 2021-10-03 stsp be updated with <code class="Cm">got update</code>. If the work tree
2091 417cb057 2021-10-03 stsp contains multiple base commits it must first be updated to a single base
2092 417cb057 2021-10-03 stsp commit with <code class="Cm">got update</code>. If changes have been
2093 417cb057 2021-10-03 stsp staged with <code class="Cm">got stage</code>, these changes must first
2094 417cb057 2021-10-03 stsp be committed with <code class="Cm">got commit</code> or unstaged with
2095 417cb057 2021-10-03 stsp <code class="Cm">got unstage</code>. If the work tree contains local
2096 417cb057 2021-10-03 stsp changes, these changes must first be committed with <code class="Cm">got
2097 417cb057 2021-10-03 stsp commit</code> or reverted with <code class="Cm">got revert</code>. If
2098 417cb057 2021-10-03 stsp the <var class="Ar">branch</var> contains changes to files outside of
2099 417cb057 2021-10-03 stsp the work tree's path prefix, the work tree cannot be used to merge this
2100 417cb057 2021-10-03 stsp branch.</p>
2101 417cb057 2021-10-03 stsp <p class="Pp">The <code class="Cm">got update</code>, <code class="Cm">got
2102 417cb057 2021-10-03 stsp commit</code>, <code class="Cm">got rebase</code>, <code class="Cm">got
2103 417cb057 2021-10-03 stsp histedit</code>, <code class="Cm">got integrate</code>, and
2104 417cb057 2021-10-03 stsp <code class="Cm">got stage</code> commands will refuse to run while a
2105 417cb057 2021-10-03 stsp merge operation is in progress. Other commands which manipulate the work
2106 417cb057 2021-10-03 stsp tree may be used for conflict resolution purposes.</p>
2107 417cb057 2021-10-03 stsp <p class="Pp">The options for <code class="Cm">got merge</code> are as
2108 417cb057 2021-10-03 stsp follows:</p>
2109 417cb057 2021-10-03 stsp <dl class="Bl-tag">
2110 417cb057 2021-10-03 stsp <dt id="a~7"><a class="permalink" href="#a~7"><code class="Fl">-a</code></a></dt>
2111 417cb057 2021-10-03 stsp <dd>Abort an interrupted merge operation. If this option is used, no other
2112 417cb057 2021-10-03 stsp command-line arguments are allowed.</dd>
2113 63b69821 2021-10-16 stsp <dt id="c~12"><a class="permalink" href="#c~12"><code class="Fl">-c</code></a></dt>
2114 417cb057 2021-10-03 stsp <dd>Continue an interrupted merge operation. If this option is used, no
2115 417cb057 2021-10-03 stsp other command-line arguments are allowed.</dd>
2116 417cb057 2021-10-03 stsp <dt id="n~2"><a class="permalink" href="#n~2"><code class="Fl">-n</code></a></dt>
2117 417cb057 2021-10-03 stsp <dd>Merge changes into the work tree as usual but do not create a merge
2118 417cb057 2021-10-03 stsp commit immediately. The merge result can be adjusted as desired before
2119 417cb057 2021-10-03 stsp a merge commit is created with <code class="Cm">got merge -c</code>.
2120 417cb057 2021-10-03 stsp Alternatively, the merge may be aborted with <code class="Cm">got
2121 417cb057 2021-10-03 stsp merge -a</code>.</dd>
2122 417cb057 2021-10-03 stsp </dl>
2123 417cb057 2021-10-03 stsp </dd>
2124 63b69821 2021-10-16 stsp <dt id="sg"><a class="permalink" href="#stage"><code class="Cm" id="stage">stage</code></a>
2125 e0ed36ae 2019-08-07 stsp [<code class="Fl">-l</code>] [<code class="Fl">-p</code>]
2126 37b56b1f 2019-08-07 stsp [<code class="Fl">-F</code> <var class="Ar">response-script</var>]
2127 1554b334 2020-08-02 stsp [<code class="Fl">-S</code>] [<var class="Ar">path ...</var>]</dt>
2128 63b69821 2021-10-16 stsp <dd>
2129 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
2130 46043f6f 2021-11-23 stsp <code class="Cm">sg</code>)</code></div>
2131 46043f6f 2021-11-23 stsp Stage local changes for inclusion in the next commit. If no
2132 e0ed36ae 2019-08-07 stsp <var class="Ar">path</var> is specified, stage all changes in the work
2133 e0ed36ae 2019-08-07 stsp tree. Otherwise, stage changes at or within the specified paths. Paths may
2134 e0ed36ae 2019-08-07 stsp be staged if they are added, modified, or deleted according to
2135 e0ed36ae 2019-08-07 stsp <code class="Cm">got status</code>.
2136 00261839 2019-08-05 stsp <p class="Pp">Show the status of each affected file, using the following
2137 00261839 2019-08-05 stsp status codes:</p>
2138 00261839 2019-08-05 stsp <table class="Bl-column">
2139 00261839 2019-08-05 stsp <tr>
2140 00261839 2019-08-05 stsp <td>A</td>
2141 00261839 2019-08-05 stsp <td>file addition has been staged</td>
2142 00261839 2019-08-05 stsp </tr>
2143 00261839 2019-08-05 stsp <tr>
2144 00261839 2019-08-05 stsp <td>M</td>
2145 00261839 2019-08-05 stsp <td>file modification has been staged</td>
2146 00261839 2019-08-05 stsp </tr>
2147 00261839 2019-08-05 stsp <tr>
2148 00261839 2019-08-05 stsp <td>D</td>
2149 00261839 2019-08-05 stsp <td>file deletion has been staged</td>
2150 00261839 2019-08-05 stsp </tr>
2151 00261839 2019-08-05 stsp </table>
2152 00261839 2019-08-05 stsp <p class="Pp">Staged file contents are saved in newly created blob objects
2153 00261839 2019-08-05 stsp in the repository. These blobs will be referred to by tree objects once
2154 00261839 2019-08-05 stsp staged changes have been committed.</p>
2155 8797b228 2019-08-04 stsp <p class="Pp">Staged changes affect the behaviour of <code class="Cm">got
2156 8797b228 2019-08-04 stsp commit</code>, <code class="Cm">got status</code>, and
2157 8797b228 2019-08-04 stsp <code class="Cm">got diff</code>. While paths with staged changes exist,
2158 8797b228 2019-08-04 stsp the <code class="Cm">got commit</code> command will refuse to commit any
2159 8797b228 2019-08-04 stsp paths which do not have staged changes. Local changes created on top of
2160 8797b228 2019-08-04 stsp staged changes can only be committed if the path is staged again, or if
2161 8797b228 2019-08-04 stsp the staged changes are committed first. The <code class="Cm">got
2162 8797b228 2019-08-04 stsp status</code> command will show both local changes and staged changes.
2163 8797b228 2019-08-04 stsp The <code class="Cm">got diff</code> command is able to display local
2164 8797b228 2019-08-04 stsp changes relative to staged changes, and to display staged changes
2165 8797b228 2019-08-04 stsp relative to the repository. The <code class="Cm">got revert</code>
2166 8797b228 2019-08-04 stsp command cannot revert staged changes but may be used to revert local
2167 fc62dacd 2019-08-08 stsp changes created on top of staged changes.</p>
2168 8797b228 2019-08-04 stsp <p class="Pp">The options for <code class="Cm">got stage</code> are as
2169 8797b228 2019-08-04 stsp follows:</p>
2170 8797b228 2019-08-04 stsp <dl class="Bl-tag">
2171 039953c9 2021-03-22 stsp <dt id="l~9"><a class="permalink" href="#l~9"><code class="Fl">-l</code></a></dt>
2172 8797b228 2019-08-04 stsp <dd>Instead of staging new changes, list paths which are already staged,
2173 00261839 2019-08-05 stsp along with the IDs of staged blob objects and stage status codes. If
2174 00261839 2019-08-05 stsp paths were provided in the command line show the staged paths among
2175 00261839 2019-08-05 stsp the specified paths. Otherwise, show all staged paths.</dd>
2176 2dbbbc3a 2020-07-23 stsp <dt id="p~4"><a class="permalink" href="#p~4"><code class="Fl">-p</code></a></dt>
2177 e0ed36ae 2019-08-07 stsp <dd>Instead of staging the entire content of a changed file, interactively
2178 fc62dacd 2019-08-08 stsp select or reject changes for staging based on &#x201C;y&#x201D; (stage
2179 fc62dacd 2019-08-08 stsp change), &#x201C;n&#x201D; (reject change), and &#x201C;q&#x201D;
2180 fc62dacd 2019-08-08 stsp (quit staging this file) responses. If a file is in modified status,
2181 fc62dacd 2019-08-08 stsp individual patches derived from the modified file content can be
2182 fc62dacd 2019-08-08 stsp staged. Files in added or deleted status may only be staged or
2183 fc62dacd 2019-08-08 stsp rejected in their entirety.</dd>
2184 039953c9 2021-03-22 stsp <dt id="F~4"><a class="permalink" href="#F~4"><code class="Fl">-F</code></a>
2185 37b56b1f 2019-08-07 stsp <var class="Ar">response-script</var></dt>
2186 37b56b1f 2019-08-07 stsp <dd>With the <code class="Fl">-p</code> option, read &#x201C;y&#x201D;,
2187 cdd51db2 2019-08-07 stsp &#x201C;n&#x201D;, and &#x201C;q&#x201D; responses line-by-line from
2188 cdd51db2 2019-08-07 stsp the specified <var class="Ar">response-script</var> file instead of
2189 cdd51db2 2019-08-07 stsp prompting interactively.</dd>
2190 4448c231 2021-09-15 stsp <dt id="S~3"><a class="permalink" href="#S~3"><code class="Fl">-S</code></a></dt>
2191 1554b334 2020-08-02 stsp <dd>Allow staging of symbolic links which point outside of the path space
2192 1554b334 2020-08-02 stsp that is under version control. By default, <code class="Cm">got
2193 1554b334 2020-08-02 stsp stage</code> will reject such symbolic links due to safety concerns.
2194 1554b334 2020-08-02 stsp As a precaution, <code class="Nm">got</code> may decide to represent
2195 1554b334 2020-08-02 stsp such a symbolic link as a regular file which contains the link's
2196 1554b334 2020-08-02 stsp target path, rather than creating an actual symbolic link which points
2197 1554b334 2020-08-02 stsp outside of the work tree. Use of this option is discouraged because
2198 1554b334 2020-08-02 stsp external mechanisms such as &#x201C;make obj&#x201D; are better suited
2199 1554b334 2020-08-02 stsp for managing symbolic links to paths not under version control.</dd>
2200 8797b228 2019-08-04 stsp </dl>
2201 8797b228 2019-08-04 stsp <p class="Pp"><code class="Cm">got stage</code> will refuse to run if
2202 8797b228 2019-08-04 stsp certain preconditions are not met. If a file contains merge conflicts,
2203 8797b228 2019-08-04 stsp these conflicts must be resolved first. If a file is found to be out of
2204 8797b228 2019-08-04 stsp date relative to the head commit on the work tree's current branch, the
2205 8797b228 2019-08-04 stsp file must be updated with <code class="Cm">got update</code> before it
2206 8797b228 2019-08-04 stsp can be staged (however, this does not prevent the file from becoming
2207 8797b228 2019-08-04 stsp out-of-date at some point after having been staged).</p>
2208 8797b228 2019-08-04 stsp <p class="Pp">The <code class="Cm">got update</code>, <code class="Cm">got
2209 8797b228 2019-08-04 stsp rebase</code>, and <code class="Cm">got histedit</code> commands will
2210 8797b228 2019-08-04 stsp refuse to run while staged changes exist. If staged changes cannot be
2211 8797b228 2019-08-04 stsp committed because a staged path is out of date, the path must be
2212 8797b228 2019-08-04 stsp unstaged with <code class="Cm">got unstage</code> before it can be
2213 8797b228 2019-08-04 stsp updated with <code class="Cm">got update</code>, and may then be staged
2214 8797b228 2019-08-04 stsp again if necessary.</p>
2215 8797b228 2019-08-04 stsp </dd>
2216 63b69821 2021-10-16 stsp <dt id="ug"><a class="permalink" href="#unstage"><code class="Cm" id="unstage">unstage</code></a>
2217 fc62dacd 2019-08-08 stsp [<code class="Fl">-p</code>] [<code class="Fl">-F</code>
2218 fc62dacd 2019-08-08 stsp <var class="Ar">response-script</var>] [<var class="Ar">path ...</var>]</dt>
2219 63b69821 2021-10-16 stsp <dd>
2220 63b69821 2021-10-16 stsp <div class="Bd Bd-indent"><code class="Li">(alias:
2221 46043f6f 2021-11-23 stsp <code class="Cm">ug</code>)</code></div>
2222 46043f6f 2021-11-23 stsp Merge staged changes back into the work tree and put affected paths back
2223 8797b228 2019-08-04 stsp into non-staged status. If no <var class="Ar">path</var> is specified,
2224 e0ed36ae 2019-08-07 stsp unstage all staged changes across the entire work tree. Otherwise, unstage
2225 e0ed36ae 2019-08-07 stsp changes at or within the specified paths.
2226 8797b228 2019-08-04 stsp <p class="Pp">Show the status of each affected file, using the following
2227 8797b228 2019-08-04 stsp status codes:</p>
2228 8797b228 2019-08-04 stsp <table class="Bl-column">
2229 8797b228 2019-08-04 stsp <tr>
2230 8797b228 2019-08-04 stsp <td>G</td>
2231 8797b228 2019-08-04 stsp <td>file was unstaged</td>
2232 8797b228 2019-08-04 stsp </tr>
2233 8797b228 2019-08-04 stsp <tr>
2234 8797b228 2019-08-04 stsp <td>C</td>
2235 8797b228 2019-08-04 stsp <td>file was unstaged and conflicts occurred during merge</td>
2236 8797b228 2019-08-04 stsp </tr>
2237 8797b228 2019-08-04 stsp <tr>
2238 8797b228 2019-08-04 stsp <td>!</td>
2239 8797b228 2019-08-04 stsp <td>changes destined for a missing file were not merged</td>
2240 8797b228 2019-08-04 stsp </tr>
2241 8797b228 2019-08-04 stsp <tr>
2242 8797b228 2019-08-04 stsp <td>D</td>
2243 8797b228 2019-08-04 stsp <td>file was staged as deleted and still is deleted</td>
2244 8797b228 2019-08-04 stsp </tr>
2245 8797b228 2019-08-04 stsp <tr>
2246 8797b228 2019-08-04 stsp <td>d</td>
2247 417cb057 2021-10-03 stsp <td>file's deletion was prevented by local modifications</td>
2248 8797b228 2019-08-04 stsp </tr>
2249 8797b228 2019-08-04 stsp <tr>
2250 8797b228 2019-08-04 stsp <td>~</td>
2251 8797b228 2019-08-04 stsp <td>changes destined for a non-regular file were not merged</td>
2252 8797b228 2019-08-04 stsp </tr>
2253 8797b228 2019-08-04 stsp </table>
2254 fc62dacd 2019-08-08 stsp <p class="Pp">The options for <code class="Cm">got unstage</code> are as
2255 fc62dacd 2019-08-08 stsp follows:</p>
2256 fc62dacd 2019-08-08 stsp <dl class="Bl-tag">
2257 2dbbbc3a 2020-07-23 stsp <dt id="p~5"><a class="permalink" href="#p~5"><code class="Fl">-p</code></a></dt>
2258 fc62dacd 2019-08-08 stsp <dd>Instead of unstaging the entire content of a changed file,
2259 fc62dacd 2019-08-08 stsp interactively select or reject changes for unstaging based on
2260 fc62dacd 2019-08-08 stsp &#x201C;y&#x201D; (unstage change), &#x201C;n&#x201D; (keep change
2261 fc62dacd 2019-08-08 stsp staged), and &#x201C;q&#x201D; (quit unstaging this file) responses.
2262 fc62dacd 2019-08-08 stsp If a file is staged in modified status, individual patches derived
2263 fc62dacd 2019-08-08 stsp from the staged file content can be unstaged. Files staged in added or
2264 fc62dacd 2019-08-08 stsp deleted status may only be unstaged in their entirety.</dd>
2265 039953c9 2021-03-22 stsp <dt id="F~5"><a class="permalink" href="#F~5"><code class="Fl">-F</code></a>
2266 fc62dacd 2019-08-08 stsp <var class="Ar">response-script</var></dt>
2267 fc62dacd 2019-08-08 stsp <dd>With the <code class="Fl">-p</code> option, read &#x201C;y&#x201D;,
2268 fc62dacd 2019-08-08 stsp &#x201C;n&#x201D;, and &#x201C;q&#x201D; responses line-by-line from
2269 fc62dacd 2019-08-08 stsp the specified <var class="Ar">response-script</var> file instead of
2270 fc62dacd 2019-08-08 stsp prompting interactively.</dd>
2271 fc62dacd 2019-08-08 stsp </dl>
2272 8797b228 2019-08-04 stsp </dd>
2273 2dbbbc3a 2020-07-23 stsp <dt id="cat"><a class="permalink" href="#cat"><code class="Cm">cat</code></a>
2274 ba0a4168 2019-08-26 stsp [<code class="Fl">-c</code> <var class="Ar">commit</var>]
2275 f447d26b 2019-08-23 stsp [<code class="Fl">-r</code> <var class="Ar">repository-path</var>]
2276 a22a0a70 2019-08-26 stsp [<code class="Fl">-P</code>] <var class="Ar">arg ...</var></dt>
2277 ba0a4168 2019-08-26 stsp <dd>Parse and print contents of objects to standard output in a line-based
2278 ba0a4168 2019-08-26 stsp text format. Content of commit, tree, and tag objects is printed in a way
2279 ba0a4168 2019-08-26 stsp similar to the actual content stored in such objects. Blob object contents
2280 ba0a4168 2019-08-26 stsp are printed as they would appear in files on disk.
2281 ba0a4168 2019-08-26 stsp <p class="Pp">Attempt to interpret each argument as a reference, a tag name,
2282 ba0a4168 2019-08-26 stsp or an object ID SHA1 hash. References will be resolved to an object ID.
2283 ba0a4168 2019-08-26 stsp Tag names will resolved to a tag object. An abbreviated hash argument
2284 ba0a4168 2019-08-26 stsp will be expanded to a full SHA1 hash automatically, provided the
2285 ba0a4168 2019-08-26 stsp abbreviation is unique.</p>
2286 ba0a4168 2019-08-26 stsp <p class="Pp">If none of the above interpretations produce a valid result,
2287 ba0a4168 2019-08-26 stsp or if the <code class="Fl">-P</code> option is used, attempt to
2288 ba0a4168 2019-08-26 stsp interpret the argument as a path which will be resolved to the ID of an
2289 ba0a4168 2019-08-26 stsp object found at this path in the repository.</p>
2290 f447d26b 2019-08-23 stsp <p class="Pp">The options for <code class="Cm">got cat</code> are as
2291 f447d26b 2019-08-23 stsp follows:</p>
2292 f447d26b 2019-08-23 stsp <dl class="Bl-tag">
2293 63b69821 2021-10-16 stsp <dt id="c~13"><a class="permalink" href="#c~13"><code class="Fl">-c</code></a>
2294 ba0a4168 2019-08-26 stsp <var class="Ar">commit</var></dt>
2295 ba0a4168 2019-08-26 stsp <dd>Look up paths in the specified <var class="Ar">commit</var>. If this
2296 ba0a4168 2019-08-26 stsp option is not used, paths are looked up in the commit resolved via the
2297 ba0a4168 2019-08-26 stsp repository's HEAD reference. The expected argument is a commit ID SHA1
2298 ba0a4168 2019-08-26 stsp hash or an existing reference or tag name which will be resolved to a
2299 ba0a4168 2019-08-26 stsp commit ID. An abbreviated hash argument will be expanded to a full
2300 ba0a4168 2019-08-26 stsp SHA1 hash automatically, provided the abbreviation is unique.</dd>
2301 def5be4a 2021-08-31 stsp <dt id="r~11"><a class="permalink" href="#r~11"><code class="Fl">-r</code></a>
2302 f447d26b 2019-08-23 stsp <var class="Ar">repository-path</var></dt>
2303 f447d26b 2019-08-23 stsp <dd>Use the repository at the specified path. If not specified, assume the
2304 f447d26b 2019-08-23 stsp repository is located at or above the current working directory. If
2305 f447d26b 2019-08-23 stsp this directory is a <code class="Nm">got</code> work tree, use the
2306 f447d26b 2019-08-23 stsp repository path associated with this work tree.</dd>
2307 63b69821 2021-10-16 stsp <dt id="P~3"><a class="permalink" href="#P~3"><code class="Fl">-P</code></a></dt>
2308 ba0a4168 2019-08-26 stsp <dd>Interpret all arguments as paths only. This option can be used to
2309 ba0a4168 2019-08-26 stsp resolve ambiguity in cases where paths look like tag names, reference
2310 ba0a4168 2019-08-26 stsp names, or object IDs.</dd>
2311 f447d26b 2019-08-23 stsp </dl>
2312 1554b334 2020-08-02 stsp </dd>
2313 1554b334 2020-08-02 stsp <dt id="info"><a class="permalink" href="#info"><code class="Cm">info</code></a>
2314 1554b334 2020-08-02 stsp [<var class="Ar">path ...</var>]</dt>
2315 1554b334 2020-08-02 stsp <dd>Display meta-data stored in a work tree. See
2316 1554b334 2020-08-02 stsp <a class="Xr">got-worktree(5)</a> for details.
2317 1554b334 2020-08-02 stsp <p class="Pp">The work tree to use is resolved implicitly by walking upwards
2318 1554b334 2020-08-02 stsp from the current working directory.</p>
2319 1554b334 2020-08-02 stsp <p class="Pp">If one or more <var class="Ar">path</var> arguments are
2320 1554b334 2020-08-02 stsp specified, show additional per-file information for tracked files
2321 1554b334 2020-08-02 stsp located at or within these paths. If a <var class="Ar">path</var>
2322 1554b334 2020-08-02 stsp argument corresponds to the work tree's root directory, display
2323 1554b334 2020-08-02 stsp information for all tracked files.</p>
2324 f447d26b 2019-08-23 stsp </dd>
2325 8797b228 2019-08-04 stsp </dl>
2326 8797b228 2019-08-04 stsp </section>
2327 8797b228 2019-08-04 stsp <section class="Sh">
2328 8797b228 2019-08-04 stsp <h1 class="Sh" id="ENVIRONMENT"><a class="permalink" href="#ENVIRONMENT">ENVIRONMENT</a></h1>
2329 8797b228 2019-08-04 stsp <dl class="Bl-tag">
2330 2dbbbc3a 2020-07-23 stsp <dt id="GOT_AUTHOR"><a class="permalink" href="#GOT_AUTHOR"><code class="Ev">GOT_AUTHOR</code></a></dt>
2331 8797b228 2019-08-04 stsp <dd>The author's name and email address for <code class="Cm">got commit</code>
2332 c2a52be5 2019-09-08 stsp and <code class="Cm">got import</code>, for example:
2333 c2a52be5 2019-09-08 stsp &#x201C;<span class="An">Flan Hacker</span>
2334 c2a52be5 2019-09-08 stsp &lt;<a class="Mt" href="mailto:flan_hacker@openbsd.org">flan_hacker@openbsd.org</a>&gt;&#x201D;.
2335 97e00196 2019-08-09 stsp Because <a class="Xr">git(1)</a> may fail to parse commits without an
2336 97e00196 2019-08-09 stsp email address in author data, <code class="Nm">got</code> attempts to
2337 97e00196 2019-08-09 stsp reject <code class="Ev">GOT_AUTHOR</code> environment variables with a
2338 c2a52be5 2019-09-08 stsp missing email address.
2339 def5be4a 2021-08-31 stsp <p class="Pp"><code class="Ev">GOT_AUTHOR will be overridden by
2340 def5be4a 2021-08-31 stsp configuration settings in</code> <a class="Xr">got.conf(5)</a> or by
2341 def5be4a 2021-08-31 stsp Git's <code class="Dv">user.name</code> and
2342 def5be4a 2021-08-31 stsp <code class="Dv">user.email</code> configuration settings in the
2343 def5be4a 2021-08-31 stsp repository's <span class="Pa">.git/config</span> file. The
2344 feee6923 2020-09-17 stsp <code class="Dv">user.name</code> and <code class="Dv">user.email</code>
2345 c2a52be5 2019-09-08 stsp configuration settings contained in Git's global
2346 feee6923 2020-09-17 stsp <span class="Pa">~/.gitconfig</span> configuration file will only be
2347 feee6923 2020-09-17 stsp used if neither <a class="Xr">got.conf(5)</a> nor the
2348 feee6923 2020-09-17 stsp <code class="Ev">GOT_AUTHOR</code> environment variable provide author
2349 feee6923 2020-09-17 stsp information.</p>
2350 c2a52be5 2019-09-08 stsp </dd>
2351 2dbbbc3a 2020-07-23 stsp <dt id="VISUAL"><a class="permalink" href="#VISUAL"><code class="Ev">VISUAL</code></a>,
2352 8797b228 2019-08-04 stsp <code class="Ev">EDITOR</code></dt>
2353 f447d26b 2019-08-23 stsp <dd>The editor spawned by <code class="Cm">got commit</code>,
2354 feee6923 2020-09-17 stsp <code class="Cm">got histedit</code>, <code class="Cm">got import</code>,
2355 feee6923 2020-09-17 stsp or <code class="Cm">got tag</code>. If not set, the
2356 feee6923 2020-09-17 stsp <a class="Xr">ed(1)</a> text editor will be spawned in order to give
2357 feee6923 2020-09-17 stsp <a class="Xr">ed(1)</a> the attention it deserves.</dd>
2358 2dbbbc3a 2020-07-23 stsp <dt id="GOT_LOG_DEFAULT_LIMIT"><a class="permalink" href="#GOT_LOG_DEFAULT_LIMIT"><code class="Ev">GOT_LOG_DEFAULT_LIMIT</code></a></dt>
2359 91b3da3f 2019-08-18 stsp <dd>The default limit on the number of commits traversed by
2360 91b3da3f 2019-08-18 stsp <code class="Cm">got log</code>. If set to zero, the limit is unbounded.
2361 91b3da3f 2019-08-18 stsp This variable will be silently ignored if it is set to a non-numeric
2362 91b3da3f 2019-08-18 stsp value.</dd>
2363 8797b228 2019-08-04 stsp </dl>
2364 8797b228 2019-08-04 stsp </section>
2365 8797b228 2019-08-04 stsp <section class="Sh">
2366 feee6923 2020-09-17 stsp <h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1>
2367 feee6923 2020-09-17 stsp <dl class="Bl-tag Bl-compact">
2368 feee6923 2020-09-17 stsp <dt><span class="Pa">got.conf</span></dt>
2369 feee6923 2020-09-17 stsp <dd>Repository-wide configuration settings for <code class="Nm">got</code>. If
2370 feee6923 2020-09-17 stsp present, a <a class="Xr">got.conf(5)</a> configuration file located in the
2371 feee6923 2020-09-17 stsp root directory of a Git repository supersedes any relevant settings in
2372 feee6923 2020-09-17 stsp Git's <span class="Pa">config</span> file.
2373 feee6923 2020-09-17 stsp <p class="Pp"></p>
2374 feee6923 2020-09-17 stsp </dd>
2375 feee6923 2020-09-17 stsp <dt><span class="Pa">.got/got.conf</span></dt>
2376 feee6923 2020-09-17 stsp <dd>Worktree-specific configuration settings for <code class="Nm">got</code>.
2377 56dd4d48 2021-04-05 stsp If present, a <a class="Xr">got.conf(5)</a> configuration file in the
2378 feee6923 2020-09-17 stsp <span class="Pa">.got</span> meta-data directory of a work tree supersedes
2379 feee6923 2020-09-17 stsp any relevant settings in the repository's <a class="Xr">got.conf(5)</a>
2380 feee6923 2020-09-17 stsp configuration file and Git's <span class="Pa">config</span> file.</dd>
2381 feee6923 2020-09-17 stsp </dl>
2382 feee6923 2020-09-17 stsp </section>
2383 feee6923 2020-09-17 stsp <section class="Sh">
2384 8797b228 2019-08-04 stsp <h1 class="Sh" id="EXIT_STATUS"><a class="permalink" href="#EXIT_STATUS">EXIT
2385 8797b228 2019-08-04 stsp STATUS</a></h1>
2386 d8e62599 2019-10-21 stsp <p class="Pp">The <code class="Nm">got</code> utility exits&#x00A0;0 on success,
2387 d8e62599 2019-10-21 stsp and&#x00A0;&gt;0 if an error occurs.</p>
2388 8797b228 2019-08-04 stsp </section>
2389 8797b228 2019-08-04 stsp <section class="Sh">
2390 8797b228 2019-08-04 stsp <h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
2391 def5be4a 2021-08-31 stsp <p class="Pp">Enable tab-completion of <code class="Nm">got</code> command names
2392 def5be4a 2021-08-31 stsp in <a class="Xr">ksh(1)</a>:</p>
2393 def5be4a 2021-08-31 stsp <p class="Pp"></p>
2394 1e80276a 2021-09-03 stsp <div class="Bd Bd-indent"><code class="Li">$ set -A complete_got_1 -- $(got -h
2395 def5be4a 2021-08-31 stsp 2&gt;&amp;1 | sed -n s/commands://p)</code></div>
2396 d8e62599 2019-10-21 stsp <p class="Pp">Clone an existing Git repository for use with
2397 b213cbf7 2020-03-23 stsp <code class="Nm">got</code>.</p>
2398 8797b228 2019-08-04 stsp <p class="Pp"></p>
2399 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ cd /var/git/</code></div>
2400 b213cbf7 2020-03-23 stsp <div class="Bd Bd-indent"><code class="Li">$ got clone
2401 b213cbf7 2020-03-23 stsp ssh://git@github.com/openbsd/src.git</code></div>
2402 b213cbf7 2020-03-23 stsp <p class="Pp">Use of HTTP URLs currently requires <a class="Xr">git(1)</a>:</p>
2403 b213cbf7 2020-03-23 stsp <p class="Pp"></p>
2404 b213cbf7 2020-03-23 stsp <div class="Bd Bd-indent"><code class="Li">$ cd /var/git/</code></div>
2405 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ git clone --bare
2406 8797b228 2019-08-04 stsp https://github.com/openbsd/src.git</code></div>
2407 8797b228 2019-08-04 stsp <p class="Pp">Alternatively, for quick and dirty local testing of
2408 8797b228 2019-08-04 stsp <code class="Nm">got</code> a new Git repository could be created and
2409 8797b228 2019-08-04 stsp populated with files, e.g. from a temporary CVS checkout located at
2410 8797b228 2019-08-04 stsp <span class="Pa">/tmp/src</span>:</p>
2411 8797b228 2019-08-04 stsp <p class="Pp"></p>
2412 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got init
2413 8797b228 2019-08-04 stsp /var/git/src.git</code></div>
2414 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got import -r /var/git/src.git -I
2415 8797b228 2019-08-04 stsp CVS -I obj /tmp/src</code></div>
2416 8797b228 2019-08-04 stsp <p class="Pp">Check out a work tree from the Git repository to /usr/src:</p>
2417 8797b228 2019-08-04 stsp <p class="Pp"></p>
2418 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got checkout /var/git/src.git
2419 8797b228 2019-08-04 stsp /usr/src</code></div>
2420 8797b228 2019-08-04 stsp <p class="Pp">View local changes in a work tree directory:</p>
2421 8797b228 2019-08-04 stsp <p class="Pp"></p>
2422 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got diff | less</code></div>
2423 feee6923 2020-09-17 stsp <p class="Pp">In a work tree, display files in a potentially problematic
2424 feee6923 2020-09-17 stsp state:</p>
2425 feee6923 2020-09-17 stsp <p class="Pp"></p>
2426 feee6923 2020-09-17 stsp <div class="Bd Bd-indent"><code class="Li">$ got status -s 'C!~?'</code></div>
2427 7da3b7f6 2019-08-08 stsp <p class="Pp">Interactively revert selected local changes in a work tree
2428 7da3b7f6 2019-08-08 stsp directory:</p>
2429 7da3b7f6 2019-08-08 stsp <p class="Pp"></p>
2430 7da3b7f6 2019-08-08 stsp <div class="Bd Bd-indent"><code class="Li">$ got revert -p
2431 7da3b7f6 2019-08-08 stsp -R&#x00A0;.</code></div>
2432 8797b228 2019-08-04 stsp <p class="Pp">In a work tree or a git repository directory, list all branch
2433 8797b228 2019-08-04 stsp references:</p>
2434 8797b228 2019-08-04 stsp <p class="Pp"></p>
2435 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got branch -l</code></div>
2436 8797b228 2019-08-04 stsp <p class="Pp">In a work tree or a git repository directory, create a new branch
2437 8797b228 2019-08-04 stsp called &#x201C;unified-buffer-cache&#x201D; which is forked off the
2438 8797b228 2019-08-04 stsp &#x201C;master&#x201D; branch:</p>
2439 8797b228 2019-08-04 stsp <p class="Pp"></p>
2440 039953c9 2021-03-22 stsp <div class="Bd Bd-indent"><code class="Li">$ got branch -c master
2441 039953c9 2021-03-22 stsp unified-buffer-cache</code></div>
2442 8797b228 2019-08-04 stsp <p class="Pp">Switch an existing work tree to the branch
2443 8797b228 2019-08-04 stsp &#x201C;unified-buffer-cache&#x201D;. Local changes in the work tree will be
2444 8797b228 2019-08-04 stsp preserved and merged if necessary:</p>
2445 8797b228 2019-08-04 stsp <p class="Pp"></p>
2446 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got update -b
2447 8797b228 2019-08-04 stsp unified-buffer-cache</code></div>
2448 8797b228 2019-08-04 stsp <p class="Pp">Create a new commit from local changes in a work tree directory.
2449 8797b228 2019-08-04 stsp This new commit will become the head commit of the work tree's current
2450 8797b228 2019-08-04 stsp branch:</p>
2451 8797b228 2019-08-04 stsp <p class="Pp"></p>
2452 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got commit</code></div>
2453 8797b228 2019-08-04 stsp <p class="Pp">In a work tree or a git repository directory, view changes
2454 8797b228 2019-08-04 stsp committed in the 3 most recent commits to the work tree's branch, or the
2455 8797b228 2019-08-04 stsp branch resolved via the repository's HEAD reference, respectively:</p>
2456 8797b228 2019-08-04 stsp <p class="Pp"></p>
2457 8b679b4b 2020-02-17 stsp <div class="Bd Bd-indent"><code class="Li">$ got log -p -l 3</code></div>
2458 a462773e 2020-04-19 stsp <p class="Pp">As above, but display changes in the order in which
2459 a462773e 2020-04-19 stsp <a class="Xr">patch(1)</a> could apply them in sequence:</p>
2460 a462773e 2020-04-19 stsp <p class="Pp"></p>
2461 a462773e 2020-04-19 stsp <div class="Bd Bd-indent"><code class="Li">$ got log -p -l 3 -R</code></div>
2462 7c3b4ab8 2020-02-25 stsp <p class="Pp">In a work tree or a git repository directory, log the history of a
2463 7c3b4ab8 2020-02-25 stsp subdirectory:</p>
2464 7c3b4ab8 2020-02-25 stsp <p class="Pp"></p>
2465 7c3b4ab8 2020-02-25 stsp <div class="Bd Bd-indent"><code class="Li">$ got log sys/uvm</code></div>
2466 7c3b4ab8 2020-02-25 stsp <p class="Pp">While operating inside a work tree, paths are specified relative
2467 7c3b4ab8 2020-02-25 stsp to the current working directory, so this command will log the subdirectory
2468 7c3b4ab8 2020-02-25 stsp <span class="Pa">sys/uvm</span>:</p>
2469 7c3b4ab8 2020-02-25 stsp <p class="Pp"></p>
2470 1554b334 2020-08-02 stsp <div class="Bd Bd-indent"><code class="Li">$ cd sys/uvm &amp;&amp; got
2471 1554b334 2020-08-02 stsp log&#x00A0;.</code></div>
2472 7c3b4ab8 2020-02-25 stsp <p class="Pp">And this command has the same effect:</p>
2473 7c3b4ab8 2020-02-25 stsp <p class="Pp"></p>
2474 7c3b4ab8 2020-02-25 stsp <div class="Bd Bd-indent"><code class="Li">$ cd sys/dev/usb &amp;&amp; got log
2475 7c3b4ab8 2020-02-25 stsp ../../uvm</code></div>
2476 1554b334 2020-08-02 stsp <p class="Pp">And this command displays work tree meta-data about all tracked
2477 1554b334 2020-08-02 stsp files:</p>
2478 1554b334 2020-08-02 stsp <p class="Pp"></p>
2479 1554b334 2020-08-02 stsp <div class="Bd Bd-indent"><code class="Li">$ cd /usr/src</code></div>
2480 1554b334 2020-08-02 stsp <div class="Bd Bd-indent"><code class="Li">$ got info&#x00A0;. |
2481 1554b334 2020-08-02 stsp less</code></div>
2482 8797b228 2019-08-04 stsp <p class="Pp">Add new files and remove obsolete files in a work tree
2483 8797b228 2019-08-04 stsp directory:</p>
2484 8797b228 2019-08-04 stsp <p class="Pp"></p>
2485 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got add
2486 8797b228 2019-08-04 stsp sys/uvm/uvm_ubc.c</code></div>
2487 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got remove
2488 8797b228 2019-08-04 stsp sys/uvm/uvm_vnode.c</code></div>
2489 8797b228 2019-08-04 stsp <p class="Pp">Create a new commit from local changes in a work tree directory
2490 8797b228 2019-08-04 stsp with a pre-defined log message.</p>
2491 8797b228 2019-08-04 stsp <p class="Pp"></p>
2492 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got commit -m 'unify the buffer
2493 8797b228 2019-08-04 stsp cache'</code></div>
2494 2dbbbc3a 2020-07-23 stsp <p class="Pp">Alternatively, create a new commit from local changes in a work
2495 2dbbbc3a 2020-07-23 stsp tree directory with a log message that has been prepared in the file
2496 56dd4d48 2021-04-05 stsp <span class="Pa">/tmp/msg</span>:</p>
2497 2dbbbc3a 2020-07-23 stsp <p class="Pp"></p>
2498 039953c9 2021-03-22 stsp <div class="Bd Bd-indent"><code class="Li">$ got commit -F /tmp/msg</code></div>
2499 8797b228 2019-08-04 stsp <p class="Pp">Update any work tree checked out from the
2500 8797b228 2019-08-04 stsp &#x201C;unified-buffer-cache&#x201D; branch to the latest commit on this
2501 8797b228 2019-08-04 stsp branch:</p>
2502 8797b228 2019-08-04 stsp <p class="Pp"></p>
2503 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got update</code></div>
2504 8797b228 2019-08-04 stsp <p class="Pp">Roll file content on the unified-buffer-cache branch back by one
2505 8797b228 2019-08-04 stsp commit, and then fetch the rolled-back change into the work tree as a local
2506 8797b228 2019-08-04 stsp change to be amended and perhaps committed again:</p>
2507 8797b228 2019-08-04 stsp <p class="Pp"></p>
2508 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got backout
2509 8797b228 2019-08-04 stsp unified-buffer-cache</code></div>
2510 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got commit -m 'roll back
2511 8797b228 2019-08-04 stsp previous'</code></div>
2512 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ # now back out the previous backout
2513 8797b228 2019-08-04 stsp :-)</code></div>
2514 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got backout
2515 8797b228 2019-08-04 stsp unified-buffer-cache</code></div>
2516 def5be4a 2021-08-31 stsp <p class="Pp">Fetch new changes on the remote repository's
2517 def5be4a 2021-08-31 stsp &#x201C;master&#x201D; branch, making them visible on the local repository's
2518 b213cbf7 2020-03-23 stsp &#x201C;origin/master&#x201D; branch:</p>
2519 8797b228 2019-08-04 stsp <p class="Pp"></p>
2520 b213cbf7 2020-03-23 stsp <div class="Bd Bd-indent"><code class="Li">$ cd /usr/src</code></div>
2521 b213cbf7 2020-03-23 stsp <div class="Bd Bd-indent"><code class="Li">$ got fetch</code></div>
2522 b213cbf7 2020-03-23 stsp <p class="Pp">In a repository created with a HTTP URL and <code class="Cm">git
2523 b213cbf7 2020-03-23 stsp clone --bare</code> the <a class="Xr">git-fetch(1)</a> command must be used
2524 b213cbf7 2020-03-23 stsp instead:</p>
2525 b213cbf7 2020-03-23 stsp <p class="Pp"></p>
2526 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ cd /var/git/src.git</code></div>
2527 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ git fetch origin
2528 b213cbf7 2020-03-23 stsp master:refs/remotes/origin/master</code></div>
2529 b213cbf7 2020-03-23 stsp <p class="Pp">Rebase the local &#x201C;master&#x201D; branch to merge the new
2530 b213cbf7 2020-03-23 stsp changes that are now visible on the &#x201C;origin/master&#x201D;
2531 b213cbf7 2020-03-23 stsp branch:</p>
2532 b213cbf7 2020-03-23 stsp <p class="Pp"></p>
2533 b213cbf7 2020-03-23 stsp <div class="Bd Bd-indent"><code class="Li">$ cd /usr/src</code></div>
2534 b213cbf7 2020-03-23 stsp <div class="Bd Bd-indent"><code class="Li">$ got update -b
2535 b213cbf7 2020-03-23 stsp origin/master</code></div>
2536 b213cbf7 2020-03-23 stsp <div class="Bd Bd-indent"><code class="Li">$ got rebase master</code></div>
2537 8797b228 2019-08-04 stsp <p class="Pp">Rebase the &#x201C;unified-buffer-cache&#x201D; branch on top of
2538 8797b228 2019-08-04 stsp the new head commit of the &#x201C;master&#x201D; branch.</p>
2539 8797b228 2019-08-04 stsp <p class="Pp"></p>
2540 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got update -b master</code></div>
2541 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got rebase
2542 8797b228 2019-08-04 stsp unified-buffer-cache</code></div>
2543 8797b228 2019-08-04 stsp <p class="Pp">Create a patch from all changes on the unified-buffer-cache
2544 4967d3c2 2019-08-12 stsp branch. The patch can be mailed out for review and applied to
2545 4967d3c2 2019-08-12 stsp <span class="Ux">OpenBSD</span>'s CVS tree:</p>
2546 8797b228 2019-08-04 stsp <p class="Pp"></p>
2547 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got diff master
2548 8797b228 2019-08-04 stsp unified-buffer-cache &gt; /tmp/ubc.diff</code></div>
2549 8797b228 2019-08-04 stsp <p class="Pp">Edit the entire commit history of the
2550 8797b228 2019-08-04 stsp &#x201C;unified-buffer-cache&#x201D; branch:</p>
2551 8797b228 2019-08-04 stsp <p class="Pp"></p>
2552 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got update -b
2553 8797b228 2019-08-04 stsp unified-buffer-cache</code></div>
2554 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got update -c master</code></div>
2555 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got histedit</code></div>
2556 def5be4a 2021-08-31 stsp <p class="Pp">Before working against existing branches in a repository cloned
2557 def5be4a 2021-08-31 stsp with <code class="Cm">git clone --bare</code> instead of
2558 def5be4a 2021-08-31 stsp <code class="Cm">got clone</code>, a Git &#x201C;refspec&#x201D; must be
2559 b213cbf7 2020-03-23 stsp configured to map all references in the remote repository into the
2560 56dd4d48 2021-04-05 stsp &#x201C;refs/remotes&#x201D; namespace of the local repository. This can be
2561 b213cbf7 2020-03-23 stsp achieved by setting Git's <span class="Pa">remote.origin.fetch</span>
2562 b213cbf7 2020-03-23 stsp configuration variable to the value
2563 b213cbf7 2020-03-23 stsp &#x201C;+refs/heads/*:refs/remotes/origin/*&#x201D; with the
2564 8797b228 2019-08-04 stsp <code class="Cm">git config</code> command:</p>
2565 8797b228 2019-08-04 stsp <p class="Pp"></p>
2566 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ cd /var/git/repo</code></div>
2567 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ git config remote.origin.fetch
2568 8797b228 2019-08-04 stsp '+refs/heads/*:refs/remotes/origin/*'</code></div>
2569 b213cbf7 2020-03-23 stsp <p class="Pp">Additionally, the &#x201C;mirror&#x201D; option must be
2570 b213cbf7 2020-03-23 stsp disabled:</p>
2571 b213cbf7 2020-03-23 stsp <p class="Pp"></p>
2572 b213cbf7 2020-03-23 stsp <div class="Bd Bd-indent"><code class="Li">$ cd /var/git/repo</code></div>
2573 b213cbf7 2020-03-23 stsp <div class="Bd Bd-indent"><code class="Li">$ git config remote.origin.mirror
2574 b213cbf7 2020-03-23 stsp false</code></div>
2575 b213cbf7 2020-03-23 stsp <p class="Pp">Alternatively, the following <a class="Xr">git-fetch(1)</a>
2576 8797b228 2019-08-04 stsp configuration item can be added manually to the Git repository's
2577 8797b228 2019-08-04 stsp <span class="Pa">config</span> file:</p>
2578 8797b228 2019-08-04 stsp <p class="Pp"></p>
2579 a954aa0a 2021-06-22 stsp <div class="Bd Bd-indent"><code class="Li">[remote
2580 a954aa0a 2021-06-22 stsp &quot;origin&quot;]</code></div>
2581 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">url = ...</code></div>
2582 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">fetch =
2583 8797b228 2019-08-04 stsp +refs/heads/*:refs/remotes/origin/*</code></div>
2584 b213cbf7 2020-03-23 stsp <div class="Bd Bd-indent"><code class="Li">mirror = false</code></div>
2585 8797b228 2019-08-04 stsp <p class="Pp">This configuration leaves the local repository's
2586 8797b228 2019-08-04 stsp &#x201C;refs/heads&#x201D; namespace free for use by local branches checked
2587 8797b228 2019-08-04 stsp out with <code class="Cm">got checkout</code> and, if needed, created with
2588 def5be4a 2021-08-31 stsp <code class="Cm">got branch</code>. Branches in the
2589 def5be4a 2021-08-31 stsp &#x201C;refs/remotes/origin&#x201D; namespace can now be updated with
2590 def5be4a 2021-08-31 stsp incoming changes from the remote repository with <code class="Cm">got
2591 def5be4a 2021-08-31 stsp fetch</code> or <a class="Xr">git-fetch(1)</a> without extra command line
2592 def5be4a 2021-08-31 stsp arguments. Newly fetched changes can be examined with <code class="Cm">got
2593 def5be4a 2021-08-31 stsp log</code>.</p>
2594 def5be4a 2021-08-31 stsp <p class="Pp">Display changes on the remote repository's version of the
2595 def5be4a 2021-08-31 stsp &#x201C;master&#x201D; branch, as of the last time <code class="Cm">got
2596 def5be4a 2021-08-31 stsp fetch</code> was run:</p>
2597 8797b228 2019-08-04 stsp <p class="Pp"></p>
2598 def5be4a 2021-08-31 stsp <div class="Bd Bd-indent"><code class="Li">$ got log -c origin/master |
2599 def5be4a 2021-08-31 stsp less</code></div>
2600 def5be4a 2021-08-31 stsp <p class="Pp">As shown here, most commands accept abbreviated reference names
2601 def5be4a 2021-08-31 stsp such as &#x201C;origin/master&#x201D; instead of
2602 def5be4a 2021-08-31 stsp &#x201C;refs/remotes/origin/master&#x201D;. The latter is only needed in
2603 def5be4a 2021-08-31 stsp case of ambiguity.</p>
2604 def5be4a 2021-08-31 stsp <p class="Pp"><code class="Cm">got rebase</code> must be used to merge changes
2605 def5be4a 2021-08-31 stsp which are visible on the &#x201C;origin/master&#x201D; branch into the
2606 def5be4a 2021-08-31 stsp &#x201C;master&#x201D; branch. This will also merge local changes, if any,
2607 def5be4a 2021-08-31 stsp with the incoming changes:</p>
2608 8797b228 2019-08-04 stsp <p class="Pp"></p>
2609 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got update -b
2610 8797b228 2019-08-04 stsp origin/master</code></div>
2611 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ got rebase master</code></div>
2612 def5be4a 2021-08-31 stsp <p class="Pp">In order to make changes committed to the
2613 def5be4a 2021-08-31 stsp &#x201C;unified-buffer-cache&#x201D; visible on the &#x201C;master&#x201D;
2614 def5be4a 2021-08-31 stsp branch, the &#x201C;unified-buffer-cache&#x201D; branch must first be
2615 def5be4a 2021-08-31 stsp rebased onto the &#x201C;master&#x201D; branch:</p>
2616 def5be4a 2021-08-31 stsp <p class="Pp"></p>
2617 def5be4a 2021-08-31 stsp <div class="Bd Bd-indent"><code class="Li">$ got update -b master</code></div>
2618 def5be4a 2021-08-31 stsp <div class="Bd Bd-indent"><code class="Li">$ got rebase
2619 def5be4a 2021-08-31 stsp unified-buffer-cache</code></div>
2620 def5be4a 2021-08-31 stsp <p class="Pp">Changes on the &#x201C;unified-buffer-cache&#x201D; branch can now
2621 def5be4a 2021-08-31 stsp be made visible on the &#x201C;master&#x201D; branch with
2622 def5be4a 2021-08-31 stsp <code class="Cm">got integrate</code>. Because the rebase operation switched
2623 def5be4a 2021-08-31 stsp the work tree to the &#x201C;unified-buffer-cache&#x201D; branch the work
2624 def5be4a 2021-08-31 stsp tree must be switched back to the &#x201C;master&#x201D; branch first:</p>
2625 def5be4a 2021-08-31 stsp <p class="Pp"></p>
2626 def5be4a 2021-08-31 stsp <div class="Bd Bd-indent"><code class="Li">$ got update -b master</code></div>
2627 def5be4a 2021-08-31 stsp <div class="Bd Bd-indent"><code class="Li">$ got integrate
2628 def5be4a 2021-08-31 stsp unified-buffer-cache</code></div>
2629 7c3b4ab8 2020-02-25 stsp <p class="Pp">On the &#x201C;master&#x201D; branch, log messages for local
2630 7c3b4ab8 2020-02-25 stsp changes can now be amended with &#x201C;OK&#x201D; by other developers and
2631 7c3b4ab8 2020-02-25 stsp any other important new information:</p>
2632 7c3b4ab8 2020-02-25 stsp <p class="Pp"></p>
2633 7c3b4ab8 2020-02-25 stsp <div class="Bd Bd-indent"><code class="Li">$ got update -c
2634 7c3b4ab8 2020-02-25 stsp origin/master</code></div>
2635 7c3b4ab8 2020-02-25 stsp <div class="Bd Bd-indent"><code class="Li">$ got histedit -m</code></div>
2636 def5be4a 2021-08-31 stsp <p class="Pp">If the remote repository offers write access local changes on the
2637 def5be4a 2021-08-31 stsp &#x201C;master&#x201D; branch can be sent to the remote repository with
2638 63b69821 2021-10-16 stsp <code class="Cm">got send</code>. Usually, <code class="Cm">got send</code>
2639 def5be4a 2021-08-31 stsp can be run without further arguments. The arguments shown here match
2640 def5be4a 2021-08-31 stsp defaults, provided the work tree's current branch is the
2641 def5be4a 2021-08-31 stsp &#x201C;master&#x201D; branch:</p>
2642 8797b228 2019-08-04 stsp <p class="Pp"></p>
2643 def5be4a 2021-08-31 stsp <div class="Bd Bd-indent"><code class="Li">$ got send -b master
2644 def5be4a 2021-08-31 stsp origin</code></div>
2645 def5be4a 2021-08-31 stsp <p class="Pp">If the remote repository requires the HTTPS protocol the
2646 def5be4a 2021-08-31 stsp <a class="Xr">git-push(1)</a> command must be used instead:</p>
2647 def5be4a 2021-08-31 stsp <p class="Pp"></p>
2648 def5be4a 2021-08-31 stsp <div class="Bd Bd-indent"><code class="Li">$ cd /var/git/src.git</code></div>
2649 8797b228 2019-08-04 stsp <div class="Bd Bd-indent"><code class="Li">$ git push origin master</code></div>
2650 8797b228 2019-08-04 stsp </section>
2651 8797b228 2019-08-04 stsp <section class="Sh">
2652 8797b228 2019-08-04 stsp <h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
2653 8797b228 2019-08-04 stsp ALSO</a></h1>
2654 a954aa0a 2021-06-22 stsp <p class="Pp"><a class="Xr">gotadmin(1)</a>, <a class="Xr">tog(1)</a>,
2655 a954aa0a 2021-06-22 stsp <a class="Xr">git-repository(5)</a>, <a class="Xr">got-worktree(5)</a>,
2656 a954aa0a 2021-06-22 stsp <a class="Xr">got.conf(5)</a></p>
2657 8797b228 2019-08-04 stsp </section>
2658 8797b228 2019-08-04 stsp <section class="Sh">
2659 8797b228 2019-08-04 stsp <h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
2660 d8e62599 2019-10-21 stsp <p class="Pp"><span class="An">Stefan Sperling</span>
2661 d8e62599 2019-10-21 stsp &lt;<a class="Mt" href="mailto:stsp@openbsd.org">stsp@openbsd.org</a>&gt;
2662 d8e62599 2019-10-21 stsp <br/>
2663 d8e62599 2019-10-21 stsp <span class="An">Martin Pieuchot</span>
2664 d8e62599 2019-10-21 stsp &lt;<a class="Mt" href="mailto:mpi@openbsd.org">mpi@openbsd.org</a>&gt;
2665 d8e62599 2019-10-21 stsp <br/>
2666 d8e62599 2019-10-21 stsp <span class="An">Joshua Stein</span>
2667 b213cbf7 2020-03-23 stsp &lt;<a class="Mt" href="mailto:jcs@openbsd.org">jcs@openbsd.org</a>&gt;
2668 b213cbf7 2020-03-23 stsp <br/>
2669 b213cbf7 2020-03-23 stsp <span class="An">Ori Bernstein</span>
2670 b213cbf7 2020-03-23 stsp &lt;<a class="Mt" href="mailto:ori@openbsd.org">ori@openbsd.org</a>&gt;</p>
2671 8797b228 2019-08-04 stsp </section>
2672 8797b228 2019-08-04 stsp <section class="Sh">
2673 8797b228 2019-08-04 stsp <h1 class="Sh" id="CAVEATS"><a class="permalink" href="#CAVEATS">CAVEATS</a></h1>
2674 bbf83bf8 2020-12-27 stsp <p class="Pp"><code class="Nm">got</code> is a work-in-progress and some
2675 bbf83bf8 2020-12-27 stsp features remain to be implemented.</p>
2676 bbf83bf8 2020-12-27 stsp <p class="Pp">At present, the user has to fall back on <a class="Xr">git(1)</a>
2677 bbf83bf8 2020-12-27 stsp to perform some tasks. In particular:</p>
2678 bbf83bf8 2020-12-27 stsp <ul class="Bl-bullet">
2679 bbf83bf8 2020-12-27 stsp <li>Reading from remote repositories over HTTP or HTTPS protocols requires
2680 bbf83bf8 2020-12-27 stsp <a class="Xr">git-clone(1)</a> and <a class="Xr">git-fetch(1)</a>.</li>
2681 def5be4a 2021-08-31 stsp <li>Writing to remote repositories over HTTP or HTTPS protocols requires
2682 bbf83bf8 2020-12-27 stsp <a class="Xr">git-push(1)</a>.</li>
2683