github/gitignore · Unity.gitignore

Unity .gitignore 템플릿 해설

Unity.gitignore가 Library·Temp·Obj·Build·Logs·UserSettings와 자동 생성 IDE 파일을 무시하는 이유, 그리고 .meta 파일은 반드시 커밋해야 하는 이유를 설명합니다.

생성기에서 열기 VisualStudio, Windows, macOS, JetBrains 함께 열기

Unity.gitignore는 Unity 프로젝트 루트에 두는 것을 전제로 한다. 템플릿의 폴더 규칙이 /[Ll]ibrary/처럼 /로 시작해 프로젝트 루트에 고정되어 있기 때문에, 저장소 하위 폴더에 Unity 프로젝트가 있다면 경로를 맞게 고쳐야 한다.

Unity 에디터는 에셋을 가져올 때 거대한 캐시(Library)를 만들고, 스크립트 IDE용 솔루션 파일도 자동으로 생성한다. 이 템플릿은 그런 재생성 가능한 파일을 막고 Assets, Packages, ProjectSettings만 공유되도록 돕는다.

규칙별 해설

패턴무엇을, 왜 무시하나
/[Ll]ibrary//[Tt]emp//[Oo]bj//[Ll]ogs/.utmp/에디터 캐시·임시 폴더에셋 임포트 결과와 컴파일 캐시다. 수 GB가 되기도 하며 Unity가 프로젝트를 열 때 다시 만든다.
/[Bb]uild//[Bb]uilds/*.apk*.aab*.app*.unitypackage빌드 결과플레이어 빌드와 내보낸 패키지다. 배포 파일은 저장소가 아니라 릴리스로 관리한다.
/[Uu]ser[Ss]ettings/*.user*.userprefs*.suo.vs/개인 설정에디터 레이아웃과 개인 설정, Visual Studio 사용자 파일이다.
*.csproj*.unityproj*.sln*.slnx자동 생성 IDE 파일Unity가 스크립트 편집기를 위해 매번 다시 만드는 프로젝트·솔루션 파일이다. 커밋하면 사람마다 경로가 달라 충돌이 잦다.
*.pdb*.mdb*.pdb.meta*.mdb.meta디버그 심볼Mono·.NET 디버그 정보와 그 메타 파일이다.
/ServerData/[Aa]ssets/StreamingAssets/aa*/[Aa]ssets/AddressableAssetsData/link.xml*Addressables·Visual Scripting 생성물Addressables 빌드 결과와 자동 생성 링크 파일이다. 빌드 때마다 새로 만들어진다.
*.blend1*.blend1.metasysinfo.txtcrashlytics-build.properties/[Mm]emoryCaptures//[Rr]ecordings/기타Blender 백업 파일, 크래시 리포트 부산물, 메모리 프로파일러 캡처, Recorder 결과다.

실무에서 주의할 점

원본 템플릿

Unity.gitignore규칙 58줄
# This .gitignore file should be placed at the root of your Unity project directory## Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore## Recommended: add any editor/OS/tool-specific ignore rules from the Global/ templates as needed.# See: https://github.com/github/gitignore/tree/main/Global#.utmp//[Ll]ibrary//[Tt]emp//[Oo]bj//[Bb]uild//[Bb]uilds//[Ll]ogs//[Uu]ser[Ss]ettings/*.log# By default unity supports Blender asset imports, *.blend1 blender files do not need to be commited to version control.*.blend1*.blend1.meta# MemoryCaptures can get excessive in size.# They also could contain extremely sensitive data/[Mm]emoryCaptures/# Recordings can get excessive in size/[Rr]ecordings/# 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*# Jetbrains Rider personal-layer settings*.DotSettings.user# Visual Studio cache directory.vs/# Gradle cache directory.gradle/# Autogenerated VS/MD/Consulo solution and project filesExportedObj/.consulo/*.csproj*.unityproj*.sln*.slnx*.suo*.tmp*.user*.userprefs*.pidb*.booproj*.svd*.pdb*.mdb*.opendb*.VC.db# Unity3D generated meta files*.pidb.meta*.pdb.meta*.mdb.meta# Unity3D generated file on crash reportssysinfo.txt# Mono auto generated filesmono_crash.*# Builds*.apk*.aab*.unitypackage*.unitypackage.meta*.app# Crashlytics generated filecrashlytics-build.properties# TestRunner generated filesInitTestScene*.unity*# Addressables default ignores, before user customizations/ServerData/[Aa]ssets/StreamingAssets/aa*/[Aa]ssets/AddressableAssetsData/link.xml*/[Aa]ssets/Addressables_Temp*# By default, Addressables content builds will generate addressables_content_state.bin# files in platform-specific subfolders, for example:# /Assets/AddressableAssetsData/OSX/addressables_content_state.bin/[Aa]ssets/AddressableAssetsData/*/*.bin*# Visual Scripting auto-generated files/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Flow/UnitOptions.db/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Flow/UnitOptions.db.meta/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Core/Property Providers/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Core/Property Providers.meta# Auto-generated scenes by play mode tests/[Aa]ssets/[Ii]nit[Tt]est[Ss]cene*.unity*# UI Toolkit auto generated files/UIElementsSchema/# Auto-generated cache in Assets folder/[Aa]ssets/[Ss]ceneDependencyCache*

템플릿 출처: github/gitignore/Unity.gitignore @356fd7b (2026-09-11) · CC0-1.0

함께 쓰는 템플릿

다른 템플릿 해설