git ignore 사용법

Dr.Green·2022년 3월 8일
0

git ignore 파일로 안올릴 파일 대상 선정 관리

  • 작성법
# /xxx/ 디렉토리 전부
/target/
/Users/
/.DS_Store
/.settings/
/.classpath
# /test.js 파일하나 지정
/.project
  • 이미 Git 있는 파일을 제거하려면
### 원격의 모든 관리 대상 파일 이력 삭제
$ git rm -r --cached .
### 현재 기준 추가
$ git add .
### 현재 기준 관리 대상 다시 commit
$ git commit -m "apply  ignore again"
### 원격에 push 
$ git push
profile
모바일 퍼스트

0개의 댓글