如何使用tig查看已更改但未提交的文件的差异

如何使用tig查看已更改但未提交的文件的差异

本文介绍了如何使用tig查看已更改但未提交的文件的差异?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在git中,它是 code>),然后按键显示每个部分的文件(位于要提交的更改或更改但未更新下)。

对于 tig diff - < file path> 也许是一个很好的功能,但是,请继续前进,对其进行编码:)


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 , 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 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 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 :)

这篇关于如何使用tig查看已更改但未提交的文件的差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 05:11