Recent Posts
Recent Comments
Link
Today
Total
05-20 04:43
관리 메뉴

채린씨의 티스토리

[Git] .gitignore가 적용되지 않을 때 본문

Git

[Git] .gitignore가 적용되지 않을 때

채린씨 2022. 3. 24. 22:30

.gitignore 파일을 만들었는데도 적용되지 않는 경우에는 캐시가 원인일 수 있다.

이럴 때는, 캐시 내용을 모두 삭제한 후 다시 모든 파일을 add 해주고 커밋하면 된다!

 

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

 

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

 

.gitignore is ignored by Git

My .gitignore file seems to be being ignored by Git - could the .gitignore file be corrupt? Which file format, locale or culture does Git expect? My .gitignore: # This is a comment debug.log nbpr...

stackoverflow.com

 

 

 

Comments