git remote add origin 명령을 할 때 이런 오류가 나기도 한다.
fatal : remote origin already exists
해결 방법
기존 저장소 삭제
git remote remove origin
기존에 연결되어 있는 원격 저장소와 연결을 끊어준다.
다시 연결
git remote add origin [새롭게 연결할 깃 리포지토리 주소]
확인
git remote -v
결과
origin 리포지토리 주소(fetch)
origin 리포지토리 주소(push)
origin 혹은 master라고 되어 있다.
[참고링크] 👇
[Git] Git Remote origin already exists 에러해결 remote origin 삭제
깃의 Remote origin already exists 에러는 기존에 연결되어 있는 레파지토리가 다시 새로운 레파지토리에 소스코드를 올리려고 하면 발생되는 에러입니다. 해결방법은 간단합니다. 위와 같이 원격 저
coding-factory.tistory.com
'TIL' 카테고리의 다른 글
[TIL] 2024년 10월 15일 (0) | 2024.10.15 |
---|---|
[Git Bash Error] ! [rejected] master -> master (fetch first) git push 에러 (0) | 2024.03.19 |
[Git Error] LF will be replaced by CRLF the next time Git touches it 해결 (0) | 2023.10.29 |
[Git Error] [rejected] master -> master (non-fast-forward) 해결 (0) | 2023.10.29 |
[IntelliJ Error] Commit checks failed (Windows) (1) | 2023.10.25 |