13 $ brew install tig --HEAD
18 $ sudo apt install tig
23 | Command | Description |
24 | ------------------- | -------------------------------------------- |
27 | `tig status` | Status |
28 | `tig blame FILE` | Blame |
30 | `tig master` | Show a branch |
31 | `tig test..master` | Show difference between two branches |
32 | `tig FILE` | Show history of file |
33 | `tig v0.0.3:README` | Show contents of file in a specific revision |
34 | `tig -C /repo/path` | Run in dir `/repo/path` (like `git -C`) |
36 You can substitute `git log` → `tig`.
43 | Shortcut | Description |
44 | -------- | ------------ |
47 | `t` | Tree (files) |
58 | Shortcut | Description |
60 | `<enter>` | Enter and open selected line |
61 | `<` | Back to previous view state |
62 | `<tab>` | Move focus to next view |
65 | `Q` | Close all (quit) |
66 | `,` | Parent commit |
71 | Shortcut | Description |
74 | `?` | Search backwards |
76 | `J` `K` | Next/previous |
77 | `<space>` | Page down |
79 | `^D` | Half page down |
80 | `^U` | Half page up |
85 | Shortcut | Description |
87 | `I` | Toggle sort order modes |
88 | `i` | Change sort header |
89 | `D` | Toggle date display modes |
90 | `A` | Toggle author display modes |
91 | `#` | Toggle line numbers |
92 | `~` | Toggle line graphics |
93 | `F` | Toggle file names |
94 | `W` | Toggle ignore space |
99 | Shortcut | Description |
101 | `X` | Toggle commit sha |
102 | `C` | Cherry pick a commit |
105 ### `s` - Status view
106 | Shortcut | Description |
108 | `u` | Stage/unstage file or chunk |
109 | `!` | Revert file or chunk |
111 | `M` | Merge with external tool |
116 | Shortcut | Description |
118 | `u` | Stage/unstage file or chunk |
119 | `!` | Revert file or chunk |
121 | `\` | Split current diff hunk |
122 | `[` `]` | Increase/decrease the diff context |
127 | Shortcut | Description |
129 | `[` `]` | Increase/decrease the diff context |
134 | Shortcut | Description |
136 | `A` | Apply selected stash |
137 | `P` | Pop selected stash |
138 | `!` | Drop selected stash |