[Git] .gitignore가 동작 안할 때 해결법

Updated:

상황. 모든 파일에 대해서 git의 추적을 없앨 경우

해결법

  1. .gitignore 파일 작성 (수정 및 확인)
  2. 무시하고자 하는 파일을 제외하고 commit (파일이 날아가기 때문)
  3. 루트 폴더(repo 최상위)에서 cmd창에 git rm -r --cached . 입력
  4. git add -A 입력
  5. git commit -m "gitignore 적용" 입력

Tags:

Categories:

Updated:

Leave a comment