2 .\" Copyright (c) 2018 Stefan Sperling
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 .Nd Git repository browser
33 is an interactive read-only browser for Git repositories.
34 This repository format is described in
35 .Xr git-repository 5 .
38 supports several types of views which display repository data:
41 Displays commits in the repository's history.
42 This view is displayed initially if no
44 is specified, or if just a
48 Displays changes made in a particular commit.
50 Displays the line-by-line history of a file.
52 Displays the tree corresponding to a particular commit.
54 Displays references in the repository.
58 provides global and command-specific key bindings and options.
59 The global key bindings are:
65 Quit the view which is in focus.
67 Switch focus between views.
69 Toggle fullscreen mode for a split-screen view.
71 will automatically use split-screen views if the size of the terminal
72 window is sufficiently large.
75 Global options must precede the command name, and are as follows:
76 .Bl -tag -width tenletters
78 Display usage information.
80 Display program version and exit immediately.
87 .It Cm log Oo Fl b Oc Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Op Ar path
88 Display history of a repository.
91 is specified, show only commits which modified this path.
92 If invoked in a work tree, the
94 is interpreted relative to the current working directory,
95 and the work tree's path prefix is implicitly prepended.
96 Otherwise, the path is interpreted relative to the repository root.
98 This command is also executed if no explicit command is specified.
104 .It Cm Down-arrow, j, >, Full stop
105 Move the selection cursor down.
106 .It Cm Up-arrow, k, <, Comma
107 Move the selection cursor up.
108 .It Cm Page-down, Ctrl+f
109 Move the selection cursor down one page.
110 .It Cm Page-up, Ctrl+b
111 Move the selection cursor up one page.
115 view showing file changes made in the currently selected commit.
119 view showing the tree for the currently selected commit.
121 Show log entries for the parent directory of the currently selected path,
122 unless an active search is in progress in which case
126 Prompt for a search pattern and start searching for matching commits.
127 The search pattern is an extended regular expression which is matched
128 against a commit's author name, committer name, log message, and
130 Regular expression syntax is documented in
133 Find the next commit which matches the current search pattern.
134 Searching continues until either a match is found or the
138 Find the previous commit which matches the current search pattern.
139 Searching continues until either a match is found or the
143 Reload the log view with new commits found in the repository.
145 Reload the log view and toggle display of merged commits.
148 option determines whether merged commits are displayed initially.
152 view listing all references in the repository.
153 This can then be used to open a new
155 view for arbitrary branches and tags.
163 Display individual commits which were merged into the current branch
167 shows the linear history of the current branch only.
170 key binding can be used to toggle display of merged commits at run-time.
172 Start traversing history at the specified
174 The expected argument is the name of a branch or a commit ID SHA1 hash.
175 An abbreviated hash argument will be expanded to a full SHA1 hash
176 automatically, provided the abbreviation is unique.
177 If this option is not specified, default to the work tree's current branch
178 if invoked in a work tree, or to the repository's HEAD reference.
179 .It Fl r Ar repository-path
180 Use the repository at the specified path.
181 If not specified, assume the repository is located at or above the current
183 If this directory is a
185 work tree, use the repository path associated with this work tree.
187 .It Cm diff Oo Fl a Oc Oo Fl r Ar repository-path Oc Ar object1 object2
188 Display the differences between two objects in the repository.
189 Treat each of the two arguments as a reference, a tag name, or an object
190 ID SHA1 hash, and display differences between the corresponding objects.
191 Both objects must be of the same type (blobs, trees, or commits).
192 An abbreviated hash argument will be expanded to a full SHA1 hash
193 automatically, provided the abbreviation is unique.
200 Toggle treatment of file contents as ASCII text even if binary data was
206 .It Cm Page-down, Space, Ctrl+f
207 Scroll down one page.
208 .It Cm Page-up, Ctrl+b
211 Reduce the amount of diff context lines.
213 Increase the amount of diff context lines.
215 If the diff view was opened via the log view, move to the previous (younger)
218 If the diff view was opened via the log view, move to the next (older) commit.
220 Prompt for a search pattern and start searching for matching lines.
221 The search pattern is an extended regular expression.
222 Regular expression syntax is documented in
225 Find the next line which matches the current search pattern.
227 Find the previous line which matches the current search pattern.
229 Toggle display of whitespace-only changes.
237 Treat file contents as ASCII text even if binary data is detected.
239 Set the number of context lines shown in the diff.
240 By default, 3 lines of context are shown.
241 .It Fl r Ar repository-path
242 Use the repository at the specified path.
243 If not specified, assume the repository is located at or above the current
245 If this directory is a
247 work tree, use the repository path associated with this work tree.
249 Ignore whitespace-only changes.
251 .It Cm blame Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Ar path
252 Display line-by-line history of a file at the specified path.
259 Move the selection cursor down.
261 Move the selection cursor up.
262 .It Cm Page-down, Space, Ctrl+f
263 Move the selection cursor down one page.
264 .It Cm Page-up, Ctrl+b
265 Move the selection cursor up one page.
269 view for the currently selected line's commit.
273 view with the version of the file as found in the currently
274 selected line's commit.
278 view with the version of the file as found in the parent commit of the
279 currently selected line's commit.
283 view with the previously blamed commit.
285 Prompt for a search pattern and start searching for matching lines.
286 The search pattern is an extended regular expression.
287 Regular expression syntax is documented in
290 Find the next line which matches the current search pattern.
292 Find the previous line which matches the current search pattern.
300 Start traversing history at the specified
302 The expected argument is the name of a branch or a commit ID SHA1 hash.
303 An abbreviated hash argument will be expanded to a full SHA1 hash
304 automatically, provided the abbreviation is unique.
305 .It Fl r Ar repository-path
306 Use the repository at the specified path.
307 If not specified, assume the repository is located at or above the current
309 If this directory is a
311 work tree, use the repository path associated with this work tree.
313 .It Cm tree Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Op Ar path
314 Display the repository tree.
317 is specified, show tree entries at this path.
319 Displayed tree entries may carry one of the following trailing annotations:
320 .Bl -column YXZ description
321 .It @ Ta entry is a symbolic link
322 .It / Ta entry is a directory
323 .It * Ta entry is an executable file
324 .It $ Ta entry is a Git submodule
327 Symbolic link entries are also annotated with the target path of the link.
334 Move the selection cursor down.
336 Move the selection cursor up.
337 .It Cm Page-down, Ctrl+f
338 Move the selection cursor down one page.
339 .It Cm Page-up, Ctrl+b
340 Move the selection cursor up one page.
342 Enter the currently selected directory, or switch to the
344 view for the currently selected file.
348 view for the currently selected tree entry.
352 view listing all references in the repository.
353 This can then be used to open a new
355 view for arbitrary branches and tags.
357 Move back to the parent directory.
359 Show object IDs for all objects displayed in the
363 Prompt for a search pattern and start searching for matching tree entries.
364 The search pattern is an extended regular expression which is matched
365 against the tree entry's name.
366 Regular expression syntax is documented in
369 Find the next tree entry which matches the current search pattern.
371 Find the previous tree entry which matches the current search pattern.
379 Start traversing history at the specified
381 The expected argument is the name of a branch or a commit ID SHA1 hash.
382 An abbreviated hash argument will be expanded to a full SHA1 hash
383 automatically, provided the abbreviation is unique.
384 .It Fl r Ar repository-path
385 Use the repository at the specified path.
386 If not specified, assume the repository is located at or above the current
388 If this directory is a
390 work tree, use the repository path associated with this work tree.
392 .It Cm ref Oo Fl r Ar repository-path Oc
393 Display references in the repository.
400 Move the selection cursor down.
402 Move the selection cursor up.
403 .It Cm Page-down, Ctrl+f
404 Move the selection cursor down one page.
405 .It Cm Page-up, Ctrl+b
406 Move the selection cursor up one page.
408 Open a log view which begins traversing history at the commit resolved via the
409 currently selected reference.
413 view showing the tree resolved via the currently selected reference.
415 Show object IDs for all non-symbolic references displayed in the
419 Prompt for a search pattern and start searching for matching references.
420 The search pattern is an extended regular expression which is matched
421 against absolute reference names.
422 Regular expression syntax is documented in
425 Find the next reference which matches the current search pattern.
427 Find the previous reference which matches the current search pattern.
429 Reload the list of references displayed by the
438 .It Fl r Ar repository-path
439 Use the repository at the specified path.
440 If not specified, assume the repository is located at or above the current
442 If this directory is a
444 work tree, use the repository path associated with this work tree.
448 .Bl -tag -width TOG_COLORS
451 shows colorized output if this variable is set to a non-empty value.
452 The default color scheme can be modified by setting the environment
453 variables documented below.
454 The colors available in color schemes are
464 which maps to the terminal's default foreground color.
465 .It Ev TOG_COLOR_DIFF_MINUS
466 The color used to mark up removed lines in diffs.
467 If not set, the default value
470 .It Ev TOG_COLOR_DIFF_PLUS
471 The color used to mark up added lines in diffs.
472 If not set, the default value
475 .It Ev TOG_COLOR_DIFF_CHUNK_HEADER
476 The color used to mark up chunk header lines in diffs.
477 If not set, the default value
480 .It Ev TOG_COLOR_DIFF_META
481 The color used to mark up meta data in diffs.
482 If not set, the default value
485 .It Ev TOG_COLOR_TREE_SUBMODULE
486 The color used to mark up sobmodules tree entries.
487 If not set, the default value
490 .It Ev TOG_COLOR_TREE_SYMLINK
491 The color used to mark up symbolic link tree entries.
492 If not set, the default value
495 .It Ev TOG_COLOR_TREE_DIRECTORY
496 The color used to mark up directory tree entries.
497 If not set, the default value
500 .It Ev TOG_COLOR_TREE_EXECUTABLE
501 The color used to mark up executable file tree entries.
502 If not set, the default value
505 .It Ev TOG_COLOR_COMMIT
506 The color used to mark up commit IDs.
507 If not set, the default value
510 .It Ev TOG_COLOR_AUTHOR
511 The color used to mark up author information.
512 If not set, the default value
515 .It Ev TOG_COLOR_DATE
516 The color used to mark up date information.
517 If not set, the default value
520 .It Ev TOG_COLOR_REFS_HEADS
521 The color used to mark up references in the
524 If not set, the default value
527 .It Ev TOG_COLOR_REFS_TAGS
528 The color used to mark up references in the
531 If not set, the default value
534 .It Ev TOG_COLOR_REFS_REMOTES
535 The color used to mark up references in the
538 If not set, the default value
546 .Xr git-repository 5 ,
549 .An Stefan Sperling Aq Mt stsp@openbsd.org
550 .An Joshua Stein Aq Mt jcs@openbsd.org