2011-06-17 91 views

回答

4

首先,克隆舊倉庫:

git clone git://old-repo-url 

然後創建一個新的遠程指向新的存儲庫:

git remote add new-repo-name git://new-repo-url 

現在推到了新的遠程:

git push new-repo-name branch1:refs/heads/branch1 
git push new-repo-name branch2:refs/heads/branch2 
... 

推送你關心的每個分支,瞧!一個很好的複製存儲庫。

+1

或'git push --all'。 'git clone --mirror'也可以提供幫助。 – 2011-06-17 17:28:41

相關問題