Blob


1 <!DOCTYPE html>
2 <html>
3 <!-- This is an automatically generated file. Do not edit.
4 Copyright (c) 2018 Stefan Sperling
6 Permission to use, copy, modify, and distribute this software for any
7 purpose with or without fee is hereby granted, provided that the above
8 copyright notice and this permission notice appear in all copies.
10 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 -->
18 <head>
19 <meta charset="utf-8"/>
20 <style>
21 table.head, table.foot { width: 100%; }
22 td.head-rtitle, td.foot-os { text-align: right; }
23 td.head-vol { text-align: center; }
24 div.Pp { margin: 1ex 0ex; }
25 div.Nd, div.Bf, div.Op { display: inline; }
26 span.Pa, span.Ad { font-style: italic; }
27 span.Ms { font-weight: bold; }
28 dl.Bl-diag > dt { font-weight: bold; }
29 code.Nm, code.Fl, code.Cm, code.Ic, code.In, code.Fd, code.Fn,
30 code.Cd { font-weight: bold; font-family: inherit; }
31 </style>
32 <title>TOG(1)</title>
33 </head>
34 <body>
35 <table class="head">
36 <tr>
37 <td class="head-ltitle">TOG(1)</td>
38 <td class="head-vol">General Commands Manual</td>
39 <td class="head-rtitle">TOG(1)</td>
40 </tr>
41 </table>
42 <div class="manual-text">
43 <section class="Sh">
44 <h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
45 <code class="Nm">tog</code> &#x2014;
46 <div class="Nd">Git repository browser</div>
47 </section>
48 <section class="Sh">
49 <h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
50 <table class="Nm">
51 <tr>
52 <td><code class="Nm">tog</code></td>
53 <td><var class="Ar">command</var> [<code class="Fl">-h</code>]
54 [<var class="Ar">arg ...</var>]</td>
55 </tr>
56 </table>
57 </section>
58 <section class="Sh">
59 <h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
60 <code class="Nm">tog</code> is an interactive read-only browser for Git
61 repositories. This repository format is described in
62 <a class="Xr">git-repository(5)</a>.
63 <p class="Pp"><code class="Nm">tog</code> supports several types of views which
64 display repository data:</p>
65 <dl class="Bl-tag">
66 <dt>Log view</dt>
67 <dd>Displays commits in the repository's history. This view is displayed
68 initially if no <var class="Ar">command</var> is specified.</dd>
69 <dt>Diff view</dt>
70 <dd>Displays changes made in a particular commit.</dd>
71 <dt>Blame view</dt>
72 <dd>Displays the line-by-line history of a file.</dd>
73 <dt>Tree view</dt>
74 <dd>Displays the tree corresponding to a particular commit.</dd>
75 </dl>
76 <p class="Pp"><code class="Nm">tog</code> provides global and command-specific
77 key bindings and options. The global key bindings are:</p>
78 <dl class="Bl-tag">
79 <dt><a class="permalink" href="#Q"><code class="Cm" id="Q">Q</code></a></dt>
80 <dd>Quit <code class="Nm">tog</code>.</dd>
81 <dt><a class="permalink" href="#q"><code class="Cm" id="q">q</code></a></dt>
82 <dd>Quit the view which is in focus.</dd>
83 <dt><a class="permalink" href="#Tab"><code class="Cm" id="Tab">Tab</code></a></dt>
84 <dd>Switch focus between views.</dd>
85 <dt><a class="permalink" href="#f"><code class="Cm" id="f">f</code></a></dt>
86 <dd>Toggle fullscreen mode for a split-screen view.
87 <code class="Nm">tog</code> will automatically use split-screen views if
88 the size of the terminal window is sufficiently large.</dd>
89 </dl>
90 <p class="Pp">Global options must precede the command name, and are as
91 follows:</p>
92 <dl class="Bl-tag">
93 <dt><a class="permalink" href="#h"><code class="Fl" id="h">-h</code></a></dt>
94 <dd>Display usage information.</dd>
95 <dt><a class="permalink" href="#V"><code class="Fl" id="V">-V</code></a></dt>
96 <dd>Display program version and exit immediately.</dd>
97 </dl>
98 <p class="Pp">The commands for <code class="Nm">tog</code> are as follows:</p>
99 <dl class="Bl-tag">
100 <dt><a class="permalink" href="#log"><code class="Cm" id="log">log</code></a>
101 [<code class="Fl">-c</code> <var class="Ar">commit</var>]
102 [<code class="Fl">-r</code> <var class="Ar">repository-path</var>]
103 [<var class="Ar">path</var>]</dt>
104 <dd>Display history of a repository. If a <var class="Ar">path</var> is
105 specified, show only commits which modified this path.
106 <p class="Pp">This command is also executed if no explicit command is
107 specified.</p>
108 <p class="Pp">The key bindings for <code class="Cm">tog log</code> are as
109 follows:</p>
110 <dl class="Bl-tag">
111 <dt><a class="permalink" href="#Down-arrow,_j,__,_Full_stop"><code class="Cm" id="Down-arrow,_j,__,_Full_stop">Down-arrow,
112 j, &gt;, Full stop</code></a></dt>
113 <dd>Move the selection cursor down.</dd>
114 <dt><a class="permalink" href="#Up-arrow,_k,__,_Comma"><code class="Cm" id="Up-arrow,_k,__,_Comma">Up-arrow,
115 k, &lt;, Comma</code></a></dt>
116 <dd>Move the selection cursor up.</dd>
117 <dt><a class="permalink" href="#Page-down,_Ctrl+f"><code class="Cm" id="Page-down,_Ctrl+f">Page-down,
118 Ctrl+f</code></a></dt>
119 <dd>Move the selection cursor down one page.</dd>
120 <dt><a class="permalink" href="#Page-up,_Ctrl+b"><code class="Cm" id="Page-up,_Ctrl+b">Page-up,
121 Ctrl+b</code></a></dt>
122 <dd>Move the selection cursor up one page.</dd>
123 <dt><a class="permalink" href="#Enter,_Space"><code class="Cm" id="Enter,_Space">Enter,
124 Space</code></a></dt>
125 <dd>Open a <code class="Cm">diff</code> view showing file changes made in
126 the currently selected commit.</dd>
127 <dt><a class="permalink" href="#t"><code class="Cm" id="t">t</code></a></dt>
128 <dd>Open a <code class="Cm">tree</code> view showing the tree for the
129 currently selected commit.</dd>
130 <dt><a class="permalink" href="#Backspace"><code class="Cm" id="Backspace">Backspace</code></a></dt>
131 <dd>Show log entries for the parent directory of the currently selected
132 path, unless an active search is in progress in which case
133 <code class="Cm">Backspace</code> aborts the search.</dd>
134 <dt><a class="permalink" href="#/"><code class="Cm" id="/">/</code></a></dt>
135 <dd>Prompt for a search pattern and start searching for matching commits.
136 The search pattern is an extended regular expression which is matched
137 against a commit's author name, committer name, log message, and
138 commit ID SHA1 hash. Regular expression syntax is documented in
139 <a class="Xr">re_format(7)</a>.</dd>
140 <dt><a class="permalink" href="#n"><code class="Cm" id="n">n</code></a></dt>
141 <dd>Find the next commit which matches the current search pattern.
142 Searching continues until either a match is found or the
143 <code class="Cm">Backspace</code> key is pressed.</dd>
144 <dt><a class="permalink" href="#N"><code class="Cm" id="N">N</code></a></dt>
145 <dd>Find the previous commit which matches the current search pattern.
146 Searching continues until either a match is found or the
147 <code class="Cm">Backspace</code> key is pressed.</dd>
148 <dt><a class="permalink" href="#Ctrl+l"><code class="Cm" id="Ctrl+l">Ctrl+l</code></a></dt>
149 <dd>Reload the log view with new commits found in the repository.</dd>
150 </dl>
151 <p class="Pp">The options for <code class="Cm">tog log</code> are as
152 follows:</p>
153 <dl class="Bl-tag">
154 <dt><a class="permalink" href="#c"><code class="Fl" id="c">-c</code></a>
155 <var class="Ar">commit</var></dt>
156 <dd>Start traversing history at the specified
157 <var class="Ar">commit</var>. The expected argument is the name of a
158 branch or a commit ID SHA1 hash. An abbreviated hash argument will be
159 expanded to a full SHA1 hash automatically, provided the abbreviation
160 is unique. If this option is not specified, default to the work tree's
161 current branch if invoked in a work tree, or to the repository's HEAD
162 reference.</dd>
163 <dt><a class="permalink" href="#r"><code class="Fl" id="r">-r</code></a>
164 <var class="Ar">repository-path</var></dt>
165 <dd>Use the repository at the specified path. If not specified, assume the
166 repository is located at or above the current working directory.</dd>
167 </dl>
168 </dd>
169 <dt><a class="permalink" href="#diff"><code class="Cm" id="diff">diff</code></a>
170 [<var class="Ar">repository-path</var>] <var class="Ar">object1
171 object2</var></dt>
172 <dd>Display the differences between two objects in the repository. Each
173 <var class="Ar">object</var> argument is an object ID SHA1 hash. An
174 abbreviated hash argument will be expanded to a full SHA1 hash
175 automatically, provided the abbreviation is unique. Both objects must be
176 of the same type (blobs, trees, or commits). If the
177 <var class="Ar">repository path</var> is omitted, use the current working
178 directory.
179 <p class="Pp">The key bindings for <code class="Cm">tog diff</code> are as
180 follows:</p>
181 <dl class="Bl-tag">
182 <dt><a class="permalink" href="#Down-arrow,_j"><code class="Cm" id="Down-arrow,_j">Down-arrow,
183 j</code></a></dt>
184 <dd>Scroll down.</dd>
185 <dt><a class="permalink" href="#Up-arrow,_k"><code class="Cm" id="Up-arrow,_k">Up-arrow,
186 k</code></a></dt>
187 <dd>Scroll up.</dd>
188 <dt><a class="permalink" href="#Page-down,_Space,_Ctrl+f"><code class="Cm" id="Page-down,_Space,_Ctrl+f">Page-down,
189 Space, Ctrl+f</code></a></dt>
190 <dd>Scroll down one page.</dd>
191 <dt><a class="permalink" href="#Page-up,_Ctrl+b_2"><code class="Cm" id="Page-up,_Ctrl+b_2">Page-up,
192 Ctrl+b</code></a></dt>
193 <dd>Scroll up one page.</dd>
194 <dt><a class="permalink" href="#_"><code class="Cm" id="_">[</code></a></dt>
195 <dd>Reduce the amount of diff context lines.</dd>
196 <dt><a class="permalink" href="#__2"><code class="Cm" id="__2">]</code></a></dt>
197 <dd>Increase the amount of diff context lines.</dd>
198 <dt><a class="permalink" href="#_,_Comma"><code class="Cm" id="_,_Comma">&lt;,
199 Comma</code></a></dt>
200 <dd>If the diff view was opened via the log view, move to the previous
201 (younger) commit.</dd>
202 <dt><a class="permalink" href="#_,_Full_stop"><code class="Cm" id="_,_Full_stop">&gt;,
203 Full stop</code></a></dt>
204 <dd>If the diff view was opened via the log view, move to the next (older)
205 commit.</dd>
206 </dl>
207 </dd>
208 <dt><a class="permalink" href="#blame"><code class="Cm" id="blame">blame</code></a>
209 [<code class="Fl">-c</code> <var class="Ar">commit</var>]
210 [<code class="Fl">-r</code> <var class="Ar">repository-path</var>]
211 <var class="Ar">path</var></dt>
212 <dd>Display line-by-line history of a file at the specified path.
213 <p class="Pp">The key bindings for <code class="Cm">tog blame</code> are as
214 follows:</p>
215 <dl class="Bl-tag">
216 <dt><a class="permalink" href="#Down-arrow,_j,_Page-down,_Space"><code class="Cm" id="Down-arrow,_j,_Page-down,_Space">Down-arrow,
217 j, Page-down, Space</code></a></dt>
218 <dd>Move the selection cursor down.</dd>
219 <dt><a class="permalink" href="#Up-arrow,_k,_Page-up"><code class="Cm" id="Up-arrow,_k,_Page-up">Up-arrow,
220 k, Page-up</code></a></dt>
221 <dd>Move the selection cursor up.</dd>
222 <dt><a class="permalink" href="#Enter"><code class="Cm" id="Enter">Enter</code></a></dt>
223 <dd>Open a <code class="Cm">diff</code> view for the currently selected
224 line's commit.</dd>
225 <dt><a class="permalink" href="#b"><code class="Cm" id="b">b</code></a></dt>
226 <dd>Reload the <code class="Cm">blame</code> view with the version of the
227 file as found in the currently selected line's commit.</dd>
228 <dt><a class="permalink" href="#p"><code class="Cm" id="p">p</code></a></dt>
229 <dd>Reload the <code class="Cm">blame</code> view with the version of the
230 file as found in the parent commit of the currently selected line's
231 commit.</dd>
232 <dt><a class="permalink" href="#B"><code class="Cm" id="B">B</code></a></dt>
233 <dd>Reload the <code class="Cm">blame</code> view with the previously
234 blamed commit.</dd>
235 <dt><a class="permalink" href="#/_2"><code class="Cm" id="/_2">/</code></a></dt>
236 <dd>Prompt for a search pattern and start searching for matching line. The
237 search pattern is an extended regular expression. Regular expression
238 syntax is documented in <a class="Xr">re_format(7)</a>.</dd>
239 <dt><a class="permalink" href="#n_2"><code class="Cm" id="n_2">n</code></a></dt>
240 <dd>Find the next line which matches the current search pattern.</dd>
241 <dt><a class="permalink" href="#N_2"><code class="Cm" id="N_2">N</code></a></dt>
242 <dd>Find the previous line which matches the current search pattern.</dd>
243 </dl>
244 <p class="Pp">The options for <code class="Cm">tog blame</code> are as
245 follows:</p>
246 <dl class="Bl-tag">
247 <dt><a class="permalink" href="#c_2"><code class="Fl" id="c_2">-c</code></a>
248 <var class="Ar">commit</var></dt>
249 <dd>Start traversing history at the specified
250 <var class="Ar">commit</var>. The expected argument is the name of a
251 branch or a commit ID SHA1 hash. An abbreviated hash argument will be
252 expanded to a full SHA1 hash automatically, provided the abbreviation
253 is unique.</dd>
254 <dt><a class="permalink" href="#r_2"><code class="Fl" id="r_2">-r</code></a>
255 <var class="Ar">repository-path</var></dt>
256 <dd>Use the repository at the specified path. If not specified, assume the
257 repository is located at or above the current working directory.</dd>
258 </dl>
259 </dd>
260 <dt><a class="permalink" href="#tree"><code class="Cm" id="tree">tree</code></a>
261 [<code class="Fl">-c</code> <var class="Ar">commit</var>]
262 [<var class="Ar">repository-path</var>]</dt>
263 <dd>Display the repository tree. If the <var class="Ar">repository path</var>
264 is omitted, assume the repository is located in the current working
265 directory.
266 <p class="Pp">The key bindings for <code class="Cm">tog tree</code> are as
267 follows:</p>
268 <dl class="Bl-tag">
269 <dt><a class="permalink" href="#Down-arrow,_j,_Page-down"><code class="Cm" id="Down-arrow,_j,_Page-down">Down-arrow,
270 j, Page-down</code></a></dt>
271 <dd>Move the selection cursor down.</dd>
272 <dt><a class="permalink" href="#Up-arrow,_k,_Page-up_2"><code class="Cm" id="Up-arrow,_k,_Page-up_2">Up-arrow,
273 k, Page-up</code></a></dt>
274 <dd>Move the selection cursor up.</dd>
275 <dt><a class="permalink" href="#Enter_2"><code class="Cm" id="Enter_2">Enter</code></a></dt>
276 <dd>Enter the currently selected directory, or switch to the
277 <code class="Cm">blame</code> view for the currently selected
278 file.</dd>
279 <dt><a class="permalink" href="#l"><code class="Cm" id="l">l</code></a></dt>
280 <dd>Open a <code class="Cm">log</code> view for the currently selected
281 tree entry.</dd>
282 <dt><a class="permalink" href="#Backspace_2"><code class="Cm" id="Backspace_2">Backspace</code></a></dt>
283 <dd>Move back to the parent directory.</dd>
284 <dt><a class="permalink" href="#i"><code class="Cm" id="i">i</code></a></dt>
285 <dd>Show object IDs for all objects displayed in the
286 <code class="Cm">tree</code> view.</dd>
287 <dt><a class="permalink" href="#/_3"><code class="Cm" id="/_3">/</code></a></dt>
288 <dd>Prompt for a search pattern and start searching for matching tree
289 entries. The search pattern is an extended regular expression which is
290 matched against the tree entry's name. Regular expression syntax is
291 documented in <a class="Xr">re_format(7)</a>.</dd>
292 <dt><a class="permalink" href="#n_3"><code class="Cm" id="n_3">n</code></a></dt>
293 <dd>Find the next tree entry which matches the current search
294 pattern.</dd>
295 <dt><a class="permalink" href="#N_3"><code class="Cm" id="N_3">N</code></a></dt>
296 <dd>Find the previous tree entry which matches the current search
297 pattern.</dd>
298 </dl>
299 <p class="Pp">The options for <code class="Cm">tog tree</code> are as
300 follows:</p>
301 <dl class="Bl-tag">
302 <dt><a class="permalink" href="#c_3"><code class="Fl" id="c_3">-c</code></a>
303 <var class="Ar">commit</var></dt>
304 <dd>Start traversing history at the specified
305 <var class="Ar">commit</var>. The expected argument is the name of a
306 branch or a commit ID SHA1 hash. An abbreviated hash argument will be
307 expanded to a full SHA1 hash automatically, provided the abbreviation
308 is unique.</dd>
309 </dl>
310 </dd>
311 </dl>
312 </section>
313 <section class="Sh">
314 <h1 class="Sh" id="EXIT_STATUS"><a class="permalink" href="#EXIT_STATUS">EXIT
315 STATUS</a></h1>
316 The <code class="Nm">tog</code> utility exits&#x00A0;0 on success,
317 and&#x00A0;&gt;0 if an error occurs.
318 </section>
319 <section class="Sh">
320 <h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
321 ALSO</a></h1>
322 <a class="Xr">got(1)</a>, <a class="Xr">git-repository(5)</a>,
323 <a class="Xr">re_format(7)</a>
324 </section>
325 <section class="Sh">
326 <h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
327 <span class="An">Stefan Sperling</span>
328 &lt;<a class="Mt" href="mailto:stsp@openbsd.org">stsp@openbsd.org</a>&gt;
329 <br/>
330 <span class="An">joshua stein</span>
331 &lt;<a class="Mt" href="mailto:jcs@openbsd.org">jcs@openbsd.org</a>&gt;
332 </section>
333 </div>
334 <table class="foot">
335 <tr>
336 <td class="foot-date">August 11, 2019</td>
337 <td class="foot-os">OpenBSD 6.5</td>
338 </tr>
339 </table>
340 </body>
341 </html>