Reputation: 15069
I am on a Mac developing an OS X app with some C/C++ code. I recently added some files to my repository and their duplicate files are showing up as ._name
.
I looked up my .gitignore file and it has .DS_Store
and few other filters but nothing preventing these ._
files.
Is this the right way to add
._*
to my gitignore to prevent these irrelevant files going into repo?
Upvotes: 10
Views: 5306
Reputation: 43334
On Mac OS, the finder can in some cases create ._
files that hold some Mac OS specific file information. See https://apple.stackexchange.com/questions/14980/why-are-dot-underscore-files-created-and-how-can-i-avoid-them for details.
However these are OS specific files, and therefore should not be checked into version control anyway.
So a ._*
line in your gitignore will not only ignore your duplicate ._name
files, but the other files it might find that match that pattern need not be checked into version control anyway (apart from any files that you create yourself that match ._*
. In that case you could add an exception in the .gitignore).
Other than that, there is nothing to be found of any other file extensions that start with ._
. See e.g.
So yes, it is safe to ignore ._*
.
Upvotes: 12