1. git branch
git branch
列出本地已经存在的分支git branch -r
列出远程分支git branch -a
列出本地分支和远程分支git branch -a
列出本地分支和远程分支git branch -d <branch>
删除分支git branch -D <branch>
强制删除分支
1.1. 创建分支
git branch <newbranch> / 基于当前HEAD创建<newbranch>分支
git checkout <newbranch>
git push origin <newbranch>
1.2. 本地分支与远程分支对应
1.2.1. git branch
git branch (--set-upstream-to=<upstream> | -u <upstream>) [<branchname>]
1.2.2. git push
-u
== --set-upstream
git push -u <remote> <branch>
1.2.3. 查看
git branch -vv