1、以Bare的方式克隆老得仓库
git clone --bare https://github.com/exampleuser/old-repository.git
2、镜像Push到新的仓库地址
cd old-repository.git
git push --mirror https://github.com/exampleuser/new-repository.git
3、电脑中删掉老仓库
cd ..
rm -rf old-repository.git
git clone --bare https://github.com/exampleuser/old-repository.git
cd old-repository.git
git push --mirror https://github.com/exampleuser/new-repository.git
cd ..
rm -rf old-repository.git
本文标题:Git仓库完整迁移
本文链接:https://www.haomeiwen.com/subject/daaiurtx.html
网友评论