티스토리 뷰

Git

[Git] git remote repository 변경

Dotori.ai 2022. 4. 13. 12:03

Git에서 리모트 저장소(remote repository)를 다른 git URL로 변경하는 방법이다.

기존 remote 저장소의 alias와 url을확인

> git remote -v
origin  https://github.com/jindotori/old-repository.git (fetch)
origin  https://github.com/jindotori/old-repository.git (push)


-. alias : origin
-. remote 주소: https://github.com/jindotori/old-repository.git

기존 remote url 을 update

> git remote set-url origin https://github.com/jindotori/new-repository.git

정상적으로 변경 되었는 지 확인

> git remote -v
origin  https://github.com/jindotori/new-repository.git (fetch)
origin  https://github.com/jindotori/new-repository.git (push)

'Git' 카테고리의 다른 글

Git 에서 Add 취소하는 방법  (0) 2023.10.03
[Git] submodule 포함하여 최신 변경사항 pull 하기  (0) 2023.01.19
[Git] remote: Repository not found.  (0) 2022.04.08