참조: https://blog.naver.com/bestmic/220939712681
프로젝트 진행시 Submodule을 잘못된 경로에 Git을 땡겨왔다.
파인더에서 직접 삭제하고 다시 땡기려고 했더니..
"already exists in the index"
터미널에서도 지워도 똑같다.
검색 고고.
캐쉬가 남아서란다. 캐쉬를 지우자.
1. 캐쉬가 남아있는지 확인
git ls-files --stage 지우고자하는 폴더경로]
2. 아래와 같이 캐시가 메모리에 남아있는게 보인당. 저런..
160000 c29ead11ca8173936908d9130d57ac325e0a0b83 0 [폴더경로]
3. 캐시삭제
git rm --cached 지우고자하는 폴더경로
다시 땡겨오면 잘 땡겨와짐.
출처
http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index
'개발관련 > 기타' 카테고리의 다른 글
Prisma - 객체 간의 관계 설정, 1:N, 1:1, N:M (0) | 2024.09.26 |
---|---|
git cannot lock, cannot create 에러 (0) | 2024.09.25 |
Git Submodule (0) | 2024.09.09 |
Git Alias (0) | 2024.09.09 |
[vscode] 영역 접고 펴기 (0) | 2022.02.03 |