拉取所有远程仓库分支到本地并推送到另外一个仓库
# 克隆仓库
git clone old_ssh_registry
# 拉取仓库所有分支到本地,并创建本地分支
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
# 获取所有更新
git fetch --all
# 添加新仓库远程地址
git remote add gitlab new_ssh_registry
# 所有分支推送到新仓库
git pull gitlab --all
# 推送本地dev分支到远程feat分支
git push gitlab dev:feat
# 修改远程仓库代称
git remote rename gitlab origin