fatal: not a git repository 는
현재 폴더가 Git 저장소가 아니거나, .git 디렉터리를 찾지 못할 때 발생한다.
git status
fatal: not a git repository (or any of the parent directories): .git보통 아래 경우이다.
- Git 저장소 바깥 폴더에서 명령 실행
cd를 잘못해서 다른 폴더에 들어감.git폴더가 삭제됨- 압축 해제만 하고 clone 안 한 폴더에서 Git 명령 실행
pwdls -alls -al .gitcd <repository directory>
git statusgit initgit clone <repository URL>
cd <repository name>.git 을 지우면 Git 기록이 날아간다.
그 경우 보통 다시 clone 하거나, 새로 git init 해서 다시 연결해야 한다.
이 에러는
지금 있는 폴더가 Git 저장소가 아니어서 Git 명령을 처리할 수 없는 상태이다.