Git - .ignore 파일이 적용 안되는 현상 해결

Hyunjun Jang·2021년 9월 19일

.gitignore 파일에 추가했는데도 Commit 대상에서 제외가 안되는 경우가 있다.

해결방법

git의 캐시가 문제가 되는거라 아래 명령어로 캐시 내용을 전부 삭제후 다시 추가해주면 정상 작동한다.

$ git rm -r --cached .
$ git add .
$ git commit -m "fixed untracked files"
$ git push

Reference

https://jojoldu.tistory.com/307

profile
Let's grow together😊

0개의 댓글