In your case, you can specify the exclude parameter:
git clean -nd -e **/.gitignore
However, as a rule, I think it would be advisable to do any of these:
- Commit the file
.gitignore. If the rules of ignoring are useful for everyone who uses the repo, then it makes sense to press it on the remote. git cleanwill not delete committed files. - ,
.git/info/exclude .gitignore. ( gitignore)