[ERROR] does not have a commit checked out / adding files failed

2023. 4. 16. 14:37WEB개발/에러정리

반응형

git add 명령어를 실행할 때, 밑과 같은 오류 발생

error: [FILE-PATH] does not have a commit checked out
fatal: adding files failed

 

에러 원인: 로컬 저장소에 중복된 .git 파일이 있어 Git 혼란 발생

해결 방법: 중복된 .git 파일 제거

 

ex) A파일에 .git 파일이 있고, A파일 내에 존재하는 B파일에도 .git 파일 존재하는 경우

        => B파일 내 .git 파일 삭제

 

 

 

반응형