1. 删除远程分支:git push origin :branchname
2. 删除本地分支:git branch -d branchname
3. 创建并且切换到新建的分支:gti checkout -b branchname
4. 将本地分支推送到远程:git push origin branchname:branchname
5. 将远程分支拉去到本地:git checkout -b branchname origin/branchname
6. 将本地分支和远程分支关联,如果不关联,在git pull 和git push时会有提示。命令:
git branch --set-upstream-to=origin/remotebranchname localbranchname