I want to see the status of the working directory and th开发者_如何学Goe index but not untracked files.
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.
Try:
git status --untracked-files=no
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 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.
精彩评论