git修改本地和远程分支名称

git branch -a #查看所有分支 
git branch -r #查看远程分支 
git branch -vv #查看本地分支所关联的远程分支

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 或者git push -u origin new_branch# Push the new branch, set local branch to track the new remote
--------------------- 
原文:https://blog.csdn.net/zhangxiaoyang0/article/details/82454209 

你可能感兴趣的:(git)