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 Page-down, Ctrl+f
108 Move the selection cursor down one page.
109 .It Cm Page-up, Ctrl+b
110 Move the selection cursor up one page.
112 Move the cursor to the newest commit.
114 Move the cursor to the oldest commit.
115 This will traverse all commits on the current branch which may take
116 a long time depending on the number of commits in branch history.
117 If needed, this operation can be cancelled with
122 view showing file changes made in the currently selected commit.
126 view showing the tree for the currently selected commit.
128 Show log entries for the parent directory of the currently selected path.
129 However when an active search is in progress or when additional commits
132 aborts the running operation.
134 Prompt for a search pattern and start searching for matching commits.
135 The search pattern is an extended regular expression which is matched
136 against a commit's author name, committer name, log message, and
138 Regular expression syntax is documented in
141 Find the next commit which matches the current search pattern.
142 Searching continues until either a match is found or the
146 Find the previous commit which matches the current search pattern.
147 Searching continues until either a match is found or the
153 view with new commits found in the repository.
157 view and toggle display of merged commits.
160 option determines whether merged commits are displayed initially.
164 view listing all references in the repository.
165 This can then be used to open a new
167 view for arbitrary branches and tags.
175 Display individual commits which were merged into the current branch
179 shows the linear history of the current branch only.
182 key binding can be used to toggle display of merged commits at run-time.
184 Start traversing history at the specified
186 The expected argument is the name of a branch or a commit ID SHA1 hash.
187 An abbreviated hash argument will be expanded to a full SHA1 hash
188 automatically, provided the abbreviation is unique.
189 If this option is not specified, default to the work tree's current branch
190 if invoked in a work tree, or to the repository's HEAD reference.
191 .It Fl r Ar repository-path
192 Use the repository at the specified path.
193 If not specified, assume the repository is located at or above the current
195 If this directory is a
197 work tree, use the repository path associated with this work tree.
199 .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
200 Display the differences between two objects in the repository.
201 Treat each of the two arguments as a reference, a tag name, or an object
202 ID SHA1 hash, and display differences between the corresponding objects.
203 Both objects must be of the same type (blobs, trees, or commits).
204 An abbreviated hash argument will be expanded to a full SHA1 hash
205 automatically, provided the abbreviation is unique.
212 Toggle treatment of file contents as ASCII text even if binary data was
214 .It Cm Down-arrow, j, Ctrl-n
216 .It Cm Up-arrow, k, Ctrl-p
218 .It Cm Page-down, Space, Ctrl+f
219 Scroll down one page.
220 .It Cm Page-up, Ctrl+b
223 Scroll to the top of the view.
225 Scroll to the bottom of the view.
227 Reduce the amount of diff context lines.
229 Increase the amount of diff context lines.
233 view was opened via the
235 view, move to the previous (younger) commit.
239 view was opened via the
241 view, move to the next (older) commit.
243 Prompt for a search pattern and start searching for matching lines.
244 The search pattern is an extended regular expression.
245 Regular expression syntax is documented in
248 Find the next line which matches the current search pattern.
250 Find the previous line which matches the current search pattern.
252 Toggle display of whitespace-only changes.
260 Treat file contents as ASCII text even if binary data is detected.
262 Set the number of context lines shown in the diff.
263 By default, 3 lines of context are shown.
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.
272 Ignore whitespace-only changes.
274 .It Cm blame Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Ar path
275 Display line-by-line history of a file at the specified path.
281 .It Cm Down-arrow, j, Ctrl-n
282 Move the selection cursor down.
283 .It Cm Up-arrow, k, Ctrl-p
284 Move the selection cursor up.
285 .It Cm Page-down, Space, Ctrl+f
286 Move the selection cursor down one page.
287 .It Cm Page-up, Ctrl+b
288 Move the selection cursor up one page.
290 Move the selection cursor to the first line of the file.
292 Move the selection cursor to the last line of the file.
296 view for the currently selected line's commit.
300 view with the version of the file as found in the currently
301 selected line's commit.
305 view with the version of the file as found in the parent commit of the
306 currently selected line's commit.
310 view with the previously blamed commit.
312 Prompt for a search pattern and start searching for matching lines.
313 The search pattern is an extended regular expression.
314 Regular expression syntax is documented in
317 Find the next line which matches the current search pattern.
319 Find the previous line which matches the current search pattern.
327 Start traversing history at the specified
329 The expected argument is the name of a branch or a commit ID SHA1 hash.
330 An abbreviated hash argument will be expanded to a full SHA1 hash
331 automatically, provided the abbreviation is unique.
332 .It Fl r Ar repository-path
333 Use the repository at the specified path.
334 If not specified, assume the repository is located at or above the current
336 If this directory is a
338 work tree, use the repository path associated with this work tree.
340 .It Cm tree Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Op Ar path
341 Display the repository tree.
344 is specified, show tree entries at this path.
346 Displayed tree entries may carry one of the following trailing annotations:
347 .Bl -column YXZ description
348 .It @ Ta entry is a symbolic link
349 .It / Ta entry is a directory
350 .It * Ta entry is an executable file
351 .It $ Ta entry is a Git submodule
354 Symbolic link entries are also annotated with the target path of the link.
360 .It Cm Down-arrow, j, Ctrl-n
361 Move the selection cursor down.
362 .It Cm Up-arrow, k, Ctrl-p
363 Move the selection cursor up.
364 .It Cm Page-down, Ctrl+f
365 Move the selection cursor down one page.
366 .It Cm Page-up, Ctrl+b
367 Move the selection cursor up one page.
369 Move the selection cursor to the first entry.
371 Move the selection cursor to the last entry.
373 Enter the currently selected directory, or switch to the
375 view for the currently selected file.
379 view for the currently selected tree entry.
383 view listing all references in the repository.
384 This can then be used to open a new
386 view for arbitrary branches and tags.
388 Move back to the parent directory.
390 Show object IDs for all objects displayed in the
394 Prompt for a search pattern and start searching for matching tree entries.
395 The search pattern is an extended regular expression which is matched
396 against the tree entry's name.
397 Regular expression syntax is documented in
400 Find the next tree entry which matches the current search pattern.
402 Find the previous tree entry which matches the current search pattern.
410 Start traversing history at the specified
412 The expected argument is the name of a branch or a commit ID SHA1 hash.
413 An abbreviated hash argument will be expanded to a full SHA1 hash
414 automatically, provided the abbreviation is unique.
415 .It Fl r Ar repository-path
416 Use the repository at the specified path.
417 If not specified, assume the repository is located at or above the current
419 If this directory is a
421 work tree, use the repository path associated with this work tree.
423 .It Cm ref Oo Fl r Ar repository-path Oc
424 Display references in the repository.
430 .It Cm Down-arrow, j, Ctrl-n
431 Move the selection cursor down.
432 .It Cm Up-arrow, k, Ctrl-p
433 Move the selection cursor up.
434 .It Cm Page-down, Ctrl+f
435 Move the selection cursor down one page.
436 .It Cm Page-up, Ctrl+b
437 Move the selection cursor up one page.
439 Move the selection cursor to the first reference.
441 Move the selection cursor to the last reference.
445 view which begins traversing history at the commit resolved via the
446 currently selected reference.
450 view showing the tree resolved via the currently selected reference.
452 Show object IDs for all non-symbolic references displayed in the
456 Toggle display order of references between sort by name and sort by timestamp.
458 Prompt for a search pattern and start searching for matching references.
459 The search pattern is an extended regular expression which is matched
460 against absolute reference names.
461 Regular expression syntax is documented in
464 Find the next reference which matches the current search pattern.
466 Find the previous reference which matches the current search pattern.
468 Reload the list of references displayed by the
477 .It Fl r Ar repository-path
478 Use the repository at the specified path.
479 If not specified, assume the repository is located at or above the current
481 If this directory is a
483 work tree, use the repository path associated with this work tree.
487 .Bl -tag -width TOG_COLORS
490 shows colorized output if this variable is set to a non-empty value.
491 The default color scheme can be modified by setting the environment
492 variables documented below.
493 The colors available in color schemes are
503 which maps to the terminal's default foreground color.
504 .It Ev TOG_COLOR_DIFF_MINUS
505 The color used to mark up removed lines in diffs.
506 If not set, the default value
509 .It Ev TOG_COLOR_DIFF_PLUS
510 The color used to mark up added lines in diffs.
511 If not set, the default value
514 .It Ev TOG_COLOR_DIFF_CHUNK_HEADER
515 The color used to mark up chunk header lines in diffs.
516 If not set, the default value
519 .It Ev TOG_COLOR_DIFF_META
520 The color used to mark up meta data in diffs.
521 If not set, the default value
524 .It Ev TOG_COLOR_TREE_SUBMODULE
525 The color used to mark up submodule tree entries.
526 If not set, the default value
529 .It Ev TOG_COLOR_TREE_SYMLINK
530 The color used to mark up symbolic link tree entries.
531 If not set, the default value
534 .It Ev TOG_COLOR_TREE_DIRECTORY
535 The color used to mark up directory tree entries.
536 If not set, the default value
539 .It Ev TOG_COLOR_TREE_EXECUTABLE
540 The color used to mark up executable file tree entries.
541 If not set, the default value
544 .It Ev TOG_COLOR_COMMIT
545 The color used to mark up commit IDs.
546 If not set, the default value
549 .It Ev TOG_COLOR_AUTHOR
550 The color used to mark up author information.
551 If not set, the default value
554 .It Ev TOG_COLOR_DATE
555 The color used to mark up date information.
556 If not set, the default value
559 .It Ev TOG_COLOR_REFS_HEADS
560 The color used to mark up references in the
563 If not set, the default value
566 .It Ev TOG_COLOR_REFS_TAGS
567 The color used to mark up references in the
570 If not set, the default value
573 .It Ev TOG_COLOR_REFS_REMOTES
574 The color used to mark up references in the
577 If not set, the default value
580 .It Ev TOG_COLOR_REFS_BACKUP
581 The color used to mark up references in the
584 If not set, the default value
592 .Xr git-repository 5 ,
595 .An Stefan Sperling Aq Mt stsp@openbsd.org
596 .An Joshua Stein Aq Mt jcs@openbsd.org