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.
As a hack, you can do git diff <file path> | tig
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 :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.