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 The global key bindings are:
64 Quit the view which is in focus.
66 Switch focus between views.
68 Toggle fullscreen mode for a split-screen view.
70 will automatically use split-screen views if the size of the terminal
71 window is sufficiently large.
74 Global options must precede the command name, and are as follows:
75 .Bl -tag -width tenletters
77 Display usage information.
79 Display program version and exit immediately.
86 .It Cm log Oo Fl b Oc Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Op Ar path
87 Display history of a repository.
90 is specified, show only commits which modified this path.
91 If invoked in a work tree, the
93 is interpreted relative to the current working directory,
94 and the work tree's path prefix is implicitly prepended.
95 Otherwise, the path is interpreted relative to the repository root.
97 This command is also executed if no explicit command is specified.
103 .It Cm Down-arrow, j, >, Full stop, Ctrl-n
104 Move the selection cursor down.
105 .It Cm Up-arrow, k, <, Comma, Ctrl-p
106 Move the selection cursor up.
107 .It Cm Right-arrow, l
108 Scroll log message field to the right. Log message moves left on the screen.
110 Scroll log message field to the left. Log message moves right on the screen.
112 Scroll log message field to the rightmost position.
114 Scroll log message field to the leftmost position.
115 .It Cm Page-down, Ctrl+f
116 Move the selection cursor down one page.
117 .It Cm Page-up, Ctrl+b
118 Move the selection cursor up one page.
120 Move the selection cursor down one half page.
122 Move the selection cursor up one half page.
124 Move the cursor to the newest commit.
126 Move the cursor to the oldest commit.
127 This will traverse all commits on the current branch which may take
128 a long time depending on the number of commits in branch history.
129 If needed, this operation can be cancelled with
134 view showing file changes made in the currently selected commit.
138 view showing the tree for the currently selected commit.
140 Show log entries for the parent directory of the currently selected path.
141 However when an active search is in progress or when additional commits
144 aborts the running operation.
146 Prompt for a search pattern and start searching for matching commits.
147 The search pattern is an extended regular expression which is matched
148 against a commit's author name, committer name, log message, and
150 Regular expression syntax is documented in
153 Find the next commit which matches the current search pattern.
154 Searching continues until either a match is found or the
158 Find the previous commit which matches the current search pattern.
159 Searching continues until either a match is found or the
165 view with new commits found in the repository.
169 view and toggle display of merged commits.
172 option determines whether merged commits are displayed initially.
176 view listing all references in the repository.
177 This can then be used to open a new
179 view for arbitrary branches and tags.
187 Display individual commits which were merged into the current branch
191 shows the linear history of the current branch only.
194 key binding can be used to toggle display of merged commits at run-time.
196 Start traversing history at the specified
198 The expected argument is the name of a branch or a commit ID SHA1 hash.
199 An abbreviated hash argument will be expanded to a full SHA1 hash
200 automatically, provided the abbreviation is unique.
201 If this option is not specified, default to the work tree's current branch
202 if invoked in a work tree, or to the repository's HEAD reference.
203 .It Fl r Ar repository-path
204 Use the repository at the specified path.
205 If not specified, assume the repository is located at or above the current
207 If this directory is a
209 work tree, use the repository path associated with this work tree.
211 .It Cm diff Oo Fl a Oc Oo Fl C Ar number Oc Oo Fl r Ar repository-path Oc Oo Fl w Oc Ar object1 Ar object2
212 Display the differences between two objects in the repository.
213 Treat each of the two arguments as a reference, a tag name, or an object
214 ID SHA1 hash, and display differences between the corresponding objects.
215 Both objects must be of the same type (blobs, trees, or commits).
216 An abbreviated hash argument will be expanded to a full SHA1 hash
217 automatically, provided the abbreviation is unique.
224 Toggle treatment of file contents as ASCII text even if binary data was
226 .It Cm Down-arrow, j, Ctrl-n
228 .It Cm Up-arrow, k, Ctrl-p
230 .It Cm Right-arrow, l
231 Scroll view to the right. Diff output moves left on the screen.
233 Scroll view to the left. Diff output moves right on the screen.
235 Scroll view to the rightmost position.
237 Scroll view left to the start of the line.
238 .It Cm Page-down, Space, Ctrl+f
239 Scroll down one page.
240 .It Cm Page-up, Ctrl+b
243 Scroll down one half page.
245 Scroll up one half page.
247 Scroll to the top of the view.
249 Scroll to the bottom of the view.
251 Reduce the amount of diff context lines.
253 Increase the amount of diff context lines.
257 view was opened via the
259 view, move to the previous (younger) commit.
263 view was opened via the
265 view, move to the next (older) commit.
267 Prompt for a search pattern and start searching for matching lines.
268 The search pattern is an extended regular expression.
269 Regular expression syntax is documented in
272 Find the next line which matches the current search pattern.
274 Find the previous line which matches the current search pattern.
276 Toggle display of whitespace-only changes.
284 Treat file contents as ASCII text even if binary data is detected.
286 Set the number of context lines shown in the diff.
287 By default, 3 lines of context are shown.
288 .It Fl r Ar repository-path
289 Use the repository at the specified path.
290 If not specified, assume the repository is located at or above the current
292 If this directory is a
294 work tree, use the repository path associated with this work tree.
296 Ignore whitespace-only changes.
298 .It Cm blame Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Ar path
299 Display line-by-line history of a file at the specified path.
305 .It Cm Down-arrow, j, Ctrl-n
306 Move the selection cursor down.
307 .It Cm Up-arrow, k, Ctrl-p
308 Move the selection cursor up.
309 .It Cm Right-arrow, l
310 Scroll view to the right. File output moves left on the screen.
312 Scroll view to the left. File output moves right on the screen.
314 Scroll view to the rightmost position.
316 Scroll view left to the start of the line.
317 .It Cm Page-down, Space, Ctrl+f
318 Move the selection cursor down one page.
319 .It Cm Page-up, Ctrl+b
320 Move the selection cursor up one page.
322 Move the selection cursor down one half page.
324 Move the selection cursor up one half page.
326 Move the selection cursor to the first line of the file.
328 Move the selection cursor to the last line of the file.
332 view for the currently selected line's commit.
336 view with the version of the file as found in the currently
337 selected line's commit.
341 view with the version of the file as found in the parent commit of the
342 currently selected line's commit.
346 view with the previously blamed commit.
348 Prompt for a search pattern and start searching for matching lines.
349 The search pattern is an extended regular expression.
350 Regular expression syntax is documented in
353 Find the next line which matches the current search pattern.
355 Find the previous line which matches the current search pattern.
363 Start traversing history at the specified
365 The expected argument is the name of a branch or a commit ID SHA1 hash.
366 An abbreviated hash argument will be expanded to a full SHA1 hash
367 automatically, provided the abbreviation is unique.
368 .It Fl r Ar repository-path
369 Use the repository at the specified path.
370 If not specified, assume the repository is located at or above the current
372 If this directory is a
374 work tree, use the repository path associated with this work tree.
376 .It Cm tree Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Op Ar path
377 Display the repository tree.
380 is specified, show tree entries at this path.
382 Displayed tree entries may carry one of the following trailing annotations:
383 .Bl -column YXZ description
384 .It @ Ta entry is a symbolic link
385 .It / Ta entry is a directory
386 .It * Ta entry is an executable file
387 .It $ Ta entry is a Git submodule
390 Symbolic link entries are also annotated with the target path of the link.
396 .It Cm Down-arrow, j, Ctrl-n
397 Move the selection cursor down.
398 .It Cm Up-arrow, k, Ctrl-p
399 Move the selection cursor up.
400 .It Cm Page-down, Ctrl+f
401 Move the selection cursor down one page.
402 .It Cm Page-up, Ctrl+b
403 Move the selection cursor up one page.
405 Move the selection cursor down one half page.
407 Move the selection cursor up one half page.
409 Move the selection cursor to the first entry.
411 Move the selection cursor to the last entry.
413 Enter the currently selected directory, or switch to the
415 view for the currently selected file.
419 view for the currently selected tree entry.
423 view listing all references in the repository.
424 This can then be used to open a new
426 view for arbitrary branches and tags.
428 Move back to the parent directory.
430 Show object IDs for all objects displayed in the
434 Prompt for a search pattern and start searching for matching tree entries.
435 The search pattern is an extended regular expression which is matched
436 against the tree entry's name.
437 Regular expression syntax is documented in
440 Find the next tree entry which matches the current search pattern.
442 Find the previous tree entry which matches the current search pattern.
450 Start traversing history at the specified
452 The expected argument is the name of a branch or a commit ID SHA1 hash.
453 An abbreviated hash argument will be expanded to a full SHA1 hash
454 automatically, provided the abbreviation is unique.
455 .It Fl r Ar repository-path
456 Use the repository at the specified path.
457 If not specified, assume the repository is located at or above the current
459 If this directory is a
461 work tree, use the repository path associated with this work tree.
463 .It Cm ref Oo Fl r Ar repository-path Oc
464 Display references in the repository.
470 .It Cm Down-arrow, j, Ctrl-n
471 Move the selection cursor down.
472 .It Cm Up-arrow, k, Ctrl-p
473 Move the selection cursor up.
474 .It Cm Page-down, Ctrl+f
475 Move the selection cursor down one page.
476 .It Cm Page-up, Ctrl+b
477 Move the selection cursor up one page.
479 Move the selection cursor down one half page.
481 Move the selection cursor up one half page.
483 Move the selection cursor to the first reference.
485 Move the selection cursor to the last reference.
489 view which begins traversing history at the commit resolved via the
490 currently selected reference.
494 view showing the tree resolved via the currently selected reference.
496 Show object IDs for all non-symbolic references displayed in the
500 Show last modified date of each displayed reference.
502 Toggle display order of references between sort by name and sort by timestamp.
504 Prompt for a search pattern and start searching for matching references.
505 The search pattern is an extended regular expression which is matched
506 against absolute reference names.
507 Regular expression syntax is documented in
510 Find the next reference which matches the current search pattern.
512 Find the previous reference which matches the current search pattern.
514 Reload the list of references displayed by the
523 .It Fl r Ar repository-path
524 Use the repository at the specified path.
525 If not specified, assume the repository is located at or above the current
527 If this directory is a
529 work tree, use the repository path associated with this work tree.
533 .Bl -tag -width TOG_COLORS
536 shows colorized output if this variable is set to a non-empty value.
537 The default color scheme can be modified by setting the environment
538 variables documented below.
539 The colors available in color schemes are
549 which maps to the terminal's default foreground color.
550 .It Ev TOG_COLOR_DIFF_MINUS
551 The color used to mark up removed lines in diffs.
552 If not set, the default value
555 .It Ev TOG_COLOR_DIFF_PLUS
556 The color used to mark up added lines in diffs.
557 If not set, the default value
560 .It Ev TOG_COLOR_DIFF_CHUNK_HEADER
561 The color used to mark up chunk header lines in diffs.
562 If not set, the default value
565 .It Ev TOG_COLOR_DIFF_META
566 The color used to mark up meta data in diffs.
567 If not set, the default value
570 .It Ev TOG_COLOR_TREE_SUBMODULE
571 The color used to mark up submodule tree entries.
572 If not set, the default value
575 .It Ev TOG_COLOR_TREE_SYMLINK
576 The color used to mark up symbolic link tree entries.
577 If not set, the default value
580 .It Ev TOG_COLOR_TREE_DIRECTORY
581 The color used to mark up directory tree entries.
582 If not set, the default value
585 .It Ev TOG_COLOR_TREE_EXECUTABLE
586 The color used to mark up executable file tree entries.
587 If not set, the default value
590 .It Ev TOG_COLOR_COMMIT
591 The color used to mark up commit IDs.
592 If not set, the default value
595 .It Ev TOG_COLOR_AUTHOR
596 The color used to mark up author information.
597 If not set, the default value
600 .It Ev TOG_COLOR_DATE
601 The color used to mark up date information.
602 If not set, the default value
605 .It Ev TOG_COLOR_REFS_HEADS
606 The color used to mark up references in the
609 If not set, the default value
612 .It Ev TOG_COLOR_REFS_TAGS
613 The color used to mark up references in the
616 If not set, the default value
619 .It Ev TOG_COLOR_REFS_REMOTES
620 The color used to mark up references in the
623 If not set, the default value
626 .It Ev TOG_COLOR_REFS_BACKUP
627 The color used to mark up references in the
630 If not set, the default value
638 .Xr git-repository 5 ,
641 .An Stefan Sperling Aq Mt stsp@openbsd.org
642 .An Joshua Stein Aq Mt jcs@openbsd.org