美文网首页
Git仓库完整迁移

Git仓库完整迁移

作者: 搬砖虾 | 来源:发表于2022-05-16 12:00 被阅读0次

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仓库完整迁移

      本文链接:https://www.haomeiwen.com/subject/daaiurtx.html