资料
1.git仓库完整迁移(代码,分支,提交记录)_git怎么项目的commit分支和代码同步到新平台-优快云博客
2.https://www.soinside.com/question/362yQg4HA6S62jFTJubFdL
步骤
- 在新的管理网站上创建新的仓库;
- 取消保护分支:例如master;
- 本地克隆旧仓库完整镜像(注意不是 mirror)
git clone --bare http://xxxxxxxxxxx
- 进入该镜像仓库所在文件夹
- 重设远端地址
git remote set-url --push <remote-name> <new-push-url>
git remote set-url --push origin https://gitlab.com/user/repo.git
- 上传镜像
git push --mirror https://github.com/exampleuser/new-repository.git