git-branch - List, create, or delete branches
git branch name # 新建分支,但不切换分支
git branch # 查看有哪些分支
git branch -r #列出远程分支
git branch -a #查看本地和远程分支
git branch -m oldbranch newbranch # 改变分支名称
git branch -d branchname # 删除分支
git branch -d -r branchname # 删除远程分支
git branch [--color[=<when>] | --no-color] [-r | -a]
[--list] [-v [--abbrev=<length> | --no-abbrev]]
[--column[=<options>] | --no-column] [--sort=<key>]
[(--merged | --no-merged) [<commit>]]
[--contains [<commit]] [--no-contains [<commit>]]
[--points-at <object>] [--format=<format>] [<pattern>…]
git branch [--set-upstream | --track | --no-track] [-l] [-f] <branchname> [<start-point>]
git branch (--set-upstream-to=<upstream> | -u <upstream>) [<branchname>]
git branch --unset-upstream [<branchname>]
git branch (-m | -M) [<oldbranch>] <newbranch>
git branch (-c | -C) [<oldbranch>] <newbranch>
git branch (-d | -D) [-r] <branchname>…
git branch --edit-description [<branchname>]
参考文献:
https://git-scm.com/docs/git-branch