Describe how to list ignored files

This tip shows how to list all ignored files in a project, which will
take into account not only any `.gitignore` file within a repository,
but also any globally defined list of exclusions such as
`/home/eric/.gitexcludes` and `.git/info/exclude` within the
repository itself.

Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>
This commit is contained in:
Eric James Michael Ritz 2015-07-29 18:54:45 -04:00
parent aa62766196
commit 76c268f284
2 changed files with 10 additions and 0 deletions

View File

@ -36,6 +36,7 @@
* [Delete all stored stashes](https://github.com/git-tips/tips#delete-all-stored-stashes)
* [Show all tracked files](https://github.com/git-tips/tips#show-all-tracked-files)
* [Show all untracked files](https://github.com/git-tips/tips#show-all-untracked-files)
* [Show all ignored files](https://github.com/git-tips/tips#show-all-ignored-files)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
@ -239,5 +240,10 @@ git ls-files -t
git ls-files --others
```
## Show all ignored files
```sh
git ls-files --others -i --exclude-standard
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end -->

View File

@ -135,5 +135,9 @@
{
"title":"Show all untracked files",
"tip":"git ls-files --others"
},
{
"title": "Show all ignored files",
"tip": "git ls-files --others -i --exclude-standard"
}
]