01 December 2015

Tig is a console Git client, and it is probably the best one there is, too! You can read more about it over at the Atlassian Blogs. It is available for Windows as part of Cygwin. Here is a receipe for installing it standalone, without the entire Cygwin setup.

Notice that the binaries should go in the bin directory and not in usr\bin, even though they are located there in the archives. The terminfo directory, however, must go in usr\share, not simply in share!

You should of course replace cygwin.uib.no with the location of your nearest Cygwin mirror. If you don’t have the Unix tools installed on your Windows PC, then you can use a Linux workstation to generate the directory and copy it afterwards.

wget http://cygwin.uib.no/x86_64/release/tig/tig-2.0.2-2.tar.xz
wget http://cygwin.uib.no/x86_64/release/cygwin/cygwin-2.4.0-0.6.tar.xz
wget http://cygwin.uib.no/x86_64/release/libiconv/libiconv2/libiconv2-1.14-3.tar.xz
wget http://cygwin.uib.no/x86_64/release/ncurses/libncursesw10/libncursesw10-6.0-1.20151017.tar.xz
wget http://cygwin.uib.no/x86_64/release/gcc/libgcc1/libgcc1-5.2.0-1.tar.xz
wget http://cygwin.uib.no/x86_64/release/readline/libreadline7/libreadline7-6.3.8-1.tar.xz
wget http://cygwin.uib.no/x86_64/release/ncurses/terminfo/terminfo-6.0-1.20151017.tar.xz

tar Jxf tig-2.0.2-2.tar.xz --strip-components=1 usr/bin/tig.exe
tar Jxf cygwin-2.4.0-0.6.tar.xz --strip-components=1 usr/bin/cygwin1.dll
tar Jxf libiconv2-1.14-3.tar.xz --strip-components=1 usr/bin/cygiconv-2.dll
tar Jxf libncursesw10-6.0-1.20151017.tar.xz --strip-components=1 usr/bin/cygncursesw-10.dll
tar Jxf libgcc1-5.2.0-1.tar.xz --strip-components=1 usr/bin/cyggcc_s-seh-1.dll
tar Jxf libreadline7-6.3.8-1.tar.xz --strip-components=1 usr/bin/cygreadline7.dll
tar Jxf terminfo-6.0-1.20151017.tar.xz usr/share/terminfo/63/cygwin

rm *.tar.xz

cat > tig.bat <<EOF
@echo off
setlocal
set TERMINFO=%~dps0\usr\share\terminfo
set CYGWIN=nodosfilewarning
set PATH=%~dps0\bin;%PATH%
%~dps0\bin\tig.exe %*
endlocal
EOF

sed -i 's/\r//' tig.bat
sed -i 's/$/\r/' tig.bat

You should can then copy this directory tree to for instance %ProgramFiles%\tig and add that directory (with the tig.bat file in it) to the PATH.