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