Terminal UI options for Git

Several interesting projects:

Have not tried them yet, but trying to get some less technical people using Git, so these may help.

Comparison of the three options:

The above article contains an interesting table that shows the differences between tools written in Rust (gitui), Go (lazygit), and C (tig):

While implementation matters as well as language, this probably represents what we typically see for binary size.

In my own testing, I like gitui pretty well. It seems like a nice replacement for git add --interactive where you can easily stage chunks of a file for commit. tig has a nice default view which shows all branch paths and merges – similar to gitk.

For new users, it seems gitui is the most intuitive because it does not require memorizing a bunch of keyboard shortcuts. I plan to try it over the next week in my own development and see how it goes.

It is interesting that the gitui binary (Rust) is completely static – from the name of the download binary, I assume it is statically linked to musl – looking at the CD config, that appears correct.

The Go binary likely could have also been made completely static if the build process had turned off CGO.

[cbrake@mars ~]$ ldd /usr/bin/lazygit 
        linux-vdso.so.1 (0x00007fff7bbd4000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f962fe86000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f962fcbd000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f962fefd000)

[cbrake@mars ~]$ ldd /usr/local/bin/gitui 
        not a dynamic executable

[cbrake@mars ~]$ ldd /usr/bin/tig
        linux-vdso.so.1 (0x00007fffe0dbd000)
        libreadline.so.8 => /usr/lib/libreadline.so.8 (0x00007ff6114f3000)
        libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007ff611482000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007ff6112b9000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007ff611647000)