aotoyae

[Git] does not have a commit checked out / git 에러 본문

Git

[Git] does not have a commit checked out / git 에러

aotoyae 2023. 9. 11. 21:12

 

 

git add  입력 후

does not have a commit checked out 라고 뜨며 에러 발생

 

해결법 >> 저장소에 중복된 .git 폴더 삭제

 

깃허브 저장소를 만들어둔 폴더(finder)에 들어가

"command + shift +. "키를 누르면 숨겨져 있던 .git 폴더가 나타난다

 

hello 폴더 안 bye 폴더의 파일을 업로드 할 시

hello/bye/.git 을 삭제한다

hello/.git 은 삭제하면 ❌❌❌

 

다시 git add를 입력하면 에러 해결