如何在git中重命名和移动分支(bitucket / sourcetree)
这个问题在这里已经有了答案:
这应该可以做到这一点:
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
来源于此
在你做这件事之前别忘了拉,所以你不会失去之前没有拉过的东西。
链接地址: http://www.djcxy.com/p/2601.html上一篇: How to rename and move branch in git (bitucket/sourcetree)