I will not echo what others have said about the usage of .gitignore
because I believe they have covered it, but I like your question about omitting results from git status
.
I have found no way to omit specific directories other than specifying the sub-directory for which you want status, i.e. git status <subdirectory>
, where the current directory is the default.
This is insufficient in some cases depending on how a project is organized. For example, in Go when using dep
, there is a vendor
directory that gets checked in and it would be desirable to exclude only that, but the best I can do is to git status
on a series of sub-directories (not fun). Same goes for git diff
.