LoginSignup
167
150

More than 5 years have passed since last update.

Unity向け .gitignoreの設定について

Last updated at Posted at 2014-07-27

Unity向け.gitignoreについて

色々なところに Unityで、version管理されるべきではないファイルについての記述があるが、分散しており、また古い情報もあるようなのでまとめる。

一次情報

Unity documentation - Using External Version Control Systems with Unity

間違いなくこれがUnityのオフィシャルの説明なので、一番正しいはず。

大分正しい情報, 合っている(と思われる情報)

http://kleber-swf.com/the-definitive-gitignore-for-unity-projects/
こちらは基本的にはあっている。

https://github.com/github/gitignore/blob/master/Unity.gitignore
こちらも十分正しい

間違っている(と思われる情報)

/Library/metadata/*をignoreするとマズイ
上記が記載されているwebsiteをいくつか見たのだが、オフィシャルの説明でLibraryをignoreしろと書いてある以上、正しいとは思えない。

個人的に足したほうが良いと思っている設定(必須ではない)

*.log
各種プラグインなどが作成することがあり、大体がログとして使われるファイルなので、version controlされるべきではない事が多い

*.pyc
こちらも各種プラグインで勝手に作成されることがある。本来はpython でのコンパイルされたbytecodeのcacheであり、コミットされても被害は少ないのだが、気持ち悪いのでcommitされていない方が良いと思う

個人用.gitignore
上記klever-swf.comをベースにいくつか必要だと思う設定を足して使っている。

.gitignore
# =============== #
# Unity generated #
# =============== #
Temp/
Obj/
UnityGenerated/
Library/

# ===================================== #
# Visual Studio / MonoDevelop generated #
# ===================================== #
ExportedObj/
*.svd
*.userprefs
*.csproj
*.pidb
*.suo
*.sln
*.user
*.unityproj
*.booproj

# ============ #
# OS generated #
# ============ #
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db

# ============ #
# for others   #
# ============ #

*.log #log files, for some plugins
*.pyc #python bytecode cache, for some plugins.
sysinfo.txt #Unity3D Generated File On Crash Reports
167
150
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
167
150