Tool spotlight: tig - The curses git repository browser

tig (git spelled backwards) is a great interactive git repository browser and pager with vim-like controls. It uses curses so you can run it in terminal, unlike similar gitk. And of course, it uses colors.

tig main view


Run without parameters to get current branch history:


You can also view specific revisions or use --all to view all branches:

tig HEAD~
tig foo-branch
tig foo bar baz
tig --all

Display only commits changing specific file(s):

tig -- file
tig foo-branch -- file1 file2

It also features a colored blame view (screenshot):

tig blame file

See man tig for more goodness.

Interactive use

Press h for shortucts list, here are few I use often:

  • enter open commit view (in main view); vim keys move within commit view while arrows move between commits - handy!
  • q close view or exit when in main view
  • t tree view, you can browse files at selected commit and
    • B blame view