Get git not to show untracked files

0

Issue

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.

Solution

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.

Answered By – J. Cordasco

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More