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
104 Move the selection cursor down.
105 .It Cm Up-arrow, k, <, Comma
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.
111 .It Cm Home, g, Ctrl-u
112 Move the cursor to the newest commit.
114 Move the cursor to the oldest commit.
115 This will iterate over all commit objects in the repository and may take
116 a long time depending on the size of the repository.
120 view showing file changes made in the currently selected commit.
124 view showing the tree for the currently selected commit.
126 Show log entries for the parent directory of the currently selected path,
127 unless an active search is in progress in which case
131 Prompt for a search pattern and start searching for matching commits.
132 The search pattern is an extended regular expression which is matched
133 against a commit's author name, committer name, log message, and
135 Regular expression syntax is documented in
138 Find the next commit which matches the current search pattern.
139 Searching continues until either a match is found or the
143 Find the previous commit which matches the current search pattern.
144 Searching continues until either a match is found or the
150 view with new commits found in the repository.
154 view and toggle display of merged commits.
157 option determines whether merged commits are displayed initially.
161 view listing all references in the repository.
162 This can then be used to open a new
164 view for arbitrary branches and tags.
172 Display individual commits which were merged into the current branch
176 shows the linear history of the current branch only.
179 key binding can be used to toggle display of merged commits at run-time.
181 Start traversing history at the specified
183 The expected argument is the name of a branch or a commit ID SHA1 hash.
184 An abbreviated hash argument will be expanded to a full SHA1 hash
185 automatically, provided the abbreviation is unique.
186 If this option is not specified, default to the work tree's current branch
187 if invoked in a work tree, or to the repository's HEAD reference.
188 .It Fl r Ar repository-path
189 Use the repository at the specified path.
190 If not specified, assume the repository is located at or above the current
192 If this directory is a
194 work tree, use the repository path associated with this work tree.
196 .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
197 Display the differences between two objects in the repository.
198 Treat each of the two arguments as a reference, a tag name, or an object
199 ID SHA1 hash, and display differences between the corresponding objects.
200 Both objects must be of the same type (blobs, trees, or commits).
201 An abbreviated hash argument will be expanded to a full SHA1 hash
202 automatically, provided the abbreviation is unique.
209 Toggle treatment of file contents as ASCII text even if binary data was
215 .It Cm Page-down, Space, Ctrl+f
216 Scroll down one page.
217 .It Cm Page-up, Ctrl+b
219 .It Cm Home, g, Ctrl-u
220 Scroll to the top of the view.
222 Scroll to the bottom of the view.
224 Reduce the amount of diff context lines.
226 Increase the amount of diff context lines.
230 view was opened via the
232 view, move to the previous (younger) commit.
236 view was opened via the
238 view, move to the next (older) commit.
240 Prompt for a search pattern and start searching for matching lines.
241 The search pattern is an extended regular expression.
242 Regular expression syntax is documented in
245 Find the next line which matches the current search pattern.
247 Find the previous line which matches the current search pattern.
249 Toggle display of whitespace-only changes.
257 Treat file contents as ASCII text even if binary data is detected.
259 Set the number of context lines shown in the diff.
260 By default, 3 lines of context are shown.
261 .It Fl r Ar repository-path
262 Use the repository at the specified path.
263 If not specified, assume the repository is located at or above the current
265 If this directory is a
267 work tree, use the repository path associated with this work tree.
269 Ignore whitespace-only changes.
271 .It Cm blame Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Ar path
272 Display line-by-line history of a file at the specified path.
279 Move the selection cursor down.
281 Move the selection cursor up.
282 .It Cm Page-down, Space, Ctrl+f
283 Move the selection cursor down one page.
284 .It Cm Page-up, Ctrl+b
285 Move the selection cursor up one page.
289 view for the currently selected line's commit.
293 view with the version of the file as found in the currently
294 selected line's commit.
298 view with the version of the file as found in the parent commit of the
299 currently selected line's commit.
303 view with the previously blamed commit.
305 Prompt for a search pattern and start searching for matching lines.
306 The search pattern is an extended regular expression.
307 Regular expression syntax is documented in
310 Find the next line which matches the current search pattern.
312 Find the previous line which matches the current search pattern.
320 Start traversing history at the specified
322 The expected argument is the name of a branch or a commit ID SHA1 hash.
323 An abbreviated hash argument will be expanded to a full SHA1 hash
324 automatically, provided the abbreviation is unique.
325 .It Fl r Ar repository-path
326 Use the repository at the specified path.
327 If not specified, assume the repository is located at or above the current
329 If this directory is a
331 work tree, use the repository path associated with this work tree.
333 .It Cm tree Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Op Ar path
334 Display the repository tree.
337 is specified, show tree entries at this path.
339 Displayed tree entries may carry one of the following trailing annotations:
340 .Bl -column YXZ description
341 .It @ Ta entry is a symbolic link
342 .It / Ta entry is a directory
343 .It * Ta entry is an executable file
344 .It $ Ta entry is a Git submodule
347 Symbolic link entries are also annotated with the target path of the link.
354 Move the selection cursor down.
356 Move the selection cursor up.
357 .It Cm Page-down, Ctrl+f
358 Move the selection cursor down one page.
359 .It Cm Page-up, Ctrl+b
360 Move the selection cursor up one page.
362 Enter the currently selected directory, or switch to the
364 view for the currently selected file.
368 view for the currently selected tree entry.
372 view listing all references in the repository.
373 This can then be used to open a new
375 view for arbitrary branches and tags.
377 Move back to the parent directory.
379 Show object IDs for all objects displayed in the
383 Prompt for a search pattern and start searching for matching tree entries.
384 The search pattern is an extended regular expression which is matched
385 against the tree entry's name.
386 Regular expression syntax is documented in
389 Find the next tree entry which matches the current search pattern.
391 Find the previous tree entry which matches the current search pattern.
399 Start traversing history at the specified
401 The expected argument is the name of a branch or a commit ID SHA1 hash.
402 An abbreviated hash argument will be expanded to a full SHA1 hash
403 automatically, provided the abbreviation is unique.
404 .It Fl r Ar repository-path
405 Use the repository at the specified path.
406 If not specified, assume the repository is located at or above the current
408 If this directory is a
410 work tree, use the repository path associated with this work tree.
412 .It Cm ref Oo Fl r Ar repository-path Oc
413 Display references in the repository.
420 Move the selection cursor down.
422 Move the selection cursor up.
423 .It Cm Page-down, Ctrl+f
424 Move the selection cursor down one page.
425 .It Cm Page-up, Ctrl+b
426 Move the selection cursor up one page.
430 view which begins traversing history at the commit resolved via the
431 currently selected reference.
435 view showing the tree resolved via the currently selected reference.
437 Show object IDs for all non-symbolic references displayed in the
441 Prompt for a search pattern and start searching for matching references.
442 The search pattern is an extended regular expression which is matched
443 against absolute reference names.
444 Regular expression syntax is documented in
447 Find the next reference which matches the current search pattern.
449 Find the previous reference which matches the current search pattern.
451 Reload the list of references displayed by the
460 .It Fl r Ar repository-path
461 Use the repository at the specified path.
462 If not specified, assume the repository is located at or above the current
464 If this directory is a
466 work tree, use the repository path associated with this work tree.
470 .Bl -tag -width TOG_COLORS
473 shows colorized output if this variable is set to a non-empty value.
474 The default color scheme can be modified by setting the environment
475 variables documented below.
476 The colors available in color schemes are
486 which maps to the terminal's default foreground color.
487 .It Ev TOG_COLOR_DIFF_MINUS
488 The color used to mark up removed lines in diffs.
489 If not set, the default value
492 .It Ev TOG_COLOR_DIFF_PLUS
493 The color used to mark up added lines in diffs.
494 If not set, the default value
497 .It Ev TOG_COLOR_DIFF_CHUNK_HEADER
498 The color used to mark up chunk header lines in diffs.
499 If not set, the default value
502 .It Ev TOG_COLOR_DIFF_META
503 The color used to mark up meta data in diffs.
504 If not set, the default value
507 .It Ev TOG_COLOR_TREE_SUBMODULE
508 The color used to mark up submodule tree entries.
509 If not set, the default value
512 .It Ev TOG_COLOR_TREE_SYMLINK
513 The color used to mark up symbolic link tree entries.
514 If not set, the default value
517 .It Ev TOG_COLOR_TREE_DIRECTORY
518 The color used to mark up directory tree entries.
519 If not set, the default value
522 .It Ev TOG_COLOR_TREE_EXECUTABLE
523 The color used to mark up executable file tree entries.
524 If not set, the default value
527 .It Ev TOG_COLOR_COMMIT
528 The color used to mark up commit IDs.
529 If not set, the default value
532 .It Ev TOG_COLOR_AUTHOR
533 The color used to mark up author information.
534 If not set, the default value
537 .It Ev TOG_COLOR_DATE
538 The color used to mark up date information.
539 If not set, the default value
542 .It Ev TOG_COLOR_REFS_HEADS
543 The color used to mark up references in the
546 If not set, the default value
549 .It Ev TOG_COLOR_REFS_TAGS
550 The color used to mark up references in the
553 If not set, the default value
556 .It Ev TOG_COLOR_REFS_REMOTES
557 The color used to mark up references in the
560 If not set, the default value
568 .Xr git-repository 5 ,
571 .An Stefan Sperling Aq Mt stsp@openbsd.org
572 .An Joshua Stein Aq Mt jcs@openbsd.org