Git - remote Git repository url 변경
조회수: 17
갑자기 repository 이름을 변경해야 할 때가 있을 것이다.
변경 후 git push하면 에러가 난다.
즉 현재 repository URL을 새로 설정해야 한다.
우선 git remote -v으로 확인하자.
변경 후 git push하면 에러가 난다.
즉 현재 repository URL을 새로 설정해야 한다.
우선 git remote -v으로 확인하자.
origin [email protected]:xyz/zzz.git (fetch)
origin [email protected]:xyz/zzz.git (push)
새로운 URL로 설정하면 된다.
git remote set-url origin [email protected]:xyz/nnnn.git
그리고 git remote -v를 실행하면 변경된 URL로 변경된 걸 확인할 수 있다.
이제 git push하면 정상적으로 작동한다.