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
33 is an interactive read-only browser for Git repositories.
34 This repository format is described in
35 .Xr git-repository 5 .
38 supports several types of views which display repository data:
41 Displays commits in the repository's history.
42 This view is displayed initially if no
44 is specified, or if just a
48 Displays changes made in a particular commit.
50 Displays the line-by-line history of a file.
52 Displays the tree corresponding to a particular commit.
56 provides global and command-specific key bindings and options.
57 The global key bindings are:
63 Quit the view which is in focus.
65 Switch focus between views.
67 Toggle fullscreen mode for a split-screen view.
69 will automatically use split-screen views if the size of the terminal
70 window is sufficiently large.
73 Global options must precede the command name, and are as follows:
74 .Bl -tag -width tenletters
76 Display usage information.
78 Display program version and exit immediately.
85 .It Cm log Oo Fl b Oc Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Op Ar path
86 Display history of a repository.
89 is specified, show only commits which modified this path.
90 If invoked in a work tree, the
92 is interpreted relative to the current working directory,
93 and the work tree's path prefix is implicitly prepended.
94 Otherwise, the path is interpreted relative to the repository root.
96 This command is also executed if no explicit command is specified.
102 .It Cm Down-arrow, j, >, Full stop
103 Move the selection cursor down.
104 .It Cm Up-arrow, k, <, Comma
105 Move the selection cursor up.
106 .It Cm Page-down, Ctrl+f
107 Move the selection cursor down one page.
108 .It Cm Page-up, Ctrl+b
109 Move the selection cursor up one page.
113 view showing file changes made in the currently selected commit.
117 view showing the tree for the currently selected commit.
119 Show log entries for the parent directory of the currently selected path,
120 unless an active search is in progress in which case
124 Prompt for a search pattern and start searching for matching commits.
125 The search pattern is an extended regular expression which is matched
126 against a commit's author name, committer name, log message, and
128 Regular expression syntax is documented in
131 Find the next commit which matches the current search pattern.
132 Searching continues until either a match is found or the
136 Find the previous commit which matches the current search pattern.
137 Searching continues until either a match is found or the
141 Reload the log view with new commits found in the repository.
143 Reload the log view and toggle display of merged commits.
146 option determines whether merged commits are displayed initially.
154 Display individual commits which were merged into the current branch
158 shows the linear history of the current branch only.
161 key binding can be used to toggle display of merged commits at run-time.
163 Start traversing history at the specified
165 The expected argument is the name of a branch or a commit ID SHA1 hash.
166 An abbreviated hash argument will be expanded to a full SHA1 hash
167 automatically, provided the abbreviation is unique.
168 If this option is not specified, default to the work tree's current branch
169 if invoked in a work tree, or to the repository's HEAD reference.
170 .It Fl r Ar repository-path
171 Use the repository at the specified path.
172 If not specified, assume the repository is located at or above the current
174 If this directory is a
176 work tree, use the repository path associated with this work tree.
178 .It Cm diff Oo Fl r Ar repository-path Oc Ar object1 object2
179 Display the differences between two objects in the repository.
182 argument is an object ID SHA1 hash.
183 An abbreviated hash argument will be expanded to a full SHA1 hash
184 automatically, provided the abbreviation is unique.
185 Both objects must be of the same type (blobs, trees, or commits).
195 .It Cm Page-down, Space, Ctrl+f
196 Scroll down one page.
197 .It Cm Page-up, Ctrl+b
200 Reduce the amount of diff context lines.
202 Increase the amount of diff context lines.
204 If the diff view was opened via the log view, move to the previous (younger)
207 If the diff view was opened via the log view, move to the next (older) commit.
209 Prompt for a search pattern and start searching for matching line.
210 The search pattern is an extended regular expression.
211 Regular expression syntax is documented in
214 Find the next line which matches the current search pattern.
216 Find the previous line which matches the current search pattern.
223 .It Fl r Ar repository-path
224 Use the repository at the specified path.
225 If not specified, assume the repository is located at or above the current
227 If this directory is a
229 work tree, use the repository path associated with this work tree.
231 .It Cm blame Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Ar path
232 Display line-by-line history of a file at the specified path.
239 Move the selection cursor down.
241 Move the selection cursor up.
242 .It Cm Page-down, Space, Ctrl+f
243 Move the selection cursor down one page.
244 .It Cm Page-up, Ctrl+b
245 Move the selection cursor up one page.
249 view for the currently selected line's commit.
253 view with the version of the file as found in the currently
254 selected line's commit.
258 view with the version of the file as found in the parent commit of the
259 currently selected line's commit.
263 view with the previously blamed commit.
265 Prompt for a search pattern and start searching for matching line.
266 The search pattern is an extended regular expression.
267 Regular expression syntax is documented in
270 Find the next line which matches the current search pattern.
272 Find the previous line which matches the current search pattern.
280 Start traversing history at the specified
282 The expected argument is the name of a branch or a commit ID SHA1 hash.
283 An abbreviated hash argument will be expanded to a full SHA1 hash
284 automatically, provided the abbreviation is unique.
285 .It Fl r Ar repository-path
286 Use the repository at the specified path.
287 If not specified, assume the repository is located at or above the current
289 If this directory is a
291 work tree, use the repository path associated with this work tree.
293 .It Cm tree Oo Fl c Ar commit Oc Oo Fl r Ar repository-path Oc Op Ar path
294 Display the repository tree.
297 is specified, show tree entries at this path.
299 Displayed tree entries may carry one of the following trailing annotations:
300 .Bl -column YXZ description
301 .It @ Ta entry is a symbolic link
302 .It / Ta entry is a directory
303 .It * Ta entry is an executable file
304 .It $ Ta entry is a Git submodule
307 Symbolic link entries are also annotated with the target path of the link.
314 Move the selection cursor down.
316 Move the selection cursor up.
317 .It Cm Page-down, 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 Enter the currently selected directory, or switch to the
324 view for the currently selected file.
328 view for the currently selected tree entry.
330 Move back to the parent directory.
332 Show object IDs for all objects displayed in the
336 Prompt for a search pattern and start searching for matching tree entries.
337 The search pattern is an extended regular expression which is matched
338 against the tree entry's name.
339 Regular expression syntax is documented in
342 Find the next tree entry which matches the current search pattern.
344 Find the previous tree entry which matches the current search pattern.
352 Start traversing history at the specified
354 The expected argument is the name of a branch or a commit ID SHA1 hash.
355 An abbreviated hash argument will be expanded to a full SHA1 hash
356 automatically, provided the abbreviation is unique.
357 .It Fl r Ar repository-path
358 Use the repository at the specified path.
359 If not specified, assume the repository is located at or above the current
361 If this directory is a
363 work tree, use the repository path associated with this work tree.
367 .Bl -tag -width TOG_COLORS
370 shows colorized output if this variable is set to a non-empty value.
371 The default color scheme can be modified by setting the environment
372 variables documented below.
373 The colors available in color schemes are
383 which maps to the terminal's default foreground color.
384 .It Ev TOG_COLOR_DIFF_MINUS
385 The color used to mark up removed lines in diffs.
386 If not set, the default value
389 .It Ev TOG_COLOR_DIFF_PLUS
390 The color used to mark up added lines in diffs.
391 If not set, the default value
394 .It Ev TOG_COLOR_DIFF_CHUNK_HEADER
395 The color used to mark up chunk header lines in diffs.
396 If not set, the default value
399 .It Ev TOG_COLOR_DIFF_META
400 The color used to mark up meta data in diffs.
401 If not set, the default value
404 .It Ev TOG_COLOR_TREE_SUBMODULE
405 The color used to mark up sobmodules tree entries.
406 If not set, the default value
409 .It Ev TOG_COLOR_TREE_SYMLINK
410 The color used to mark up symbolic link tree entries.
411 If not set, the default value
414 .It Ev TOG_COLOR_TREE_DIRECTORY
415 The color used to mark up directory tree entries.
416 If not set, the default value
419 .It Ev TOG_COLOR_TREE_EXECUTABLE
420 The color used to mark up executable file tree entries.
421 If not set, the default value
424 .It Ev TOG_COLOR_COMMIT
425 The color used to mark up commit IDs.
426 If not set, the default value
429 .It Ev TOG_COLOR_AUTHOR
430 The color used to mark up author information.
431 If not set, the default value
434 .It Ev TOG_COLOR_DATE
435 The color used to mark up date information.
436 If not set, the default value
444 .Xr git-repository 5 ,
447 .An Stefan Sperling Aq Mt stsp@openbsd.org
448 .An Joshua Stein Aq Mt jcs@openbsd.org