# Rename branch locally
git branch -m old_branch new_branch

# Delete the old branch
git push origin :old_branch

# Push the new branch, set local branch to track the new remote
git push –set-upstream origin new_branch

 

版权声明:本文为zhoug2020原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/zhoug2020/p/12613673.html