在網(wǎng)上查了資料,然后選擇以下作為自己的git遷移方法
方法一:
轉(zhuǎn)載自:https://blog.csdn.net/capcompaq/article/details/80694323
使用下列命令,克隆下來的代碼庫的origin地址已改成新倉庫地址,可直接使用
git clone --mirror <URL to my OLD repo location>
cd <New directory where your OLD repo was cloned>
git remote set-url origin <URL to my NEW repo location>
git push -f origin
還有方法二:
需要重新克隆倉庫,或者手動(dòng)更改倉庫地址
git clone --bare <舊倉庫地址>
git push --mirror <新倉庫地址>