tig is a command line explorer for git that is just awesome. Install via
tig is controlled similar to
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
- tree view
t. You'll see the current directory annotated with the latest change date and its author. Navigate with arrow keys or vim.
tigwill open the file under the cursor and annotate each line with change date and author.
- search for commit messages
/, then your search phrase case sensitive and press
tigwill jump to commits whose message contains the search phrase, as you repeatedly press
- see history of a certain file/path
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
tig status. You will see something similar to
git status, however, it's interactive. Un/stage with
U, navigate with
- explore stashed items
tig stash. See Git: How to look at the stash
tig is configured in your
~/.gitconfig file. I have the following section there:
[tig] show-date = relative show-rev-graph = yes