Posted almost 4 years ago. Visible to the public.

Using tig

tig is a command line explorer for git that is just awesome. Install via apt-get or brew.

Generally speaking, tig is controlled similar to vim.

  • ENTER: Dive into the highlighted line, e.g. open a commit
  • Q: Go back to the previous view, e.g. close a file
  • SHIFT + Q: Exit
  • TAB: Switch focus between views, e.g. the commits list and the commit diff

Features

tree view
Hit t. You'll see the current directory annotated with the latest change date and its author. Navigate with arrow keys or vim.
blame
Press b (as in blame). tig will open the file under the cursor and annotate each line with change date and author.
search for commit messages
Type /, then your search phrase case sensitive and press ENTER. tig will jump to commits whose message contains the search phrase, as you repeatedly press N.
see history of a certain file/path
Start tig with tig <file or path or glob>. It will boot with the commit list filtered to those that touched the given file(s).
view status and un/stage files
Call tig status. You will see something similar to git status, however, it's interactive. Un/stage with U, navigate with ENTER/Q.
explore stashed items
Call tig stash. See Git: How to look at the stash

Configuration

tig is configured in your ~/.gitconfig file. I have the following section there:

Copy
[tig] show-date = relative show-rev-graph = yes

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for old versions of Ruby on Rails (3.2 and 2.3).

Owner of this card:

Avatar
Dominik Schöler
Last edit:
about 2 years ago
by Daniel Straßner
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Dominik Schöler to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more