tig
is a command line explorer for Git that is just awesome. Install via apt-get
or brew
.
Handy commands
-
t
("tree"): Directory-structure based access. You'll see the current directory annotated with the latest change date and its author. Navigate with arrow keys or vim. -
b
("blame"): Opens the file under the cursor and annotates each line with change date and author. -
d
("diff"): LikeENTER
on a commit, but arrow keys will scroll the diff! -
/
: Search current view (e.g. commit list, diff). Jump to next hit withn
. Case-sensitive! -
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
Other features
-
Path-based access. Run
tig path/to/file*
. It will boot with the commit list filtered to those that touched the given file(s). -
Interactive Git status. Run
tig status
. Stage/unstage withU
, navigate withENTER/Q
. -
Stash management. Call
tig stash
, browse the stashes, apply witha
, pop withp
, drop with!
. See Git: How to look at the stash
Config file
tig
is configured in your ~/.gitconfig
file. I have the following section there:
[tig]
main-view-date-display = relative-compact # Highly recommended
main-view-commit-title-graph = v1
main-view-author-display = abbreviated # More compact
main-view-id-display = yes
Posted by Dominik Schöler to makandra dev (2015-08-12 06:34)