How do I do a 'git status' so it doesn't display untracked files without using .gitignore?

How do I do a git status so it doesn't display untracked files without using .gitignore? I want to get modification status information on tracked files only.


Use this:

git status -uno

which is equivalent to:

git status --untracked-files=no

It's a bit hidden in the manuals, but the manpage for status says "supports the same options as git-commit", so that's where you'd have to look.


Also:

git config status.showuntrackedfiles no

Note that, since git 1.8.3 (April, 22d 2013), you will know about the --untracked-files=no even if you didn't add that option in the first place!

"git status" suggests users to look into using --untracked-files=no option when it takes too long.

See commit https://github.com/git/git/commit/5823eb2b28696bf0eb25f6ca35b303447869f85:

In some repositories users experience that "git status" command takes long time.
The command spends some time searching the file system for untracked files.

Explain the trade-off struck by the default choice of normal to help users make an appropriate choice better, before talking about the configuration variable.

The git status documentation now states:

When -u option is not used, untracked files and directories are shown (i.e. the same as specifying normal), to help you avoid forgetting to add newly created files.
Because it takes extra work to find untracked files in the filesystem, this mode may take some time in a large working tree.
You can use no to have git status return more quickly without showing untracked files
.

The default can be changed using the status.showUntrackedFiles configuration variable documented in git config.