什么是git中的git status -uno

时间:2017-09-21 03:24:26

标签: git

当我输入git status时会显示消息

It took 2.39 seconds to enumerate untracked files. 'status -uno'
may speed it up, but you have to be careful not to forget to add
new files yourself (see 'git help status').
nothing to commit, working tree clean

我输入git help status并阅读但不理解如何与git status结果相同

1 个答案:

答案 0 :(得分:2)

Git告诉你,因为你有许多未跟踪的文件,git status的结果需要比平时更长的时间。

修复方法是使用git status -uno。来自the manual

-u[<mode>]
--untracked-files[=<mode>]
     

显示未跟踪的文件。

     

mode参数是可选的(默认为all),用于指定未跟踪文件的处理;如果未使用-u,则默认为正常,即显示未跟踪的文件和目录。

     

可能的选择是:

     

no - 不显示未跟踪的文件

     

normal - 显示未跟踪的文件和目录

     

all - 还显示未跟踪目录中的单个文件。