-
gitignore 생성 ( spring legacy )Spring 2023. 5. 14. 18:03
지난번 팀 프로젝트 때, gitignore 파일을 생성하지 않아서 팀원들이 commit 할 때 pom.properties이 저장소에 저장되는 바람에 version이 맞지 않아 골치아픈 경우가 생겼었다.
이번에는 spring legacy project를 생성하고 pom.properties 파일을 gitignore 파일에 추가해서 이런 불상사를 막아보자.
방법
생성한 프로젝트를 git 저장소와 연동하면, team 탭이 활성화 되고,
무시하고자 하는 파일을 다음과 같이 눌러서 지정하면 된다.
다음의 경로에 gitignore이 자동으로 생성되고, 무시할 파일의 이름이 추가되어 있다.
이제는 pom.properties 파일을 추가하고 commit 해도 자동으로 무시할 것이다.
** 이미 git에 올라가 있는 파일의 경우, gitignore에 추가해도 commit 되는 것을 주의하자.
프로젝트를 생성하고 git에 처음 올릴 때 신중하게 준비해서 올리는 것이 좋다
'Spring' 카테고리의 다른 글
API 키 숨기기 ( Spring Legacy 에서 properties 이용하기 ) (0) 2023.05.14 게시판 파일첨부 ( 2. DB에 저장 및 detail에 Attach ) (0) 2023.04.14 게시판 파일 첨부 (1. 파일을 임시 보관소에 저장하기 ) (0) 2023.04.14 ajax (0) 2023.04.10 회원가입, 로그인, 게시판 백엔드 실습( 댓글 리스트 , pagenation ) (0) 2023.04.06