git仓库迁移方案

2020-08-19  本文已影响0人  lbjfish

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

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

bare.png

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

上一篇 下一篇

猜你喜欢

热点阅读