删除远端分支
git push origin -d 分支
or
git push origin :分支
推送本地新建分支到远端分支(远端会自动创建分支)
git push origin newbranch:originbranch
拉取远程分支到本地
git fetch origin 远程分支:本地分支
(个人使用经历:此语句会自动创建分支,但是必须指定本地分支名,否则则拉取分支失败 git branch --set-upstream-to=origin/XXX XXX 建立分支之间的跟踪关系 )
修改分支名并推到远端
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