git远程仓库迁移

公司从gogs迁移到gitlab需要迁移代码

git clone 
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all


git remote rename origin old-origin
git remote add origin http://git.cn-healthcare.com:90/liyufeng/jiankangjie.git 
git push -u origin --all
git push -u origin --tags

你可能感兴趣的:(git远程仓库迁移)