GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
TOG(1) FreeBSD General Commands Manual TOG(1)

tog
Git repository browser

tog [command] [-h] [arg ...]


tog path

tog is an interactive read-only browser for Git repositories. This repository format is described in git-repository(5).

tog supports several types of views which display repository data:

Log view
Displays commits in the repository's history. This view is displayed initially if no command is specified, or if just a path is specified.
Diff view
Displays changes made in a particular commit.
Blame view
Displays the line-by-line history of a file.
Tree view
Displays the tree corresponding to a particular commit.
Ref view
Displays references in the repository.

tog provides global and command-specific key bindings and options. The global key bindings are:

Quit tog.
Quit the view which is in focus.
Switch focus between views.
Toggle fullscreen mode for a split-screen view. tog will automatically use split-screen views if the size of the terminal window is sufficiently large.

Global options must precede the command name, and are as follows:

Display usage information.
, --version
Display program version and exit immediately.

The commands for tog are as follows:

[-b] [-c commit] [-r repository-path] [path]
Display history of a repository. If a path is specified, show only commits which modified this path. If invoked in a work tree, the path is interpreted relative to the current working directory, and the work tree's path prefix is implicitly prepended. Otherwise, the path is interpreted relative to the repository root.

This command is also executed if no explicit command is specified.

The key bindings for tog log are as follows:

Move the selection cursor down.
Move the selection cursor up.
Move the selection cursor down one page.
Move the selection cursor up one page.
Move the cursor to the newest commit.
Move the cursor to the oldest commit. This will traverse all commits on the current branch which may take a long time depending on the number of commits in branch history. If needed, this operation can be cancelled with Backspace.
Open a diff view showing file changes made in the currently selected commit.
Open a tree view showing the tree for the currently selected commit.
Show log entries for the parent directory of the currently selected path. However when an active search is in progress or when additional commits are loaded, Backspace aborts the running operation.
Prompt for a search pattern and start searching for matching commits. The search pattern is an extended regular expression which is matched against a commit's author name, committer name, log message, and commit ID SHA1 hash. Regular expression syntax is documented in re_format(7).
Find the next commit which matches the current search pattern. Searching continues until either a match is found or the Backspace key is pressed.
Find the previous commit which matches the current search pattern. Searching continues until either a match is found or the Backspace key is pressed.
Reload the log view with new commits found in the repository.
Reload the log view and toggle display of merged commits. The -b option determines whether merged commits are displayed initially.
Open a ref view listing all references in the repository. This can then be used to open a new log view for arbitrary branches and tags.

The options for tog log are as follows:

Display individual commits which were merged into the current branch from other branches. By default, tog log shows the linear history of the current branch only. The B key binding can be used to toggle display of merged commits at run-time.
commit
Start traversing history at the specified commit. The expected argument is the name of a branch or a commit ID SHA1 hash. An abbreviated hash argument will be expanded to a full SHA1 hash automatically, provided the abbreviation is unique. If this option is not specified, default to the work tree's current branch if invoked in a work tree, or to the repository's HEAD reference.
repository-path
Use the repository at the specified path. If not specified, assume the repository is located at or above the current working directory. If this directory is a got(1) work tree, use the repository path associated with this work tree.
[-a] [-C number] [-r repository-path] [-w] object1 object2
Display the differences between two objects in the repository. Treat each of the two arguments as a reference, a tag name, or an object ID SHA1 hash, and display differences between the corresponding objects. Both objects must be of the same type (blobs, trees, or commits). An abbreviated hash argument will be expanded to a full SHA1 hash automatically, provided the abbreviation is unique.

The key bindings for tog diff are as follows:

Toggle treatment of file contents as ASCII text even if binary data was detected.
Scroll down.
Scroll up.
Scroll down one page.
Scroll up one page.
Scroll to the top of the view.
Scroll to the bottom of the view.
Reduce the amount of diff context lines.
Increase the amount of diff context lines.
If the diff view was opened via the log view, move to the previous (younger) commit.
If the diff view was opened via the log view, move to the next (older) commit.
Prompt for a search pattern and start searching for matching lines. The search pattern is an extended regular expression. Regular expression syntax is documented in re_format(7).
Find the next line which matches the current search pattern.
Find the previous line which matches the current search pattern.
Toggle display of whitespace-only changes.

The options for tog diff are as follows:

Treat file contents as ASCII text even if binary data is detected.
number
Set the number of context lines shown in the diff. By default, 3 lines of context are shown.
repository-path
Use the repository at the specified path. If not specified, assume the repository is located at or above the current working directory. If this directory is a got(1) work tree, use the repository path associated with this work tree.
Ignore whitespace-only changes.
[-c commit] [-r repository-path] path
Display line-by-line history of a file at the specified path.

The key bindings for tog blame are as follows:

Move the selection cursor down.
Move the selection cursor up.
Move the selection cursor down one page.
Move the selection cursor up one page.
Move the selection cursor to the first line of the file.
Move the selection cursor to the last line of the file.
Open a diff view for the currently selected line's commit.
Reload the blame view with the version of the file as found in the currently selected line's commit.
Reload the blame view with the version of the file as found in the parent commit of the currently selected line's commit.
Reload the blame view with the previously blamed commit.
Prompt for a search pattern and start searching for matching lines. The search pattern is an extended regular expression. Regular expression syntax is documented in re_format(7).
Find the next line which matches the current search pattern.
Find the previous line which matches the current search pattern.

The options for tog blame are as follows:

commit
Start traversing history at the specified commit. The expected argument is the name of a branch or a commit ID SHA1 hash. An abbreviated hash argument will be expanded to a full SHA1 hash automatically, provided the abbreviation is unique.
repository-path
Use the repository at the specified path. If not specified, assume the repository is located at or above the current working directory. If this directory is a got(1) work tree, use the repository path associated with this work tree.
[-c commit] [-r repository-path] [path]
Display the repository tree. If a path is specified, show tree entries at this path.

Displayed tree entries may carry one of the following trailing annotations:

@ entry is a symbolic link
/ entry is a directory
* entry is an executable file
$ entry is a Git submodule

Symbolic link entries are also annotated with the target path of the link.

The key bindings for tog tree are as follows:

Move the selection cursor down.
Move the selection cursor up.
Move the selection cursor down one page.
Move the selection cursor up one page.
Move the selection cursor to the first entry.
Move the selection cursor to the last entry.
Enter the currently selected directory, or switch to the blame view for the currently selected file.
Open a log view for the currently selected tree entry.
Open a ref view listing all references in the repository. This can then be used to open a new tree view for arbitrary branches and tags.
Move back to the parent directory.
Show object IDs for all objects displayed in the tree view.
Prompt for a search pattern and start searching for matching tree entries. The search pattern is an extended regular expression which is matched against the tree entry's name. Regular expression syntax is documented in re_format(7).
Find the next tree entry which matches the current search pattern.
Find the previous tree entry which matches the current search pattern.

The options for tog tree are as follows:

commit
Start traversing history at the specified commit. The expected argument is the name of a branch or a commit ID SHA1 hash. An abbreviated hash argument will be expanded to a full SHA1 hash automatically, provided the abbreviation is unique.
repository-path
Use the repository at the specified path. If not specified, assume the repository is located at or above the current working directory. If this directory is a got(1) work tree, use the repository path associated with this work tree.
[-r repository-path]
Display references in the repository.

The key bindings for tog ref are as follows:

Move the selection cursor down.
Move the selection cursor up.
Move the selection cursor down one page.
Move the selection cursor up one page.
Move the selection cursor to the first reference.
Move the selection cursor to the last reference.
Open a log view which begins traversing history at the commit resolved via the currently selected reference.
Open a tree view showing the tree resolved via the currently selected reference.
Show object IDs for all non-symbolic references displayed in the ref view.
Toggle display order of references between sort by name and sort by timestamp.
Prompt for a search pattern and start searching for matching references. The search pattern is an extended regular expression which is matched against absolute reference names. Regular expression syntax is documented in re_format(7).
Find the next reference which matches the current search pattern.
Find the previous reference which matches the current search pattern.
Reload the list of references displayed by the ref view.

The options for tog ref are as follows:

repository-path
Use the repository at the specified path. If not specified, assume the repository is located at or above the current working directory. If this directory is a got(1) work tree, use the repository path associated with this work tree.

tog shows colorized output if this variable is set to a non-empty value. The default color scheme can be modified by setting the environment variables documented below. The colors available in color schemes are “black”, “red”, “green”, “yellow”, “blue”, “magenta”, “cyan”, and “default” which maps to the terminal's default foreground color.
The color used to mark up removed lines in diffs. If not set, the default value “magenta” is used.
The color used to mark up added lines in diffs. If not set, the default value “cyan” is used.
The color used to mark up chunk header lines in diffs. If not set, the default value “yellow” is used.
The color used to mark up meta data in diffs. If not set, the default value “green” is used.
The color used to mark up submodule tree entries. If not set, the default value “magenta” is used.
The color used to mark up symbolic link tree entries. If not set, the default value “magenta” is used.
The color used to mark up directory tree entries. If not set, the default value “cyan” is used.
The color used to mark up executable file tree entries. If not set, the default value “green” is used.
The color used to mark up commit IDs. If not set, the default value “green” is used.
The color used to mark up author information. If not set, the default value “cyan” is used.
The color used to mark up date information. If not set, the default value “yellow” is used.
The color used to mark up references in the “refs/heads/” namespace. If not set, the default value “green” is used.
The color used to mark up references in the “refs/tags/” namespace. If not set, the default value “magenta” is used.
The color used to mark up references in the “refs/remotes/” namespace. If not set, the default value “yellow” is used.
The color used to mark up references in the “refs/got/backup/” namespace. If not set, the default value “cyan” is used.

The tog utility exits 0 on success, and >0 if an error occurs.

got(1), git-repository(5), re_format(7)

Stefan Sperling <stsp@openbsd.org>
Joshua Stein <jcs@openbsd.org>
June 12, 2022 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.