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

注意:把origin改为自己的名称

原文:https://blog.csdn.net/zhangxiaoyang0/article/details/82454209

猜你喜欢

转载自blog.csdn.net/weixin_42113124/article/details/84885606