gitignore는 파일을 무시하지만, 예외처리를 통해 특정 파일들은 추적 및 관리할 수 있게 합니다.
💬 서론
- gitignore에서 무시된 특정 확장자 중 특정 폴더내의 모든 파일을 예외처리하고싶다면 다음과같이 작성할 수 있습니다.
⚒️ 작성
# 특정 폴더에 대한 gitignore 규칙 무시
!/CSharp_SocketServer/**
!/CSharp_WebServer/**
- 파일의 맨 마지막에 작성하였습니다.
- !로 시작을 합니다.
- 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
Assets/.DS_Store
.DS_Store
# 특정 폴더에 대한 gitignore 규칙 무시
!/CSharp_SocketServer/**
!/CSharp_WebServer/**
- 유니티 프로젝트에서 .sln파일은 무시되나, 소켓서버를 구축하기위한 프로젝트의 .sln도 무시되기에 이를 예외처리하여 포함시키고자 작성하였습니다.
'기타 > 개발 지식' 카테고리의 다른 글
[깃허브 데스크톱] 3. 협업, Branch (0) | 2022.11.02 |
---|---|
[깃허브 데스크톱] 2. 프로젝트 동기화 및 되돌리기 (0) | 2022.11.02 |
[깃허브 데스크톱] 1. 프로젝트 생성 및 업로드 (0) | 2022.11.02 |
Splines Bézier Curves (베지에 곡선) (0) | 2022.08.19 |