【问题标题】:What does your .gitignore file look like for a Unity project?Unity 项目的 .gitignore 文件是什么样的?
【发布时间】:2017-03-09 15:55:24
【问题描述】:

我刚开始使用 Unity,我注意到即使是小的代码更改也会导致 git diff 很大。

原来,我的.gitignore 有这个: Temp/

但它并没有做太多繁重的工作。

我在 Github 上找到了这个 .gitignore template ,但我很好奇是否有其他人使用它——无论是作为起点还是原样。

【问题讨论】:

标签: unity3d unity5 unity2d


【解决方案1】:

我以前使用相同的 .gitignore 完全没有问题,按原样。适用于 macOS 和 Windows。

/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/Assets/AssetStoreTools*

# Visual Studio 2015 cache directory
/.vs/

# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb


# Unity3D generated meta files
*.pidb.meta

# Unity3D Generated File On Crash Reports
sysinfo.txt

# Builds
*.apk

【讨论】:

  • 正如链接副本中提到的,您要做的另一件事是设置Force Text Asset Serialization,以便在您进行 git 签入时使资产对 diff 更加友好。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-08-11
  • 2011-03-05
  • 1970-01-01
  • 2017-01-10
  • 2016-03-14
  • 2022-07-21
  • 1970-01-01
相关资源
最近更新 更多