The definitive .gitignore for Unity projects
[UPDATE] Updated to support the new Unity 5.2 Visual Studio integration
After make a research about the a .gitignore for Unity projects, I ended up with several options.
- Inside Unity, go to Edit >Project Settings > Editor
- On Version Control, choose either Visible Meta Files or Hidden Meta Files. The difference is oly if the files will be hidden on Explorer or not.
- If you have Unity3D Pro, optionally you can change the Asset Serialization mode to Force Text too.
This is enough inside Unity.
After that, create a .gitignore file in your project root folder that looks like this:
You can copy and paste the above code or you can download it here: unity-gitignore.
Using External Version Control Systems with Unity