如何使用tig查看已更改但未提交的文件的差异? [英] How do I use tig to view the diff for a file which is changed but not commited?
问题描述
在git中,它是 git diff< file path>
,但在tig中怎么样?在tig中,在状态视图中,突出显示一个文件(staged或unstaged)并按 D ,会区分上次提交。我认为它应该将未提交的文件与该文件的最后提交版本进行比较。
作为一种破解方式,您可以执行 git diff< file path> | tig
并查看它。
在 对于 In git, it is 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 On the It may be a nice feature to just 这篇关于如何使用tig查看已更改但未提交的文件的差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!状态
部分中 tig
你可以看到stage和unstaged的变化(比如 git diff
vs git diff --cached code>),然后按 Enter 键显示每个部分的文件(位于要提交的更改或更改但未更新下)。
tig diff - < file path>
也许是一个很好的功能,但是,请继续前进,对其进行编码:)git diff <file path>
, but what about in tig?git diff <file path> | tig
and see it.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").tig diff -- <file path>
but, well - go ahead, code it :)