In a project I am working on I am using git and eclipse, eclipse creates a .project file in the project root. When I do a git clean I do not want to remove this file as I have to create this again.
I do want git clean to remove excluded files and directories (since compiled files are excluded).
Normally I do git clean -xdf which suits my needs, however I have to exclude the .project file each time (git clean -xdf -e .project).
Simply putting the .project in a (global) gitignore file doesn't do the trick, prefixing it with a ! also doesn't quite fix this as it then shows up in git status.
So I'm looking to exclude instead of ignore, but I cannot find a git-clean-exclude setting. Did anyone ran into this, and if so how did they solve it?