转自: http://answers.unity3d.com/questions/22604/which-unity-project-files-can-be-ignored-for-versi.html
For Unity 3 and 4:
-
Go to Edit>Project Settings>Editor
-
In the inspector, change Version Control Mode to "Visible Meta Files"
-
If you have pro, change Asset Serialization Mode to Force Text
This will ensure that all your metadata is set in local metadata files, instead of in your Library folder. At this point, the Library folder becomes unnecessary to keep synced between users.Now you can ignore these files in your preferred version control, including the entire Library folder:
file .gitignore :
/Temp/
/Library/
/Obj/
/.vs/
/*.csproj
/*.unityproj
/*.sln
/*.user
/*.userprefs
/*.DS_store