When I type git status
There is message saying
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
I type git help status
and read but not understand how to get same as git status
result
The git status command displays the state of the working directory and the staging area. It lets you see which changes have been staged, which haven't, and which files aren't being tracked by Git. Status output does not show you any information regarding the committed project history.
The main difference between the commands is that git diff is specially aimed at comparisons, and it's very powerful at that: It can compare commits, branches, a single file across revisions or branches, etc. On the other hand, git status is specifically for the status of the working tree.
It means that the file's content has been modified in the working tree, but the changes to the file are not staged. Let us now commit the changes and observe the status.
Git is telling you that because you have many untracked files, the result of git status
takes longer time than usual.
The fix is to use git status -uno
. From the manual:
-u[<mode>] --untracked-files[=<mode>]
Show untracked files.
The mode parameter is optional (defaults to all), and is used to specify the handling of untracked files; when
-u
is not used, the default is normal, i.e. show untracked files and directories.The possible options are:
no
- Show no untracked files
normal
- Shows untracked files and directories
all
- Also shows individual files in untracked directories.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With