Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

FYI: Spotlight doesn't index .git directories

This is to save you the couple hours I just wasted:


Apparently Spotlight (OS X 10.10.2 as of now) doesn't index the contents of folders ending with ".git". Unlike the equivalent ".noindex" extension, this appears to be completely undocumented; a cute little surprise from Apple devs to non-Apple devs.


This is probably to prevent ".git" directories inside git repos from being indexed and cluttering up Spotlight with gazillions of useless (from a Spotlight perspective) files. Matching ".git" as a suffix instead of an exact-match is a problem however, since it can easily match repo names if a user chooses to name his/her directories "myproject.git".


The one upside of this is that I discovered and fixed some disk corruption during my investigation of disk problems, POSIX permissions, ACLs, Spotlight indices, etc. #thinsilverlining

Posted on Mar 31, 2015 4:41 PM

Reply
4 replies

FYI: Spotlight doesn't index .git directories

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.