Tig in Termux – Git Repository Browser in the Terminal

Tig is a simple text-based interface for Git that runs directly in the terminal. It allows you to view Git logs, commits, branches, changes, and other repository information in an easy-to-read format. Tig provides a simple way to check Git repository information and track changes from the terminal.

Here’s what you can do with Tig in Termux:

  • View Git commit history.
  • Browse commits and changes.
  • Check repository status.
  • View Git branches and references.
  • Search files and code.
  • View Git stash information.
  • Check who changed each line of a file.
  • Run Git commands through the terminal.

Install Tig in Termux

Below are the simple commands to install Tig in Termux. Copy and run the command one by one to install the tool.

Update Termux packages.

pkg update && pkg upgrade -y

Install Tig.

pkg install tig -y

Tig is now installed and ready to use.

Use Tig in Termux

After installing Tig, clone or go to a Git repository using the “cd repo_name” command. Then, run the commands below to view and explore the repository information.

Move to any Git repository directory.

cd directory_name

Start Tig.

tig

View Git commit history.

tig log

Show commit details.

tig show

View the Git reflog.

tig reflog

View who changed each line of a file.

tig blame filename

Search for a pattern in the repository.

tig grep "search"

View Git references.

tig refs

View Git stash information.

tig stash

Check the repository status.

tig status

Show the installed Tig version.

tig --version

Show the help menu.

tig --help

Start Tig in a specific directory.

tig -C /path/to/repository

Select a specific line in the first view.

tig +10

Tig can also read Git command output directly from standard input.

git log | tig

You can use these commands to browse Git repositories, check commit history, search code, and view different types of Git information.

End Note

Tig provides a simple way to work with Git information from the terminal. It is lightweight, easy to use, and useful for checking commits, changes, branches, and repository status. You can use its simple commands to explore your Git projects in Termux.

SHARE THIS POST: