git branch

匿名 (未验证) 提交于 2019-12-03 00:14:01

Git push branch from one remote to another?

A quick test making some temporary repositories shows you can construct a refspec that can do this:

$ git push rorg origin/one:refs/heads/one Counting objects: 5, done. Writing objects: 100% (3/3), 240 bytes, done. Total 3 (delta 0), reused 0 (delta 0) Unpacking objects: 100% (3/3), done. To /tmp/rorg  * [new branch]      origin/one -> one 

So origin/BRANCHNAME:refs/heads/BRANCHNAME

Checking in my rorg remote:

  • 或者
    • azure
  • 将remote/origin中的所有分支全部推到azure中
    • azureremotes/origin
  • 使用同样的方法将tags都推到azure中
    • azure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!