CLI Tools to Enhance Git Experience

I use git all the time. I use quite a few GUI tools to work with git. But I also have some more CLI tools to help me work with git. Here are a few.

bat

A cat(1) clone with syntax highlighting and Git integration. I used to use cat a lot, to explore. Now I use bat a lot. Mostly to quickly view a file. It helps that it can do syntax highlighting, show special characters. For files under git, it can show diff too.

diff2html

It can generate beautiful HTML diff. You can use it for reviews, debugging etc. You can also use it for generating html content to embed on web.

diff2html -s line -f html -d word -i command -o preview -- -M HEAD~1

When run inside the datameet/covid19 it will generate an HTML and show it inside a browser. You can see a screenshot of it below

HTML Diff

TIG

I usually use git-webui to explore the code locally. I also use beautiful Sublime Merge when I am inside Sublime Text. But when I am in console I use Tig. Its fast, clean, beautiful and very useful.

Tig is an ncurses-based text-mode interface for git. It functions mainly as a Git repository browser, but can also assist in staging changes for commit at chunk level and act as a pager for output from various Git commands.

Tig - To explore git repos