git当前分支迁移到其他仓库的分支(同个平台的git仓库下测试通过)

A仓库当前分支迁移到B仓库

git remote add origin2 master
git remote set-url origin2 [email protected]:B.git
git checkout -b branchB1
git push origin2

到B仓库下:

git pull

git branch -a 就可以看到

remotes/origin/branchB1

参考:https://www.jianshu.com/p/25df045cbc08

发布了85 篇原创文章 · 获赞 35 · 访问量 17万+

猜你喜欢

转载自blog.csdn.net/WXXGoodJob/article/details/105715721