命令“git status -u no”过滤器也跟踪文件 [英] Command "git status -u no" filters tracked files also

查看:780
本文介绍了命令“git status -u no”过滤器也跟踪文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想查看工作目录和索引的状态,但不是未跟踪的文件。

I want to see the status of the working directory and the index but not untracked files.

git-status doc http://www.kernel.org/pub/software/scm/git/docs/git- status.html 指出-u开关将过滤未跟踪的文件。

The git-status doc http://www.kernel.org/pub/software/scm/git/docs/git-status.html tells that the -u switch will filter untracked files.

但是下面的命令

But the following command

git status -u no

过滤未跟踪的文件,也过滤在工作树和索引中跟踪文件的修改。

filters untracked files and also filters the modifications of the tracked files in the working tree and the index.

推荐答案

试试:

git status --untracked-files=no

完整的参数形式有效。

实际上,如果您使用缩写,则需要在 -u 之间删除空格 / code>和模式:

The complete argument form works.
But actually, if you are using the abbreviation, you need to remove the space between -u and the mode:

git status -uno

Oleh Prypin 有帮助评论 git status -u 接受一个可选的参数(默认为 all )。

-u no 会像 - untracked-files no 一样不明确,因为 git status -u some_file.txt 必须继续工作。

Oleh Prypin helpfully comments that git status -u accepts an optional argument (defaults to all).
-u no would be ambiguous just like --untracked-files no, because git status -u some_file.txt has to keep working.

这篇关于命令“git status -u no”过滤器也跟踪文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆