1

I'm starting out with Unity and I've noticed that even with small code changes result in a large git diff.

Originally, my .gitignore just had this: Temp/

but it's not doing much heavy lifting.

I found this .gitignore template on Github, but I'm curious if anyone else uses this--either as a starting point or as-is.

Ben Downey
  • 2,575
  • 4
  • 37
  • 57

1 Answers1

5

I use to use that same .gitignore with no issues at all, as-is. Works on both macOS and 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
  • 3
    As mentioned in the linked duplicate, the other thing you will want to do is set [Force Text Asset Serialization](https://i.stack.imgur.com/luaOL.png) to make assets much more friendly to diff when you do a git check-in. – Scott Chamberlain Mar 09 '17 at 17:43