I would like to exclude all the .git and .svn folders on my hardrive from the Spotlight index. I know I can manually add them through the GUI but since they are many of them, and often new ones, it would be difficult.
Is there any way to exclude a folder by name (rather than full path)? Or is there any way to exclude the folders using the command line (in which case, I could automatically find them and exclude them from time to time)?