gittig

Showing a file tree view of a commit in Tig


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?


Solution

  • The gentleman behind Tig has graciously created a dedicated view log: Showing a file tree view of a commit in Tig

    Thank you, sir!


    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:

    1. highlight a commit in the default view, using the up and down cursor keys.
    2. 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 The Viewer for more information.


    You can also get this information using:

    git log --stat
    git log --stat A_COMMIT_SHA