본문 바로가기
Git

[Git] .gitignore

by 카피마스터 2023. 6. 3.

git 관리 목록에서 제외

주석은 #을 사용

 

.gitignore

#특정 디렉토리와 하위 파일들 제외

build/

 

# 모든 test.cpp 파일 관리 제외

test.cpp

 

#최상위 경로의 test.cpp 파일만 제외

/test.cpp

 

#source 디렉토리의 test.cpp 파일만 제외

source/test.cpp

 

# 모든 test.cpp파일이 관리 제외 대상이지만 source2/test.cpp는 관리 대상 설정

test.cpp

!source2/test.cpp

 

#모든 cpp 확장자 제외

*.cpp