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
29 is an interactive read-only browser for Git repositories.
30 This repository format is described in
31 .Xr git-repository 5 .
34 supports several types of views which display repository data:
37 Displays commits in the repository's history.
38 This view is displayed initially if no
42 Displays changes made in a particular commit.
44 Displays the line-by-line history of a file.
46 Displays the tree corresponding to a particular commit.
50 provides global and command-specific key bindings and options.
51 The global key bindings are:
57 Quit the view which is in focus.
59 Switch focus between views.
61 Toggle fullscreen mode for a split-screen view.
63 will automatically use split-screen views if the size of the terminal
64 window is sufficiently large.
67 Global options must precede the command name, and are as follows:
68 .Bl -tag -width tenletters
70 Display usage information.
72 Display program version and exit immediately.
79 .It Cm log Oo Fl b Oc Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Op Ar path
80 Display history of a repository.
83 is specified, show only commits which modified this path.
85 This command is also executed if no explicit command is specified.
91 .It Cm Down-arrow, j, >, Full stop
92 Move the selection cursor down.
93 .It Cm Up-arrow, k, <, Comma
94 Move the selection cursor up.
95 .It Cm Page-down, Ctrl+f
96 Move the selection cursor down one page.
97 .It Cm Page-up, Ctrl+b
98 Move the selection cursor up one page.
102 view showing file changes made in the currently selected commit.
106 view showing the tree for the currently selected commit.
108 Show log entries for the parent directory of the currently selected path,
109 unless an active search is in progress in which case
113 Prompt for a search pattern and start searching for matching commits.
114 The search pattern is an extended regular expression which is matched
115 against a commit's author name, committer name, log message, and
117 Regular expression syntax is documented in
120 Find the next commit which matches the current search pattern.
121 Searching continues until either a match is found or the
125 Find the previous commit which matches the current search pattern.
126 Searching continues until either a match is found or the
130 Reload the log view with new commits found in the repository.
132 Reload the log view and toggle display of merged commits.
135 option determines whether merged commits are displayed initially.
143 Display individual commits which were merged into the current branch
147 shows the linear history of the current branch only.
150 key binding can be used to toggle display of merged commits at run-time.
152 Start traversing history at the specified
154 The expected argument is the name of a branch or a commit ID SHA1 hash.
155 An abbreviated hash argument will be expanded to a full SHA1 hash
156 automatically, provided the abbreviation is unique.
157 If this option is not specified, default to the work tree's current branch
158 if invoked in a work tree, or to the repository's HEAD reference.
159 .It Fl r Ar repository-path
160 Use the repository at the specified path.
161 If not specified, assume the repository is located at or above the current
164 .It Cm diff Oo Ar repository-path Oc Ar object1 object2
165 Display the differences between two objects in the repository.
168 argument is an object ID SHA1 hash.
169 An abbreviated hash argument will be expanded to a full SHA1 hash
170 automatically, provided the abbreviation is unique.
171 Both objects must be of the same type (blobs, trees, or commits).
174 is omitted, use the current working directory.
184 .It Cm Page-down, Space, Ctrl+f
185 Scroll down one page.
186 .It Cm Page-up, Ctrl+b
189 Reduce the amount of diff context lines.
191 Increase the amount of diff context lines.
193 If the diff view was opened via the log view, move to the previous (younger)
196 If the diff view was opened via the log view, move to the next (older) commit.
198 Prompt for a search pattern and start searching for matching line.
199 The search pattern is an extended regular expression.
200 Regular expression syntax is documented in
203 Find the next line which matches the current search pattern.
205 Find the previous line which matches the current search pattern.
207 .It Cm blame Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Ar path
208 Display line-by-line history of a file at the specified path.
214 .It Cm Down-arrow, j, Page-down, Space
215 Move the selection cursor down.
216 .It Cm Up-arrow, k, Page-up
217 Move the selection cursor up.
221 view for the currently selected line's commit.
225 view with the version of the file as found in the currently
226 selected line's commit.
230 view with the version of the file as found in the parent commit of the
231 currently selected line's commit.
235 view with the previously blamed commit.
237 Prompt for a search pattern and start searching for matching line.
238 The search pattern is an extended regular expression.
239 Regular expression syntax is documented in
242 Find the next line which matches the current search pattern.
244 Find the previous line which matches the current search pattern.
252 Start traversing history at the specified
254 The expected argument is the name of a branch or a commit ID SHA1 hash.
255 An abbreviated hash argument will be expanded to a full SHA1 hash
256 automatically, provided the abbreviation is unique.
257 .It Fl r Ar repository-path
258 Use the repository at the specified path.
259 If not specified, assume the repository is located at or above the current
262 .It Cm tree Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc
263 Display the repository tree.
265 Displayed tree entries may carry one of the following trailing annotations:
266 .Bl -column YXZ description
267 .It @ Ta entry is a symbolic link
268 .It / Ta entry is a directory
269 .It * Ta entry is an executable file
270 .It $ Ta entry is a Git submodule
277 .It Cm Down-arrow, j, Page-down
278 Move the selection cursor down.
279 .It Cm Up-arrow, k, Page-up
280 Move the selection cursor up.
282 Enter the currently selected directory, or switch to the
284 view for the currently selected file.
288 view for the currently selected tree entry.
290 Move back to the parent directory.
292 Show object IDs for all objects displayed in the
296 Prompt for a search pattern and start searching for matching tree entries.
297 The search pattern is an extended regular expression which is matched
298 against the tree entry's name.
299 Regular expression syntax is documented in
302 Find the next tree entry which matches the current search pattern.
304 Find the previous tree entry which matches the current search pattern.
312 Start traversing history at the specified
314 The expected argument is the name of a branch or a commit ID SHA1 hash.
315 An abbreviated hash argument will be expanded to a full SHA1 hash
316 automatically, provided the abbreviation is unique.
317 .It Fl r Ar repository-path
318 Use the repository at the specified path.
319 If not specified, assume the repository is located at or above the current
321 If this directory is a
323 work tree, use the repository path associated with this work tree.
327 .Bl -tag -width TOG_COLORS
330 shows colorized output if this variable is set to a non-empty value.
331 The default color scheme can be modified by setting the environment
332 variables documented below.
333 The colors available in color schemes are
343 which maps to the terminal's default foreground color.
344 .It Ev TOG_COLOR_DIFF_MINUS
345 The color used to mark up removed lines in diffs.
346 If not set, the default value
349 .It Ev TOG_COLOR_DIFF_PLUS
350 The color used to mark up added lines in diffs.
351 If not set, the default value
354 .It Ev TOG_COLOR_DIFF_CHUNK_HEADER
355 The color used to mark up chunk header lines in diffs.
356 If not set, the default value
359 .It Ev TOG_COLOR_DIFF_META
360 The color used to mark up meta data in diffs.
361 If not set, the default value
364 .It Ev TOG_COLOR_TREE_SUBMODULE
365 The color used to mark up sobmodules tree entries.
366 If not set, the default value
369 .It Ev TOG_COLOR_TREE_SYMLINK
370 The color used to mark up symbolic link tree entries.
371 If not set, the default value
374 .It Ev TOG_COLOR_TREE_DIRECTORY
375 The color used to mark up directory tree entries.
376 If not set, the default value
379 .It Ev TOG_COLOR_TREE_EXECUTABLE
380 The color used to mark up executable file tree entries.
381 If not set, the default value
384 .It Ev TOG_COLOR_COMMIT
385 The color used to mark up commit IDs.
386 If not set, the default value
389 .It Ev TOG_COLOR_AUTHOR
390 The color used to mark up author information.
391 If not set, the default value
394 .It Ev TOG_COLOR_DATE
395 The color used to mark up date information.
396 If not set, the default value
404 .Xr git-repository 5 ,
407 .An Stefan Sperling Aq Mt stsp@openbsd.org
408 .An Joshua Stein Aq Mt jcs@openbsd.org