1查看分支
1.1查看远程分支
git branch -r //-r remote
1.2查看本地分支
git branch
1.3所有分支
git branch -a //-a all
2创建分支
2.1新建分支,不切换至新分支
git branch [branch_name] //默认是拷贝操作,复制原分支内容至新分支
2.2新建分支,并切换至新分支
git branch [branch_name] -b
2.3创建远程分支
推送本地分支至远程就会生成远程分支
git push origin [local_branch_name]
3切换分支
git checkout [another_branch_name]
4删除分支
4.1删除本地分支
git branch -d [branch_name] //-d delete
4.2删除远程分支
git push origin :[delete_branch_name]