원격 저장소 URL 변경하기
원격 저장소 URL 변경하기
![4d72a7db12bf4111df875f918be13871104326.png](https://1212pm-bucket.s3.ap-northeast-2.amazonaws.com/post/2020/02/19/4d72a7db12bf4111df875f918be13871104326.png)
원격 저장소 URL 변경하기
기존 원격 저장소 URL을 변경하기 위해 git remote set-url 명령어를 사용합니다:
$ git remote -v # View existing remotes origin https://github.com/user/repo.git (fetch) origin https://github.com/user/repo.git (push) $ git remote set-url origin https://github.com/user/repo2.git # Change the 'origin' remote's URL
$ git remote -v
# Verify new remote URL origin https://github.com/user/repo2.git (fetch) origin https://github.com/user/repo2.git (push)
두 개의 인자를 가집니다:
- 기존 원격 저장소 이름: origin
- 새로운 원격 저장소 URL : https://github.com/user/repo2.git