[Git] .gitignore 파일이란?
gitignore 이란?
프로젝트 내 다양한 설정 파일, 컴파일된 파일 등 굳이 버전관리가 필요 없는 파일들이 있다.
해당 파일들이 git commit 목록에 계속 보여진다면 불편할 것이다.
이러한 문제를 해결하기 위해, gitignore 파일을 통해 버전관리가 필요없는 파일들을 제외할 수 있다.
프로젝트의 root에 .ignore파일이 위치해야 인식한다.
gitignore 작성 방법
제외할 파일의 패턴을 작성한다.
https://git-scm.com/docs/gitignore
Git - gitignore Documentation
The optional configuration variable core.excludesFile indicates a path to a file containing patterns of file names to exclude, similar to $GIT_DIR/info/exclude. Patterns in the exclude file are used in addition to those in $GIT_DIR/info/exclude.
git-scm.com
gitignore.io
자주 사용하는 gitignore 파일 패턴을 자동으로 생성해주는 사이트이다.
해당 사이트에서 프로젝트의 성격을 작성한 후 gitignore 파일을 생성하여 커스터마이징 하면 편리하다.
https://www.toptal.com/developers/gitignore
gitignore.io
Create useful .gitignore files for your project
www.toptal.com
운영체제, 소스, 빌드 환경 입력
파일 생성 확인