Going over Git history with tig

April 17, 2018

There are many UI utilities that allow you to explore a Git repository, but for me, nothing beats tig.

A GIF showing examples of the usage of the tig command

The Basics

tig [view] [-options] [revs] 

tig is a text-based user interface for Git that can be used directly from your terminal to explore the repository in the current working directory. It can be invoked directly or by piping Git output.


The program exposes different views, each view displays different data from the repository. You can tell tig to use a view with the optional view argument or you can switch views once tig is open with the default keybindings:

View Argument Keybinding
main view - m
diff view - d
log view log l
show view show -
blame view blame ** b *
grep view grep ** g
refs view refs r
status view status s
help --help h
\* You need to have a file selected in the UI
\*\* You neeed to supply an argument

If you are familiar with Git commands, view names are almost self-explanatory, I strongly encourage you to download tig and try the different views by yourself, they are very intuitive to navigate.

Pager mode

You can also pipe regular Git commands via stdin to tig, for example:

$ git show | tig

output of the git show command piped into tig