[英]How do I use tig to view the diff for a file which is changed but not commited?
In git, it is git diff <file path>
, but what about in tig? 在git中,它是
git diff <file path>
,但是在tig中呢?
In tig, in the status view, highlighting a file (staged or unstaged) and pressing D , diffs the last commit. 在tig的状态视图中,突出显示一个文件(已暂存或未暂存),然后按D ,比较上一次提交。 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
git diff <file path> | tig
and see it. git diff <file path> | tig
,看看吧。
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"). 在
status
在第tig
你可以同时看到演出和未分级的变化(比如, git diff
VS git diff --cached
)按Enter键在每个出现的部分文件(在“更改为致力于”或“已更改但未更新”)。
It may be a nice feature to just tig diff -- <file path>
but, well - go ahead, code it :) 只是
tig diff -- <file path>
可能是一个不错的功能,但是-继续,将其编码:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.