gitlab项目完整迁移
1.克隆自己服务器的代码
git clone --mirror 原项目仓库地址 会生成一个.git文件
2.在.git 文件根目录执行下面命令
git push --mirror 新代码仓库地址 将本地克隆的代码推到新的服务器
3.在项目根目录执行
git remote set-url origin 新地址
执行流程:
在 https://git.reach.store/ 中找到服务git地址
克隆地址
进入到项目根目录执行
git remote set-url origin 新地址
eg:
cd /Users/hushai/Documents/code/dsys-spring-boot-plus
git remote set-url origin [email protected]:dstore-erp/dsys-spring-boot-plus.git