How do I look at a file across revisions?

525 Views Asked by At

I'm familiar with using https://github.com/jonas/tig to view my changes, but often I want to see the whole file and quickly run through the changes. I think this "git timemachine" feature doesn't exist in tig judging my these bug reports:

My workaround is the use tig blame $filename and hit f to look at the blob at that revision, which is super awkward since different lines change at different times.

What am I missing?

1

There are 1 best solutions below

4
johannes On BEST ANSWER

Maybe this binding:

bind generic V !sh -c 'git show $1:$2' -- %(commit) %(fileargs)

then run something like tig -- README.adoc. Select a commit and hit "V" to view the file.