1,查看远程所有分支 git branch -r 2,查看所有分支(远程+本地) git branch -a 3,删除某个远程分支 git push origin --delete branchName 4,新建一个本地分支并切换到新分支 git checkout -b newBranchname 5,建立本地分支和远程分支的关系 git branch --set-upstream-to origin/feature/中转 feature/中转 6,回滚 git reset --hard