Visible or hidden meta files with Git?

Hi! I’m setting up a Unity project using Git as an external version control system.

I started by reading a tutorial provided by Unity, which suggests using hidden meta files:
http://unity3d.com/learn/tutorials/modules/beginner/architecture/folders-in-version-control

However, the Unity documentation clearly suggests using visible meta files:
http://docs.unity3d.com/Manual/ExternalVersionControlSystemSupport.html

So, which one would be the most recommended option to choose, visible or hidden meta files, especially now with Unity 5?

1 Answer

1

Use visible meta files, and commit them in GIT, if you don’t do this, the next person or computer who gets the solution will generate new meta files because it can’t find any.

Each meta file has a certain guid which is used to reference to the correct assets. The next time anything searches for this reference, it won’t be found and your scene will be broken.

For scripts you will get something like “Missing script”

Thank you for the answer! I'll go with visible meta files.

–

Thank you for explaining this. I have not been committing *.meta because all the .gitignore templates I saw showed ignoring them, and I have been having all kinds of issues like you mentioned of missing scripts, etc.

–

having the same question,thanks for the answer,helps a lot!

–

While ThomasVandenberghe's answer is absolutely right, metas for some file types can be added to gitignore. For example adding *.aar.meta or *.jar.meta to gitignore is safe because Unity don't reference android and java archives directly from editor and do not add any configuration to those files

–