3

In git, it is git diff <file path>, but what about in tig?

In tig, in the status view, highlighting a file (staged or unstaged) and pressing D, diffs the last commit. I think it should diff the uncommitted file against the last committed version of that file.

Geoffrey
  • 5,407
  • 10
  • 43
  • 78

1 Answers1

5

As a hack, you can do git diff <file path> | tig and see it.

On the status section in tig you can see both the staged and unstaged changes (say, git diff vs git diff --cached) pressing Enter over the file in each of the sections it appears (under "Changes to be committed" or "Changed but not updated").

It may be a nice feature to just tig diff -- <file path> but, well - go ahead, code it :)

mgarciaisaia
  • 14,521
  • 8
  • 57
  • 81