πŸ•΅

Exploring tig: A Command-Line Git Browser

A colleague recently recommended tig to me, and I must say, it has quickly become a favorite tool in my Git workflow.

Installing tig

You can easily install tig using your preferred package manager. For instance, on Ubuntu, you can use:

1
sudo apt-get install tig

Once installed, simply navigate to your project directory and run:

1
tig

Browsing Commits with Ease

After starting tig, you'll see a list of recent commits in your project. You can navigate through them with the arrow keys, or use the familiar Vim-style keys (j and k). To inspect a specific commit, just press Enter. It’s a fast and intuitive way to explore your project's history without leaving the terminal.

Exploring the Project Tree

One feature I really appreciate is the ability to explore the project's file tree. Press t while in tig, and you’ll have a quick view of the file structure at your fingertips. Want to see who last modified a specific line of code? Just press B to perform a git blame on any file.

Why Choose tig?

tig comes with a rich set of features β€” just hit h to explore them all. However, for my workflow, these two features (commit browsing and file tree exploration) are the game-changers.

Compared to GUI tools like Tower, Gitbox, or GitK, tig stands out because it lets me stay in the command line. No switching windows, no distractions β€” just me and my code.

Give tig a Try

If you're interested in a more efficient way to work with Git, I highly recommend checking out the tig website and giving it a try. You might find it as useful as I do!