Tig Tips

programming, linux, git

I love tig. Still, I think the defaults aren’t the best for most developers. Here are two easy customizations to make the default view better.

First, put

alias tig='tig -n 1000'

in your ~/.bashrc to reduce tig’s startup time (especially on large repositories). There’s rarely a need to go back more than 1000 commits from your current HEAD position in an interactive, GUI-driven manner. And if you really need to see everything, do

$ \tig

on the terminal to bypass the shell alias.

Second, put the following in your ~/.tigrc file:

set main-view = date author id:width=10 commit-title:yes,graph,refs

. This makes the default view show git commit hashes (where width is the number of hex digits to show), so that you don’t have to press ENTER on a particular commit to see its hash.

Happy hacking!