fatal: No configured push destination. 에러 해결
프로젝트를 생성 후 처음으로 git push 를 했는데 해당 에러가 발생했다.
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using
git remote add <name> <url>
and then push using the remote name
git push <name>
어떤 에러인가 했더니... 현재 위치의 폴더가 github의 원격 레파지토리와 연결이 되어있지 않다는 듯 하다.
그리고나서 생각해보니 github에서 해당 프로젝트 레파지토리를 생성만 해두고 연결을 해두지 않았었다. ^^;
그래서 아무런 커밋이 되어있지 않은 내 github 레파지토리를 가보았더니 어떻게 해야할지에 대한 설명도 나와있었다.
git remote add origin https://깃허브 주소
git branch -M main
git push -u origin main
위 순서대로 하니 에러가 나지 않고 잘 push 가 되었다!
항상 처음 프로젝트를 생성하면 레파지토리부터 연결해서 에러가 난 적이 없었는데...
이렇게 하나 더 배워가는구나
끝!
'문제 해결' 카테고리의 다른 글
네트워크 응답 데이터를 로드할 수 없음(status 400 / Network status cancelled) 에러 해결 (0) | 2023.11.30 |
---|---|
ReferenceError: alert is not defined 에러 해결 (& Nothing was returned from render) (0) | 2023.10.27 |
body 태그 안, 위쪽에 공백이 생기는 문제 해결 () (0) | 2023.10.12 |
Visual Studio Code 한글 깨짐 문제 해결 (& Live Server) (0) | 2023.08.21 |
npm install -g serve 시 permission denied 에러 해결 (1) | 2023.04.25 |