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 Global options must precede the command name, and are as follows:
71 .Bl -tag -width tenletters
73 Display usage information.
75 Display program version and exit immediately.
78 The global key bindings are:
81 Display run-time help.
82 Key bindings for the focussed view will be displayed.
83 Pressing this again inside the help view will toggle the display of
91 Quit the view which is in focus.
93 Switch focus between views.
95 Toggle fullscreen mode for a split-screen view.
97 will automatically use vertical split-screen views if the size of the
98 terminal window is sufficiently large.
100 Switch the current split-screen layout, and render all active views in
102 The split-screen layout can be either vertical or horizontal.
103 If the terminal is not wide enough when switching to a vertical split,
104 views will render in fullscreen.
106 When in a split-screen view, decrease the size of the focussed split
107 N increments (default: 1).
109 When in a split-screen view, increase the size of the focussed split
110 N increments (default: 1).
112 Go to line N in the view (default: last line).
114 Go to line N in the view (default: first line).
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
179 Move the cursor to commit N (default: 1).
183 but defaults to the oldest commit.
187 view showing file changes made in the currently selected commit.
191 view showing the tree for the currently selected commit.
193 Show log entries for the parent directory of the currently selected path.
194 However when an active search is in progress or when additional commits
197 aborts the running operation.
199 Prompt for a search pattern and start searching for matching commits.
200 The search pattern is an extended regular expression which is matched
201 against a commit's author name, committer name, log message, and
203 Regular expression syntax is documented in
206 Prompt for a pattern and limit the log view's list of commits to those
207 which match the pattern.
208 If no pattern is specified, i.e. the
210 prompt is immediately closed with the Enter key, then the pattern is
212 Until the pattern is cleared, the limited list of commits replaces the
213 full list of commits for all operations supported by the log view.
214 For example, a search started with
216 will search the limited list of commits, rather than searching all commits.
217 The pattern is an extended regular expression which is matched
218 against a commit's author name, committer name, log message, and
220 Regular expression syntax is documented in
223 Find the Nth next commit which matches the current search pattern (default: 1).
225 Searching continues until either a match is found or
231 Find the Nth previous commit which matches the current search pattern
234 Searching continues until either a match is found or
242 view with new commits found in the repository.
246 view and toggle display of merged commits.
249 option determines whether merged commits are displayed initially.
253 view listing all references in the repository.
254 This can then be used to open a new
256 view for arbitrary branches and tags.
258 Toggle between showing the committer name and the author name.
266 Display individual commits which were merged into the current branch
270 shows the linear history of the current branch only.
273 key binding can be used to toggle display of merged commits at run-time.
275 Start traversing history at the specified
277 The expected argument is the name of a branch or a commit ID SHA1 hash.
278 An abbreviated hash argument will be expanded to a full SHA1 hash
279 automatically, provided the abbreviation is unique.
280 If this option is not specified, default to the work tree's current branch
281 if invoked in a work tree, or to the repository's HEAD reference.
282 .It Fl r Ar repository-path
283 Use the repository at the specified path.
284 If not specified, assume the repository is located at or above the current
286 If this directory is a
288 work tree, use the repository path associated with this work tree.
294 .Op Fl r Ar repository-path
298 Display the differences between two objects in the repository.
299 Treat each of the two arguments as a reference, a tag name, or an object
300 ID SHA1 hash, and display differences between the corresponding objects.
301 Both objects must be of the same type (blobs, trees, or commits).
302 An abbreviated hash argument will be expanded to a full SHA1 hash
303 automatically, provided the abbreviation is unique.
307 are as follows (N denotes optional prefixed count modifier):
310 Toggle treatment of file contents as ASCII text even if binary data was
312 .It Cm Down-arrow, j, Ctrl-n
313 Scroll down N lines (default: 1).
314 .It Cm Up-arrow, k, Ctrl-p
315 Scroll up N lines (default: 1).
316 .It Cm Right-arrow, l
317 Scroll view to the right N increments (default: 1).
319 Diff output moves left on the screen.
321 Scroll view to the left N increments (default: 1).
323 Diff output moves right on the screen.
325 Scroll view to the rightmost position.
327 Scroll view left to the start of the line.
328 .It Cm Page-down, Space, Ctrl+f, f
329 Scroll down N pages (default: 1).
330 .It Cm Page-up, Ctrl+b, b
331 Scroll up N pages (default: 1).
333 Scroll down N half pages (default: 1).
335 Scroll up N half pages (default: 1).
337 Scroll to the top of the view.
339 Scroll to the bottom of the view.
341 Scroll to line N (default: 1).
345 but defaults to the last line in the diff.
347 Navigate to the Nth previous file in the diff (default: 1).
349 Navigate to the Nth next file in the diff (default: 1).
351 Navigate to the Nth previous hunk in the diff (default: 1).
353 Navigate to the Nth next hunk in the diff (default: 1).
355 Reduce diff context by N lines (default: 1).
357 Increase diff context by N lines (default: 1).
361 view was opened via the
363 view, move to the Nth previous (younger) commit.
364 If the diff was opened via the
366 view, move to the Nth previous line and load the corresponding commit
368 .It Cm >, Full stop, J
371 view was opened via the
373 view, move to the Nth next (older) commit.
374 If the diff was opened via the
376 view, move to the Nth next line and load the corresponding commit (default: 1).
378 Prompt for a search pattern and start searching for matching lines.
379 The search pattern is an extended regular expression.
380 Regular expression syntax is documented in
383 Find the Nth next line which matches the current search pattern (default: 1).
385 Find the Nth previous line which matches the current search pattern
388 Toggle display of whitespace-only changes.
390 Change the diff algorithm.
391 Supported diff algorithms are Myers (quick and dirty) and
392 Patience (slow and tidy).
393 This is a global setting which also affects the
403 Treat file contents as ASCII text even if binary data is detected.
405 Set the number of context lines shown in the diff.
406 By default, 3 lines of context are shown.
407 .It Fl r Ar repository-path
408 Use the repository at the specified path.
409 If not specified, assume the repository is located at or above the current
411 If this directory is a
413 work tree, use the repository path associated with this work tree.
415 Ignore whitespace-only changes.
420 .Op Fl r Ar repository-path
423 Display line-by-line history of a file at the specified path.
427 are as follows (N denotes optional prefixed count modifier):
429 .It Cm Down-arrow, j, Ctrl-n
430 Move the selection cursor down N pages (default: 1).
431 .It Cm Up-arrow, k, Ctrl-p
432 Move the selection cursor up N pages (default: 1).
433 .It Cm Right-arrow, l
434 Scroll view to the right N increments (default: 1).
436 File output moves left on the screen.
438 Scroll view to the left N increments (default: 1).
440 File output moves right on the screen.
442 Scroll view to the rightmost position.
444 Scroll view left to the start of the line.
445 .It Cm Page-down, Space, Ctrl+f, f
446 Move the selection cursor down N pages (default: 1).
447 .It Cm Page-up, Ctrl+b, b
448 Move the selection cursor up N pages (default: 1).
450 Move the selection cursor down N half pages (default: 1).
452 Move the selection cursor up N half pages (default: 1).
454 Move the selection cursor to the first line of the file.
456 Move the selection cursor to the last line of the file.
458 Move the selection cursor to line N (default: 1).
462 but defaults to the last line in the file.
466 view for the currently selected line's commit.
470 view with the version of the file as found in the currently
471 selected line's commit.
475 view with the version of the file as found in the parent commit of the
476 currently selected line's commit.
480 view with the previously blamed commit.
484 view for the currently selected annotated line.
486 Prompt for a search pattern and start searching for matching lines.
487 The search pattern is an extended regular expression.
488 Regular expression syntax is documented in
491 Find the Nth next line which matches the current search pattern (default: 1).
493 Find the Nth previous line which matches the current search pattern
496 Change the diff algorithm.
497 Supported diff algorithms are Myers (quick and dirty) and
498 Patience (slow and tidy).
499 This is a global setting which also affects the
509 Start traversing history at the specified
511 The expected argument is the name of a branch or a commit ID SHA1 hash.
512 An abbreviated hash argument will be expanded to a full SHA1 hash
513 automatically, provided the abbreviation is unique.
514 .It Fl r Ar repository-path
515 Use the repository at the specified path.
516 If not specified, assume the repository is located at or above the current
518 If this directory is a
520 work tree, use the repository path associated with this work tree.
525 .Op Fl r Ar repository-path
528 Display the repository tree.
531 is specified, show tree entries at this path.
533 Displayed tree entries may carry one of the following trailing annotations:
534 .Bl -column YXZ description
535 .It @ Ta entry is a symbolic link
536 .It / Ta entry is a directory
537 .It * Ta entry is an executable file
538 .It $ Ta entry is a Git submodule
541 Symbolic link entries are also annotated with the target path of the link.
545 are as follows (N denotes optional prefixed count modifier):
547 .It Cm Down-arrow, j, Ctrl-n
548 Move the selection cursor down N lines (default: 1).
549 .It Cm Up-arrow, k, Ctrl-p
550 Move the selection cursor up N lines (default: 1).
551 .It Cm Page-down, Space, Ctrl+f, f
552 Move the selection cursor down N pages (default: 1).
553 .It Cm Page-up, Ctrl+b, b
554 Move the selection cursor up N pages (default: 1).
556 Move the selection cursor down N half pages (default: 1).
558 Move the selection cursor up N half pages (default: 1).
560 Move the selection cursor to the first entry.
562 Move the selection cursor to the last entry.
564 Move the selection cursor to entry N (default: 1).
568 but defaults to the last entry.
570 Enter the currently selected directory, or switch to the
572 view for the currently selected file.
576 view for the currently selected tree entry.
580 view listing all references in the repository.
581 This can then be used to open a new
583 view for arbitrary branches and tags.
585 Move back to the Nth parent directory (default: 1).
587 Show object IDs for all objects displayed in the
591 Prompt for a search pattern and start searching for matching tree entries.
592 The search pattern is an extended regular expression which is matched
593 against the tree entry's name.
594 Regular expression syntax is documented in
597 Find the Nth next tree entry which matches the current search pattern
600 Find the Nth previous tree entry which matches the current search pattern
609 Start traversing history at the specified
611 The expected argument is the name of a branch or a commit ID SHA1 hash.
612 An abbreviated hash argument will be expanded to a full SHA1 hash
613 automatically, provided the abbreviation is unique.
614 .It Fl r Ar repository-path
615 Use the repository at the specified path.
616 If not specified, assume the repository is located at or above the current
618 If this directory is a
620 work tree, use the repository path associated with this work tree.
622 .It Cm ref Op Fl r Ar repository-path
623 Display references in the repository.
627 are as follows (N denotes optional prefixed count modifier):
629 .It Cm Down-arrow, j, Ctrl-n
630 Move the selection cursor down N lines (default: 1).
631 .It Cm Up-arrow, k, Ctrl-p
632 Move the selection cursor up N lines (default: 1).
633 .It Cm Page-down, Space, Ctrl+f, f
634 Move the selection cursor down N pages (default: 1).
635 .It Cm Page-up, Ctrl+b, b
636 Move the selection cursor up N pages (default: 1).
638 Move the selection cursor down N half pages (default: 1).
640 Move the selection cursor up N half pages (default: 1).
642 Move the selection cursor to the first reference.
644 Move the selection cursor to the last reference.
646 Move the selection cursor to reference N (default: 1).
650 but defaults to the last reference.
654 view which begins traversing history at the commit resolved via the
655 currently selected reference.
659 view showing the tree resolved via the currently selected reference.
661 Show object IDs for all non-symbolic references displayed in the
665 Show last modified date of each displayed reference.
667 Toggle display order of references between sort by name and sort by timestamp.
669 Prompt for a search pattern and start searching for matching references.
670 The search pattern is an extended regular expression which is matched
671 against absolute reference names.
672 Regular expression syntax is documented in
675 Find the Nth next reference which matches the current search pattern
678 Find the Nth previous reference which matches the current search pattern
681 Reload the list of references displayed by the
690 .It Fl r Ar repository-path
691 Use the repository at the specified path.
692 If not specified, assume the repository is located at or above the current
694 If this directory is a
696 work tree, use the repository path associated with this work tree.
700 .Bl -tag -width TOG_VIEW_SPLIT_MODE
703 shows colorized output if this variable is set to a non-empty value.
704 The default color scheme can be modified by setting the environment
705 variables documented below.
706 The colors available in color schemes are
716 which maps to the terminal's default foreground color.
717 .It Ev TOG_COLOR_AUTHOR
718 The color used to mark up author information.
719 If not set, the default value
722 .It Ev TOG_COLOR_COMMIT
723 The color used to mark up commit IDs.
724 If not set, the default value
727 .It Ev TOG_COLOR_DATE
728 The color used to mark up date information.
729 If not set, the default value
732 .It Ev TOG_COLOR_DIFF_CHUNK_HEADER
733 The color used to mark up chunk header lines in diffs.
734 If not set, the default value
737 .It Ev TOG_COLOR_DIFF_META
738 The color used to mark up meta data in diffs.
739 If not set, the default value
742 .It Ev TOG_COLOR_DIFF_MINUS
743 The color used to mark up removed lines in diffs.
744 If not set, the default value
747 .It Ev TOG_COLOR_DIFF_PLUS
748 The color used to mark up added lines in diffs.
749 If not set, the default value
752 .It Ev TOG_COLOR_REFS_BACKUP
753 The color used to mark up references in the
756 If not set, the default value
759 .It Ev TOG_COLOR_REFS_HEADS
760 The color used to mark up references in the
763 If not set, the default value
766 .It Ev TOG_COLOR_REFS_REMOTES
767 The color used to mark up references in the
770 If not set, the default value
773 .It Ev TOG_COLOR_REFS_TAGS
774 The color used to mark up references in the
777 If not set, the default value
780 .It Ev TOG_COLOR_TREE_DIRECTORY
781 The color used to mark up directory tree entries.
782 If not set, the default value
785 .It Ev TOG_COLOR_TREE_EXECUTABLE
786 The color used to mark up executable file tree entries.
787 If not set, the default value
790 .It Ev TOG_COLOR_TREE_SUBMODULE
791 The color used to mark up submodule tree entries.
792 If not set, the default value
795 .It Ev TOG_COLOR_TREE_SYMLINK
796 The color used to mark up symbolic link tree entries.
797 If not set, the default value
800 .It Ev TOG_DIFF_ALGORITHM
801 Determines the default diff algorithm used by
803 Supported diff algorithms are Myers (quick and dirty) and
804 Patience (slow and tidy).
806 .Ev TOG_DIFF_ALGORITHM
811 If unset, the Myers diff algorithm will be used by default.
812 .It Ev TOG_VIEW_SPLIT_MODE
813 Determines the default layout of split-screen views.
819 will use horizontal split by default.
820 Otherwise, vertical split will be used.
823 key can be used to switch between vertical and horizontal split layout
830 .Xr git-repository 5 ,
833 .An Christian Weisgerber Aq Mt naddy@openbsd.org
834 .An Josh Rickmar Aq Mt jrick@zettaport.com
835 .An Joshua Stein Aq Mt jcs@openbsd.org
836 .An Mark Jamsek Aq Mt mark@jamsek.dev
837 .An Martin Pieuchot Aq Mt mpi@openbsd.org
838 .An Omar Polo Aq Mt op@openbsd.org
839 .An Stefan Sperling Aq Mt stsp@openbsd.org
840 .An Klemens Nanni Aq Mt kn@openbsd.org