# 拉取远程所有分支
git clone --mirror http://gitlab.baidu.com/name/project_old.git
cd project_old.git/
git config --bool core.bare false

# 切换remote_url
git remote set-url origin http://gitlab.aliyun.com/name/project_new.git

# 推送所有分支
git push --mirror origin
如果觉得我的文章对你有用,请随意赞赏