.gitignore에 등록된 파일들은 걸러져 깃 서버에 올라가지 않는다.
.git 파일이 있는 폴더에 .gitignore 파일을 추가하고 푸시하면 적용된다.
코드 규칙
표준 Glob 패턴으로 작성
# : 주석
/ : 디렉토리 간 구분
! : 이전 패턴을 상쇄하고 해당 파일은 무시하지 않음
* : /를 제외한 모든 것
? : /를 제외한 한 글자
** : 디렉토리 사이의 전체 경로
bar : 디렉토리 위치에 관계 없이 bar라는 디렉토리 하위의 파일 혹은 디렉토리만
/bar : 현재 디렉토리 (.gitignore 위치) 에 위치한 bar 하위의 파일 혹은 디렉토리만
bar/ : bar라는 디렉토리에만 (파일 제외)
예)
*.bar : 확장자가 .a인 모든 파일 무시
folder_name/ : 해당 폴더의 모든 파일 무시
folder_name/*.bar : 해당 폴더의 확장자가 .a인 모든 파일 무시
folder_name/**/*.bar : 해당 폴더를 포함하여 하위 모든 폴더의 확장자가 .a인 모든 파일 무시
/*.bar : 현재 폴더의 확장자가 .a인 모든 파일 무시
유니티 프로젝트에서 임시 파일을 제외해주는 .gitignore
# Created by https://www.toptal.com/developers/gitignore/api/unity
# Edit at https://www.toptal.com/developers/gitignore?templates=unity
### Unity ###
# 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/*
# End of https://www.toptal.com/developers/gitignore/api/unity
언리얼 프로젝트의 임시 파일을 제외하는 .gitignore
# Visual Studio 2015 user specific files
.vs/
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
*.ipa
# These project files can be generated by the engine
*.xcodeproj
*.xcworkspace
*.sln
*.suo
*.opensdf
*.sdf
*.VC.db
*.VC.opendb
# Precompiled Assets
SourceArt/**/*.png
SourceArt/**/*.tga
# Binary Files
Binaries/*
Plugins/*/Binaries/*
# Builds
Build/*
# Whitelist PakBlacklist-<BuildConfiguration>.txt files
!Build/*/
Build/*/**
!Build/*/PakBlacklist*.txt
# Don't ignore icon files in Build
!Build/**/*.ico
# Built data for maps
*_BuiltData.uasset
# Configuration files generated by the Editor
Saved/*
# Compiled source files for the engine to use
Intermediate/*
Plugins/*/Intermediate/*
# Cache files for the editor to use
DerivedDataCache/*
'게임 개발 > 기타' 카테고리의 다른 글
게임 컨퍼런스, 기술, 기획적 분석 채널 모음 (0) | 2024.03.07 |
---|---|
프로그래밍 필독서 (1) | 2024.01.15 |