포스트

gitignore 파일 작성, Unity gitignore template

유니티 프로젝트의 버전 관리에 매우 효과적인 방법은 깃허브에 기록하는 것인데요, 깃허브에 필요없는 파일까지 업로드를 하면 매번 커밋할 때마다 필요없는 파일까지 추적을 하게 되어 나중에 필요한 백업 지점을 찾는데에 힘들겠죠? 그리고 보안 상 올리면 안되는 파일도 있을 텐데요, 그런걸 관리하기 위해 gitignore파일을 root폴더에 작성해서 커밋을 해줍니다.

유니티 프로젝트에서 사용할 수 있는 gitignore파일의 템플릿을 가져와보았습니다. 바로 깃허브 공식 gitignore레포지토리에 있습니다. 유니티 말고도** go, godot, java, unrealEngine** 등 눈에 익은 것들도 보이는군요.

유니티 프로젝트에 넣을 '.gitignore'입니다. library, temp, build, logs 등은 명시해주어서 커밋할 때 무시하도록 하는군요. 그 외에도 .sln처럼 C#프로젝트 관련 파일도 들어있습니다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# 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
#
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Uu]ser[Ss]ettings/

# 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*

# Visual Studio cache directory
.vs/

# Gradle cache directory
.gradle/

# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.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 reports
sysinfo.txt

# Builds
*.apk
*.aab
*.unitypackage
*.app

# Crashlytics generated file
crashlytics-build.properties

# Packed Addressables
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*

# Temporary auto-generated Android Assets
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*

https://github.com/github/gitignore

GitHub - github/gitignore: A collection of useful .gitignore templates A collection of useful .gitignore templates. Contribute to github/gitignore development by creating an account on GitHub. A collection of useful .gitignore templates. Contribute to github/gitignore development by creating an account on GitHub.

감사합니다.

sticker

이 기사는 저작권자의 CC BY 4.0 라이센스를 따릅니다.