1.新建分支
git branch [branchname]
基于某个历史版本创建分支
git checkout -b <branch name> <SHA1>
例如:我需要的历史版本的commit 值为92483401abdc41bc64bbdde1a63ed7bbee403e19的版本上创建一个分支ttt并切换到这个新的分支上
git checkout -b ttt 92483401abdc41bc64bbdde1a63ed7bbee403e19
2.新建并切换到这个分支上
git branch -b [branch-name]
3.查看分支
git branch
4.查看所有分支的详细信息
git branch -v
5.查看已经合并的分支
git branch --merged
6.查看没有合并的分支
git branch --no-merged
7.切换到某个分支
git checkout [branch-name]
8.将另一分支合并到当前分支上
git merge [other-branch-name]
9.删除分支
git branch -d/-D [branch-name]