在git中移动分支路径(更改其名称,而不是其代码)

这个问题在这里已经有了答案:

  • 我如何重命名本地Git分支? 28个答案

  • 一种方法是将远程分支检出到本地的临时分支名称,推到远程的新名称,然后删除远程分支。 例如:

    git checkout -b tmp origin/release/service-release-2016
    

    创建新的远程分支:

    git push origin tmp:release/completed/service-release-2016
    

    删除旧的远程分支:

    git push origin :release/service-release-2016
    
    链接地址: http://www.djcxy.com/p/2603.html

    上一篇: move a branch path in git (change its name, not its code)

    下一篇: How to rename and move branch in git (bitucket/sourcetree)