본문 바로가기
개발/IT 기타

git 의 .gitignore가 작동하지 않을때 해결방법

by 얼굴값하는사람 2024. 2. 14.
반응형

.git ignore 가 작동하지 않을때 대처법

 

.gitignore가 제대로 작동되지 않아서 ignore 처리된 파일이 changes 에 나올때가 있습니다.
아래 명령어로 캐시 내용을 전부 삭제 후 다시 add 해서 커밋하시면 됩니다.

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

 

참고자료

 

https://stackoverflow.com/questions/11451535/gitignore-is-ignored-by-git

https://stackoverflow.com/questions/25436312/gitignore-not-working

 

반응형