Blame


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