chaocc0xs 2019-12-27
git remote update origin --prune
git branch -m oldName newName
1、重命名远程分支对应的本地分支:
git branch -m oldName newName
2、删除远程分支:
git push --delete origin oldName
3、上传新命名的本地分支:
git push origin newName
4、把修改后的本地分支与远程分支关联:
git branch --set-upstream-to origin/newName
git checkout -b my-test //在当前分支下创建my-test的本地分支分支 git push origin my-test //将my-test分支推送到远程 git branch --set-upstream-to=origin/my-test //将本地分支my-test关联到远程分支my-test上 git branch -a //查看远程分支