gitlab仓库代码转移到新的分组

 

代码仓库地址codeA已经存在于一个分组中比如groupA,现在需要转移到分组groupB:

1、groupB新建一个仓库比如:codeB

2、进入原来本地代码仓库地址

cd existing_repo

3、执行命令

git remote rename origin old-origin

4、指定新的仓库

git remote add origin git@仓库地址自己替换/codeB.git

5、推送代码

git push -u origin --all
git push -u origin --tags