Ignoring folder meta files on version control

Unity creates and deletes meta files for folders inside the Asset folder.

That can create an annoying situation when using version control (that you can skip and go to the questions): someone creates a folder of files that will be ignored but forget to ignore the folder’s meta file. Unity creates the meta file and the person adds the meta to version control. Another person gets the changesets and, since he doesn’t have the folder, his Unity delete the meta file and he removes the meta file from version control. Not everyone in the team understand this, so the process is perpetuated in a loop from hell.

Surprisingly this happens all the time. So, two questions:

  1. Is it important to version folder meta files?
  2. Is there a way to automatically ignore folder meta files - particularly on git or mercurial?

I made the same question on StackOverflow and got a very good answer that you can check here.

Add this to .getignore

#Ignore all .meta file
*.meta
#But not source file with postfix. which is everything but a folder
!*.*.meta

This will ignore file without postfix. But that shouldn’t hurt.