Why I really like Tig for visualizing my Git workflows
Tue, 07/05/2022 – 03:00
If you discover navigating your Git repositories frustratingly advanced, have I received the instrument for you. Meet Tig.
Tig is an ncurses-based text-mode interface for Git that means that you can browse modifications in a Git repository. It additionally acts as a pager for the output of assorted Git instructions. I exploit this instrument to offer me a good suggestion of what’s been modified by which commit by whom, the most recent commit merged, and a lot extra. Try it for your self, beginning with this temporary tutorial.
On Linux, you possibly can set up Tig utilizing your package deal supervisor. For occasion, on Fedora and Mageia:
$ sudo dnf set up tig
On Debian, Linux Mint, Elementary, Pop_OS, and different Debian-based distributions:
$ sud apt set up tig
Tig supplies an interactive view of widespread Git output. For occasion, with Git you possibly can view all refs with the command
$ git show-ref
With Tig, you may get that data and way more in a scrollable listing, plus keyboard shortcuts to open extra views with particulars about every ref.
Tig enters pager mode when enter is offered to stdin (commonplace enter). When the
present subcommand is specified and the
--stdin choice is given, stdin is assumed to be an inventory of commit IDs, which is forwarded to
$ git rev-list --author=sumantrom HEAD | tig present –stdin
Log and diff views
When you are in Tig’s log view, you possibly can press the d key in your keyboard to show diffs. This shows the information modified within the commit and the traces that have been eliminated and added.
Interactive Git information
Tig is a superb addition to Git. It makes it straightforward to evaluation your Git repository by encouraging you to discover the logs with out having to assemble lengthy and generally advanced queries.
Add Tig to your Git toolkit at the moment!
Tig is a superb instrument for reviewing your Git repository by encouraging you to discover the logs with out having to assemble lengthy and generally advanced queries.