I have never been a gitk fan and rarely used it, preferring console and tuned aliases. Thanks to the grossws
habrauser , I discovered
tig . This is what I missed. After a month of using it at work, I want to share the find with you.
Tig is a console GUI (TUI) for Git, based on
Ncurses .
Main advantages:
- amazing speed, 20,000 commits are ready for viewing in a quarter of a second
- cantilevered
- management in vim style
Screenshots of the main modes and comparison with gitk.
Installation:
git clone https://github.com/jonas/tig.git cd tig make prefix=/usr sudo make install prefix=/usr
I do not recommend Bubuntovodam to install tig via
apt-get , since version 1.0 is in the repository, which contains several bugs that are currently (v1.2.1) fixed.
')
One of the most obvious reasons for using a Tig is using the keyboard only. You make less movements of the keyboard-mouse, the elbow on the right sleeve will last longer :)
Shortcuts in descending order:
h - help, a list of all commandsq - exit from active view/ - search (for example, by commit name or by author)n - next search resultN - previous search result
History view ( m )
The default tig runs in the commit history view. This is git log, a bit decorated with ASCII-art (no more than necessary).
Diff view ( d )
The mode that I use most often. I use it when I need to find and check one specific commit.
j , k or arrows - movingEnter - scrolling] and [ - increase / decrease context diffB - blamee - open the file in Vim, the cursor will be there where diff
Log view ( l )
I use it when I want to get an overall picture of the latest commits.
Status view ( S )
I would call this mode interesting git add. Shortcut
u is used to add / delete files to the index (stage).
Branch view ( H )
View branches with the fact that for each git log is immediately visible. To quickly switch to a branch, use shortcut
C.Stash view ( y )
View all stash
j , k or arrows - movingEnter - view contentP stash pop (apply change from stack)
Good commits;)