Atlantic.Net Blog

How to Install Tig Git Repository Browser on Oracle Linux 8

Hitesh Jethva
by Atlantic.Net (468 posts) under Tutorials, VPS Hosting
0 Comments

Tig is an ncurses-based text-mode interface and repository browser for Git. It is cross-platform and can be installed on various operating systems, including Linux, macOS, and Windows. Tig is a straightforward interface to Git and is used for staging Git commits. It provides a rich set of features. Some of them are listed below:

  • View stashes list
  • View single file changes
  • Browse the commits in the current branch
  • Allows to compare two branches
  • View the commits for one or more specific branches

This post will show you how to install and use the Tig git repository browser on Oracle Linux 8.

Prerequisites

  • A fresh Oracle Linux 8 server on the Atlantic.Net Cloud Platform
  • A root password configured on your server

Step 1 – Create Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server. Next, create a new server, choosing Oracle Linux 8 as the operating system with at least 2GB RAM. Finally, connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged in to your Oracle Linux 8 server, run the following command to update your base system with the latest available packages.

dnf update -y

Step 2 – Install Tig

By default, Tig is not included in the Oracle Linux 8 default repository, so you will need to compile it from the source.

First, install the required dependencies using the following command:

dnf group install "Development Tools"  -y
dnf install ncurses-devel ncurses -y

Next, download the latest version of Tig with the following command:

git clone https://github.com/jonas/tig.git

Next, change the directory to the downloaded manual and compile it with the following command:

cd tig
make
make install

Once Tig is installed, verify the installed version of Tig with the following command:

tig --version

You should get the following output:

tig version 2.5.7
ncursesw version 6.1.20180224

You can see all options available with Tig using the following command:

tig --help

You should see the following output:

tig 2.5.7 

Usage: tig        [options] [revs] [--] [paths]
   or: tig log    [options] [revs] [--] [paths]
   or: tig show   [options] [revs] [--] [paths]
   or: tig reflog [options] [revs]
   or: tig blame  [options] [rev] [--] path
   or: tig grep   [options] [pattern]
   or: tig refs   [options]
   or: tig stash  [options]
   or: tig status
   or: tig <      [git command output]

Options:
  +       Select line  in the first view
  -v, --version   Show version and exit
  -h, --help      Show help message and exit
  -C        Start in 

Step 3 – Working with Tig

You must clone any Git repository to your local system to use Tig.

Let’s clone the repository using the following command:

git clone https://github.com/hitjethva/linuxbuz

Once the repository is cloned, change the cloned repository using the following command:

cd linuxbuz

Next, run the Tig command without any argument to display the list of commits on the current branch:

tig

You should see the detailed information on your commits on the following screen:
Tig commit information
To display all the references of your repository, run the following command:

tig refs

You should see the following screen:
Tig repository reference information
To display a log of activities of the above repository, run the following command:

tig log

You should see the following screen:
Tig log activity
If you want to search for a particular pattern from your repository, run the following command:

tig grep linux

You should see the following screen:
Tig search for pattern
To display the status of your git repository, run the following command:

tig status

You should see the next screen:
Tig git repository status
To put Tig in Pager mode, run the following command:

git status | tig

You should see the next screen:
Tig git pagger mode
To find out who made a change to a file, run the following command:

tig blame readme.md

You should see the next screen:
Tig find who made changes

Conclusion

The above guide taught you how to install and use the Tig git repository browser on Oracle Linux 8. You can easily track and manage your Git repository from the command-line interface. Try it on VPS hosting from Atlantic.Net!

Get A Free To Use Cloud VPS

Free Tier Includes:
G3.2GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

Best Cloud Consultancy or MSP in 2022
BAA Red Flags: What Should Your HIPAA-Compliant Hosting Company Be Willing to Accommodate?
HIPAA Compliance for Remote Workers: How to Maintain HIPAA Compliance with a Remote Team
How to Make the Best Use of the Cloud in the Internet of Things (IoT)
How to Make the Best Use of Artificial Intelligence in Cloud Computing

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2008 Lookout Dr,

Garland, Texas 75044

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources