티스토리 뷰


유용한 사이트들을 공유하는 게시글이며 만료된 레퍼런스에 대해 지적 및 수정 요청을 하실 수 있습니다




동기


 얼마 전에 함께 프로젝트를 진행하면서, 따로 브랜치를 하지 않고 GIT이 설정되지 않은 폴더에서 작업하다가 이를 한꺼번에 로컬에 올려서 커밋한 적이 있었다. 꽤나 상당한 용량의 작업물이었기에 푸쉬만 10시간 넘게 하더니 원격 저장소 용량을 초과했다는 성의없는 에러 메시지 하나만을 출력하여 멘탈을 터뜨린 적이 있었다. 


 비트버킷이 2GB의 프리 저장소만 제공하는 터라, 이전에도 소수의 LFS 파일에 의해 잦은 폭파가 일어나서 새삼스러울 건 없었지만, 시간은 너무 아쉬웠다. 아는 후배는 .gitignore를 통해 필요없는 데이터 파일들을 git에서 제거해줄 필요가 있다고 하였고, 이를 계기로 .gitignore에 대한 존재를 알았다.


 문제는 내가 진행중인 프로젝트의 무엇을 제외하고 무엇을 포함해야하는 지를 모른다는 것이었다. 그래서 인터넷을 뒤져가며 해당 작성자가 쓰는 파일을 그대로 긁어와서 사용하고는 했다.


 이번에도 새로운 저장소 구축을 목적으로 .gitignore를 설정하기 위해 인터넷을 살펴보던 중 괜찮은 사이트가 있어 하나를 소개하고자 한다.




gitignore.io



사용법이 너무 쉬워서 누구나 직관적으로 이용할 수 있지만 간단하게 쓰고자 한다.

1. 사이트에 접속한다. (https://www.gitignore.io)
2. 현재 프로젝트에서 사용중인 운영체제 또는 통합 개발 환경 또는 프로그래밍 언어 등을 기재한다.
3. Create
4. 긁어서 .gitignore로 생성한다.

혹시라도 감이 안 잡히시는 분들을 위해 몇가지 실행결과를 첨부합니다.


[2019.10.18 내용 추가]


꽤 오래 전에 쓴 글인데, 꾸준히 읽어주셔서 글을 보충할 필요가 있어서 내용을 추가하고자 합니다. 이 글을 포스팅하고 많은 시간이 지났습니다. 제가 몰랐던 것도 있었고, 바뀐 것도 있어서 이를 정리하고자 합니다.


1. GitHub에서 오래 전부터 레포지토리를 GitHub를 통해 생성할 때, 하단에 자동으로 gitignore 파일을 간편하게 설정할 수 있는 기능을 사용할 수 있습니다. 

2. 아래 예시로 첨부된 각종 디렉토리, 또는 파일들은 .git 폴더 기준으로 레퍼런싱하는 상대 경로입니다. 따라서 여러분들이 git 저장소 내에 커스텀 디렉토리를 생성했고, 거기에 해당 프레임워크 등을 보관하고 있다면 gitignore에서 상대경로를 반드시 수정해주셔야 합니다.

- 예시 : .git이 있는 디렉토리에 "Minusi"라는 폴더가 있고, 그 안에 언리얼 엔진 프로젝트가 들어가있으면, 아래 키워드는 Minusi/[Dd]ebug/ 이런 식으로 바꿔줘야 합니다. 그렇지 않으면, git에 제대로 ignore가 적용되지 않습니다.






#1. Visual Studio 키워드




Visual Studio 키워드에 대한 .gitignore 


# Created by https://www.gitignore.io/api/visualstudio

### VisualStudio ###
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/

# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb

# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding add-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# Visual Studio code coverage results
*.coverage
*.coveragexml

# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Uncomment the next line to ignore your web deploy settings.
# By default, sensitive information, such as encrypted password
# should be stored in the .pubxml.user file.
#*.pubxml
*.pubxml.user
*.publishproj

# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets

# Microsoft Azure Build Output
csx/
*.build.csdef

# Microsoft Azure Emulator
ecf/
rcf/

# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/

# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs

# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf
*.ndf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# GhostDoc plugin setting file
*.GhostDoc.xml

# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/

# Typescript v1 declaration files
typings/

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions

# Paket dependency manager
.paket/paket.exe
paket-files/

# FAKE - F# Make
.fake/

# JetBrains Rider
.idea/
*.sln.iml

# CodeRush
.cr/

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc

# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config

# Telerik's JustMock configuration file
*.jmconfig

# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs

### VisualStudio Patch ###
# By default, sensitive information, such as encrypted password
# should be stored in the .pubxml.user file.

# End of https://www.gitignore.io/api/visualstudio


#2. Unreal Engine 키워드에 대한 .gitignore

# Created by https://www.gitignore.io/api/unrealengine

### UnrealEngine ###
# Visual Studio 2015 user specific files
.vs/

# Visual Studio 2015 database file
*.VC.db

# 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.opendb

# Precompiled Assets
SourceArt/**/*.png
SourceArt/**/*.tga

# Binary Files
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/*

# Cache files for the editor to use
DerivedDataCache/*

# Plugin Intermediate and Binary folders
Plugins/*/Intermediate/*
Plugins/*/Binaries/*

# End of https://www.gitignore.io/api/unrealengine


#3. Windows 키워드에 대한 .gitignore

# Created by https://www.gitignore.io/api/windows

### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.gitignore.io/api/windows

'기타 > 레퍼런스' 카테고리의 다른 글

무료 폰트 사이트 눈누(Noonnu)  (0) 2019.12.17
논문 참고 사이트  (0) 2019.10.18
무료 3D 모델링 레퍼런스 사이트  (0) 2017.10.07
댓글