列出被忽略文件的 git 命令是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18596867/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the git command to list ignored files?
提问by MEM
My netbeans IDE shows ignored files on a different color. I presume, the IDE is knowing this by using some git command.
我的 netbeans IDE 以不同的颜色显示被忽略的文件。我猜想,IDE 是通过使用一些 git 命令来了解这一点的。
I wish to know what files on a project folder and subfolders are being ignored.
我想知道项目文件夹和子文件夹中的哪些文件被忽略。
What command should we use?
我们应该使用什么命令?
回答by Max
git status --ignoredwill show all untracked files. It also includes the normal status output. There does not appear to be a status option to only show the ignored files.
git status --ignored将显示所有未跟踪的文件。它还包括正常状态输出。似乎没有仅显示被忽略文件的状态选项。

