git仓库迁移方案

it2023-08-11  76

1.去老仓库通过git clone --bare 老项目.git地址(它是一个空服务项目),如下图

git clone --bare git@192.168.128.33:developteam/backend/spring-cloud/saas-platform.git

2.进去刚才bare的目录,也就是上面的图,执行

cd saas-platform.git/ git push --mirror git@192.168.128.33:developteam/backend/spring-cloud/business/gateway.git

3.这时候去gitlab上gateway里就有东西了(包含历史提交记录)

4.去其他目录(项目需要建的目录,我这里在上一层也就是ideaproject)

cd .. git clone git@192.168.128.33:developteam/backend/spring-cloud/business/gateway.git

最新回复(0)