unity项目gitignore如何设置
时间: 2023-10-18 17:13:09 浏览: 147
Scorpio-CSharp-unity
1. 打开Unity项目所在的文件夹。
2. 创建一个名为“.gitignore”的文本文件。
3. 将以下内容复制到.gitignore文件中:
```
# Unity generated folders
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/
# Asset meta data should only be ignored when the corresponding asset is also ignored
!/[Aa]ssets/**/*.meta
# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*
# Autogenerated Jetbrains Rider plugin
/[Aa]ssets/Plugins/Editor/JetBrains*
# Visual Studio cache directory
.vs/
# Gradle cache directory
.gradle/
# External tooling configuration
/.idea/
# Generated by Visual Studio
ExportedObj/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
# Builds
*.apk
*.aab
*.unitypackage
# Crashlytics generated file
crashlytics-build.properties
# Android generated build folder
/Temp/
/UnityTemp/
/Assets/Plugins/Android/
```
4. 保存并关闭文件。
5. 将.gitignore文件添加到Git仓库中。
阅读全文