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
32 is an interactive read-only browser for Git repositories.
33 This repository format is described in
34 .Xr git-repository 5 .
37 supports several types of views which display repository data:
40 Displays commits in the repository's history.
41 This view is displayed initially if no
43 is specified, or if just a
47 Displays changes made in a particular commit.
49 Displays the line-by-line history of a file.
51 Displays the tree corresponding to a particular commit.
53 Displays references in the repository.
57 provides global and command-specific key bindings and options.
58 Some command-specific key bindings may be prefixed with an integer, which is
59 denoted by N in the descriptions below, and is used as a modifier to the
60 operation as indicated.
62 will echo digits to the screen when count modifiers are entered, and complete
63 the sequence upon input of the first non-numeric character.
64 Count modifiers can be aborted by entering an unmapped key.
65 Once a compound command is executed, the operation can be cancelled with
70 The global key bindings are:
73 Display run-time help.
74 Key bindings for the focussed view will be displayed.
75 Pressing this again inside the help view will toggle the display of
83 Quit the view which is in focus.
85 Switch focus between views.
87 Toggle fullscreen mode for a split-screen view.
89 will automatically use vertical split-screen views if the size of the
90 terminal window is sufficiently large.
92 Switch the current split-screen layout, and render all active views in
94 The split-screen layout can be either vertical or horizontal.
95 If the terminal is not wide enough when switching to a vertical split,
96 views will render in fullscreen.
98 When in a split-screen view, decrease the size of the focussed split
99 N increments (default: 1).
101 When in a split-screen view, increase the size of the focussed split
102 N increments (default: 1).
104 Go to line N in the view (default: last line).
106 Go to line N in the view (default: first line).
109 Global options must precede the command name, and are as follows:
110 .Bl -tag -width tenletters
112 Display usage information.
114 Display program version and exit immediately.
120 .Bl -tag -width blame
125 .Op Fl r Ar repository-path
128 Display history of a repository.
131 is specified, show only commits which modified this path.
132 If invoked in a work tree, the
134 is interpreted relative to the current working directory,
135 and the work tree's path prefix is implicitly prepended.
136 Otherwise, the path is interpreted relative to the repository root.
138 This command is also executed if no explicit command is specified.
142 are as follows (N denotes optional prefixed count modifier):
144 .It Cm Down-arrow, j, >, Full stop, Ctrl-n
145 Move the selection cursor down N lines (default: 1).
146 .It Cm Up-arrow, k, <, Comma, Ctrl-p
147 Move the selection cursor up N lines (default: 1).
148 .It Cm Right-arrow, l
149 Scroll log message field to the right N increments (default: 1).
151 Log message moves left on the screen.
153 Scroll log message field to the left N increments (default: 1).
155 Log message moves right on the screen.
157 Scroll log message field to the rightmost position.
159 Scroll log message field to the leftmost position.
160 .It Cm Page-down, Space, Ctrl+f, f
161 Move the selection cursor down N pages (default: 1).
162 .It Cm Page-up, Ctrl+b, b
163 Move the selection cursor up N pages (default: 1).
165 Move the selection cursor down N half pages (default: 1).
167 Move the selection cursor up N half pages (default: 1).
169 Move the cursor to the newest commit.
171 Move the cursor to the oldest commit.
172 This will traverse all commits on the current branch which may take
173 a long time depending on the number of commits in branch history.
174 If needed, this operation can be cancelled with
181 view showing file changes made in the currently selected commit.
185 view showing the tree for the currently selected commit.
187 Show log entries for the parent directory of the currently selected path.
188 However when an active search is in progress or when additional commits
191 aborts the running operation.
193 Prompt for a search pattern and start searching for matching commits.
194 The search pattern is an extended regular expression which is matched
195 against a commit's author name, committer name, log message, and
197 Regular expression syntax is documented in
202 but hides the non-matching commits.
203 Use the empty string as a pattern to display all commits.
205 Find the Nth next commit which matches the current search pattern (default: 1).
207 Searching continues until either a match is found or
213 Find the Nth previous commit which matches the current search pattern
216 Searching continues until either a match is found or
224 view with new commits found in the repository.
228 view and toggle display of merged commits.
231 option determines whether merged commits are displayed initially.
235 view listing all references in the repository.
236 This can then be used to open a new
238 view for arbitrary branches and tags.
240 Toggle between showing the author and the committer name.
248 Display individual commits which were merged into the current branch
252 shows the linear history of the current branch only.
255 key binding can be used to toggle display of merged commits at run-time.
257 Start traversing history at the specified
259 The expected argument is the name of a branch or a commit ID SHA1 hash.
260 An abbreviated hash argument will be expanded to a full SHA1 hash
261 automatically, provided the abbreviation is unique.
262 If this option is not specified, default to the work tree's current branch
263 if invoked in a work tree, or to the repository's HEAD reference.
264 .It Fl r Ar repository-path
265 Use the repository at the specified path.
266 If not specified, assume the repository is located at or above the current
268 If this directory is a
270 work tree, use the repository path associated with this work tree.
276 .Op Fl r Ar repository-path
280 Display the differences between two objects in the repository.
281 Treat each of the two arguments as a reference, a tag name, or an object
282 ID SHA1 hash, and display differences between the corresponding objects.
283 Both objects must be of the same type (blobs, trees, or commits).
284 An abbreviated hash argument will be expanded to a full SHA1 hash
285 automatically, provided the abbreviation is unique.
289 are as follows (N denotes optional prefixed count modifier):
292 Toggle treatment of file contents as ASCII text even if binary data was
294 .It Cm Down-arrow, j, Ctrl-n
295 Scroll down N lines (default: 1).
296 .It Cm Up-arrow, k, Ctrl-p
297 Scroll up N lines (default: 1).
298 .It Cm Right-arrow, l
299 Scroll view to the right N increments (default: 1).
301 Diff output moves left on the screen.
303 Scroll view to the left N increments (default: 1).
305 Diff output moves right on the screen.
307 Scroll view to the rightmost position.
309 Scroll view left to the start of the line.
310 .It Cm Page-down, Space, Ctrl+f, f
311 Scroll down N pages (default: 1).
312 .It Cm Page-up, Ctrl+b, b
313 Scroll up N pages (default: 1).
315 Scroll down N half pages (default: 1).
317 Scroll up N half pages (default: 1).
319 Scroll to the top of the view.
321 Scroll to the bottom of the view.
323 Navigate to the Nth previous file in the diff (default: 1).
325 Navigate to the Nth next file in the diff (default: 1).
327 Navigate to the Nth previous hunk in the diff (default: 1).
329 Navigate to the Nth next hunk in the diff (default: 1).
331 Reduce diff context by N lines (default: 1).
333 Increase diff context by N lines (default: 1).
337 view was opened via the
339 view, move to the Nth previous (younger) commit.
340 If the diff was opened via the
342 view, move to the Nth previous line and load the corresponding commit
344 .It Cm >, Full stop, J
347 view was opened via the
349 view, move to the Nth next (older) commit.
350 If the diff was opened via the
352 view, move to the Nth next line and load the corresponding commit (default: 1).
354 Prompt for a search pattern and start searching for matching lines.
355 The search pattern is an extended regular expression.
356 Regular expression syntax is documented in
359 Find the Nth next line which matches the current search pattern (default: 1).
361 Find the Nth previous line which matches the current search pattern
364 Toggle display of whitespace-only changes.
366 Change the diff algorithm.
367 Supported diff algorithms are Myers (quick and dirty) and
368 Patience (slow and tidy).
369 This is a global setting which also affects the
379 Treat file contents as ASCII text even if binary data is detected.
381 Set the number of context lines shown in the diff.
382 By default, 3 lines of context are shown.
383 .It Fl r Ar repository-path
384 Use the repository at the specified path.
385 If not specified, assume the repository is located at or above the current
387 If this directory is a
389 work tree, use the repository path associated with this work tree.
391 Ignore whitespace-only changes.
396 .Op Fl r Ar repository-path
399 Display line-by-line history of a file at the specified path.
403 are as follows (N denotes optional prefixed count modifier):
405 .It Cm Down-arrow, j, Ctrl-n
406 Move the selection cursor down N pages (default: 1).
407 .It Cm Up-arrow, k, Ctrl-p
408 Move the selection cursor up N pages (default: 1).
409 .It Cm Right-arrow, l
410 Scroll view to the right N increments (default: 1).
412 File output moves left on the screen.
414 Scroll view to the left N increments (default: 1).
416 File output moves right on the screen.
418 Scroll view to the rightmost position.
420 Scroll view left to the start of the line.
421 .It Cm Page-down, Space, Ctrl+f, f
422 Move the selection cursor down N pages (default: 1).
423 .It Cm Page-up, Ctrl+b, b
424 Move the selection cursor up N pages (default: 1).
426 Move the selection cursor down N half pages (default: 1).
428 Move the selection cursor up N half pages (default: 1).
430 Move the selection cursor to the first line of the file.
432 Move the selection cursor to the last line of the file.
436 view for the currently selected line's commit.
440 view with the version of the file as found in the currently
441 selected line's commit.
445 view with the version of the file as found in the parent commit of the
446 currently selected line's commit.
450 view with the previously blamed commit.
454 view for the currently selected annotated line.
456 Prompt for a search pattern and start searching for matching lines.
457 The search pattern is an extended regular expression.
458 Regular expression syntax is documented in
461 Find the Nth next line which matches the current search pattern (default: 1).
463 Find the Nth previous line which matches the current search pattern
466 Change the diff algorithm.
467 Supported diff algorithms are Myers (quick and dirty) and
468 Patience (slow and tidy).
469 This is a global setting which also affects the
479 Start traversing history at the specified
481 The expected argument is the name of a branch or a commit ID SHA1 hash.
482 An abbreviated hash argument will be expanded to a full SHA1 hash
483 automatically, provided the abbreviation is unique.
484 .It Fl r Ar repository-path
485 Use the repository at the specified path.
486 If not specified, assume the repository is located at or above the current
488 If this directory is a
490 work tree, use the repository path associated with this work tree.
495 .Op Fl r Ar repository-path
498 Display the repository tree.
501 is specified, show tree entries at this path.
503 Displayed tree entries may carry one of the following trailing annotations:
504 .Bl -column YXZ description
505 .It @ Ta entry is a symbolic link
506 .It / Ta entry is a directory
507 .It * Ta entry is an executable file
508 .It $ Ta entry is a Git submodule
511 Symbolic link entries are also annotated with the target path of the link.
515 are as follows (N denotes optional prefixed count modifier):
517 .It Cm Down-arrow, j, Ctrl-n
518 Move the selection cursor down N lines (default: 1).
519 .It Cm Up-arrow, k, Ctrl-p
520 Move the selection cursor up N lines (default: 1).
521 .It Cm Page-down, Space, Ctrl+f, f
522 Move the selection cursor down N pages (default: 1).
523 .It Cm Page-up, Ctrl+b, b
524 Move the selection cursor up N pages (default: 1).
526 Move the selection cursor down N half pages (default: 1).
528 Move the selection cursor up N half pages (default: 1).
530 Move the selection cursor to the first entry.
532 Move the selection cursor to the last entry.
534 Enter the currently selected directory, or switch to the
536 view for the currently selected file.
540 view for the currently selected tree entry.
544 view listing all references in the repository.
545 This can then be used to open a new
547 view for arbitrary branches and tags.
549 Move back to the Nth parent directory (default: 1).
551 Show object IDs for all objects displayed in the
555 Prompt for a search pattern and start searching for matching tree entries.
556 The search pattern is an extended regular expression which is matched
557 against the tree entry's name.
558 Regular expression syntax is documented in
561 Find the Nth next tree entry which matches the current search pattern
564 Find the Nth previous tree entry which matches the current search pattern
573 Start traversing history at the specified
575 The expected argument is the name of a branch or a commit ID SHA1 hash.
576 An abbreviated hash argument will be expanded to a full SHA1 hash
577 automatically, provided the abbreviation is unique.
578 .It Fl r Ar repository-path
579 Use the repository at the specified path.
580 If not specified, assume the repository is located at or above the current
582 If this directory is a
584 work tree, use the repository path associated with this work tree.
586 .It Cm ref Op Fl r Ar repository-path
587 Display references in the repository.
591 are as follows (N denotes optional prefixed count modifier):
593 .It Cm Down-arrow, j, Ctrl-n
594 Move the selection cursor down N lines (default: 1).
595 .It Cm Up-arrow, k, Ctrl-p
596 Move the selection cursor up N lines (default: 1).
597 .It Cm Page-down, Space, Ctrl+f, f
598 Move the selection cursor down N pages (default: 1).
599 .It Cm Page-up, Ctrl+b, b
600 Move the selection cursor up N pages (default: 1).
602 Move the selection cursor down N half pages (default: 1).
604 Move the selection cursor up N half pages (default: 1).
606 Move the selection cursor to the first reference.
608 Move the selection cursor to the last reference.
612 view which begins traversing history at the commit resolved via the
613 currently selected reference.
617 view showing the tree resolved via the currently selected reference.
619 Show object IDs for all non-symbolic references displayed in the
623 Show last modified date of each displayed reference.
625 Toggle display order of references between sort by name and sort by timestamp.
627 Prompt for a search pattern and start searching for matching references.
628 The search pattern is an extended regular expression which is matched
629 against absolute reference names.
630 Regular expression syntax is documented in
633 Find the Nth next reference which matches the current search pattern
636 Find the Nth previous reference which matches the current search pattern
639 Reload the list of references displayed by the
648 .It Fl r Ar repository-path
649 Use the repository at the specified path.
650 If not specified, assume the repository is located at or above the current
652 If this directory is a
654 work tree, use the repository path associated with this work tree.
658 .Bl -tag -width TOG_VIEW_SPLIT_MODE
659 .It Ev TOG_DIFF_ALGORITHM
660 Determines the default diff algorithm used by
662 Supported diff algorithms are Myers (quick and dirty) and
663 Patience (slow and tidy).
665 .Ev TOG_DIFF_ALGORITHM
670 If unset, the Myers diff algorithm will be used by default.
671 .It Ev TOG_VIEW_SPLIT_MODE
672 Determines the default layout of split-screen views.
678 will use horizontal split by default.
679 Otherwise, vertical split will be used.
682 key can be used to switch between vertical and horizontal split layout
686 shows colorized output if this variable is set to a non-empty value.
687 The default color scheme can be modified by setting the environment
688 variables documented below.
689 The colors available in color schemes are
699 which maps to the terminal's default foreground color.
700 .It Ev TOG_COLOR_DIFF_MINUS
701 The color used to mark up removed lines in diffs.
702 If not set, the default value
705 .It Ev TOG_COLOR_DIFF_PLUS
706 The color used to mark up added lines in diffs.
707 If not set, the default value
710 .It Ev TOG_COLOR_DIFF_CHUNK_HEADER
711 The color used to mark up chunk header lines in diffs.
712 If not set, the default value
715 .It Ev TOG_COLOR_DIFF_META
716 The color used to mark up meta data in diffs.
717 If not set, the default value
720 .It Ev TOG_COLOR_TREE_SUBMODULE
721 The color used to mark up submodule tree entries.
722 If not set, the default value
725 .It Ev TOG_COLOR_TREE_SYMLINK
726 The color used to mark up symbolic link tree entries.
727 If not set, the default value
730 .It Ev TOG_COLOR_TREE_DIRECTORY
731 The color used to mark up directory tree entries.
732 If not set, the default value
735 .It Ev TOG_COLOR_TREE_EXECUTABLE
736 The color used to mark up executable file tree entries.
737 If not set, the default value
740 .It Ev TOG_COLOR_COMMIT
741 The color used to mark up commit IDs.
742 If not set, the default value
745 .It Ev TOG_COLOR_AUTHOR
746 The color used to mark up author information.
747 If not set, the default value
750 .It Ev TOG_COLOR_DATE
751 The color used to mark up date information.
752 If not set, the default value
755 .It Ev TOG_COLOR_REFS_HEADS
756 The color used to mark up references in the
759 If not set, the default value
762 .It Ev TOG_COLOR_REFS_TAGS
763 The color used to mark up references in the
766 If not set, the default value
769 .It Ev TOG_COLOR_REFS_REMOTES
770 The color used to mark up references in the
773 If not set, the default value
776 .It Ev TOG_COLOR_REFS_BACKUP
777 The color used to mark up references in the
780 If not set, the default value
788 .Xr git-repository 5 ,
791 .An Christian Weisgerber Aq Mt naddy@openbsd.org
792 .An Josh Rickmar Aq Mt jrick@zettaport.com
793 .An Joshua Stein Aq Mt jcs@openbsd.org
794 .An Mark Jamsek Aq Mt mark@jamsek.dev
795 .An Martin Pieuchot Aq Mt mpi@openbsd.org
796 .An Omar Polo Aq Mt op@openbsd.org
797 .An Stefan Sperling Aq Mt stsp@openbsd.org
798 .An Klemens Nanni Aq Mt kn@openbsd.org