将项目从git迁移到gitlab步骤:

第一步:克隆老项目

git clone --mirror https://XXXX/project.git

第二步:设置新的地址
git remote set-url --push origin http://new_XXXXXX/project.git

第三步:push
git push --mirror  http://new_XXXXXX/project.git

第四步:让其他同事执行以下操作,将git地址更新为新的git地址
git remote set-url origin http://new_XXXXXX/project.git

posted on 2020-08-19 01:23  何石-博客  阅读(1514)  评论(0编辑  收藏  举报