chiggsy chiggsy - 1 month ago 7
Git Question

Get git not to show untracked files

When doing

git commit
, is there a way to not display the untracked files in my editor (defined in
$EDITOR
)? I know how to do so in the shell (
git status -uno
), but I'd like do it in editor as well.

Note that I do not want to ignore these files forever; I just don't want to see them on certain occasions.

Answer

From the git-commit man page:

       -u[], --untracked-files[=]
           Show untracked files (Default: all).

           The mode parameter is optional, and is used to specify the handling of untracked
           files. The possible options are:

           ·   no - Show no untracked files

           ·   normal - Shows untracked files and directories

           ·   all - Also shows individual files in untracked directories.

               See git-config(1) for configuration variable used to change the default for
               when the option is not specified.