leeda-cloud

[Git] not a git repository (or any of the parent directories): .git 해결법 본문

에러

[Git] not a git repository (or any of the parent directories): .git 해결법

leeda-cloud 2023. 1. 5. 11:10

git add를 하는 과정에서 뜬 에러!

fatal: not a git repository (or any of the parent directories):. git

찾아보니  현재 폴더에 git에 대한 정보가 없어서 뜬다고 한다.

 

이것을 해결하기 위해 다시 폴더에 git init 후 git과 폴더를 연결해줘야 한다.

git init
git remote add origin [GitHub주소]

 

왜 잘 되다가 갑자기 뜨는 건지는 모르겠지만 다시 연결해 주니 잘 작동된다.

 

 

Comments