簡體   English   中英

將主存儲庫從 Bitbucket 遷移到 Github。 如何將克隆的 repo 重新連接到新的 Github repo?

[英]Migrated master repo from Bitbucket to Github. How to reconnect cloned repo to new Github repo?

很直接。 我有一個在本地服務器上運行的應用程序,它是從 Bitbucket 存儲庫克隆的。 我將該存儲庫移至 Github 並想知道是否有辦法將我的克隆存儲庫連接到新的 Github 存儲庫? 還是我必須刪除克隆的倉庫並進行克隆?

添加一個指向新存儲庫的新遙控器,或更改您已設置為具有新存儲庫 url 的遙控器的 url。

git help remote

然后,添加一個新的遙控器(是的,您可以在一個 repo 上設置多個遙控器):

git remote add new-repo the-url
git fetch new-repo

或(假設舊遙控器稱為原點):

git remote set-url origin the-new-url
git fetch origin

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM