Talespin_Kit
Talespin_Kit

Reputation: 21897

Command "git status -u no" filters tracked files also

I want to see the status of the working directory and the 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.

Upvotes: 6

Views: 1352

Answers (1)

VonC
VonC

Reputation: 1327384

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.

Upvotes: 9

Related Questions