Blame


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