I'm using tig and would like to see the list of changed files in a commit, possibly drilling down to a diff view of a specific file, yet I haven't found a way to do this. Is it possible, or is only the diff view available on a commit?
Asked
Active
Viewed 2,277 times
2 Answers
4
Tig has a dedicated log view since version 1.2.
Use tig log
to start it.
While it does not allow you to jump directly into a file diff, pressing Enter will open the commit diff from where you can then jump to the file you are interested by highlighting the file and pressing Enter.

Jonas Fonseca
- 1,811
- 15
- 15
2
The gentleman behind tig has graciously created a dedicated view log: https://stackoverflow.com/a/21323680/2916086
Thank you sir!
UPDATE: pipe in the data you want tig to format. For example:
> git log --stat|tig
> alias tigstat='git log --stat|tig'
> tigstat
Basically, just press Enter on the commit you are interested, while in the default view of tig.
In detail:
- highlight a commit in the default view, using the up and down cursor keys.
- press enter on a commit in the default view. Then use up and down or the j and k keys to navigate the diff.
The list of changed files should be at the top of the diff.
See http://jonas.nitro.dk/tig/manual.html#viewer for more info
You can also get this information using:
git log --stat
git log --stat A_COMMIT_SHA
-
Thank you, I was hoping for something like a dedicated view, but the aggregate will do the job too, I guess. – Stavros Korokithakis Jan 03 '14 at 11:40
-
@StavrosKorokithakis, consider typing the following by hand after you run `tig`: `:!git log --stat` – yegeniy Jan 03 '14 at 15:21
-
Would that be what you're looking for? – yegeniy Jan 03 '14 at 15:22
-
Almost, I was hoping tig would have such a display with a dedicated patch or diff view, e.g. like gitg does. – Stavros Korokithakis Jan 03 '14 at 19:08
-
Updating the answer to include a workaround for what you want – yegeniy Jan 03 '14 at 19:18