无需在“中显示已删除的文件路径”;“git状态”;

无需在“中显示已删除的文件路径”;“git状态”;,git,Git,我正在使用git,每次检查$git status时,它都会显示出来 # deleted: application/abe/1/index (copy).tpl # deleted: application/abe/2/index (copy).tpl # modified: css/mobile.css # modified: css/work.css 我只需要看到修改过的文件,而不是删除文件。有什么方法吗?您可以使用

我正在使用git,每次检查
$git status
时,它都会显示出来

#        deleted:    application/abe/1/index (copy).tpl
#        deleted:    application/abe/2/index (copy).tpl
#        modified:   css/mobile.css
#        modified:   css/work.css

我只需要看到修改过的文件,而不是删除文件。有什么方法吗?

您可以使用
git status | grep modified
,或者
git status | grep-v deleted
。Git本身不提供从状态输出中隐藏删除的选项,因为不太可能有人不知道他们的下一次提交将从存储库中删除一些文件。

在windows上,您可以使用
Git status | findstr-v deleted
。Grep在windows命令行上不可用。

此问题可能存在dup-肯定不是s dup。不同的相关问题有不同的答案。