posted 2 months ago
Github 연결을 끊었다면 다시 연결하는 과정을 진행해야 합니다.
Github Repository 생성
기존 연결 된 Github Repository 연결을 제거했다면, 새로운 Repository를 생성해야 합니다.
Terminal 명령어를 통해 Github Repository 연결하기
요악하자면 Github create a new repository on the command line은 새로운 Github 저장소를 만들고 로컬 및 원격 저장소 간 연결하는 작업을 의미하고, Push an existing repository from the command line은 존재하는 로컬 Git 저장소를 Github 저장소에 연결하여 변경 사항을 업로드하는 작업을 의미합니다.
기존 연결 끊기 후 Repository를 생성해 연결하는 작업이니까, Push an existing repository from the command line 명령어를 복사하겠습니다.
git remote add origin git@github.com:cptkuk91/explain.git
git branch -M main
git push -u origin main
추가 설명
git add .
git commit -m "[추가] 기존 저장소 옮기기"
git push origin explain