GIT Remote 레포지토리 변경 하기
IT/System
2023. 3. 21. 10:32
728x90
nata:cms nata$ git remote -v
origin https://nata@bitbucket.org/nata/cms.git (fetch)
origin https://nata@bitbucket.org/nata/cms.git (push)
현재 bitbucket으로 사용중인데 git hub로 변경해서 레포지토리를 관리할 생각이다.
github에 empty repository 생성 후
git remote add github git@github.com:nata/cms.git
git oirigin이 이미 있으므로 github로 변경한다.
git push -u github master
github 레포지토리로 push 한다.
nata:cms tjpark$ git remote remove origin
nata:cms tjpark$ git remote
github
heroku
기존의 bitbucket은 지워본다.
nata:cms tjpark$ git remote rename github origin
Renaming remote references: 100% (1/1), 완료.
nata:cms tjpark$ git remote
heroku
origin
github alias를 변경하여 origin으로 변경한다.