본문 바로가기

GIT

git ignore 적용이 안될 때 - GIT delete cache / Git ignore 파일 생성하기

by engineer M 2019. 12. 23.

After you put more elements to your .gitignore list, sometimes git add . don't work like expected.

In that case, 

 

delete cache first and then try git add again. 

 

(check git status to see the changed file) 

 

.gitignore 파일을 새로 설정한 후에, git add . 를 하면 바꾼 gitignore내용이 반영이 안되는 경우가 있습니다. 이 때에는 다음과 같이 해결할 수 있습니다. (캐시 파일 지우기)

 

git rm -r --cached .
git add .
git commit -m "clear cached"

 

'GIT' 카테고리의 다른 글

VIM 에디터 사용하기, VIM 명령어  (0) 2020.02.15

댓글