列出所有分支

$ git branch

	iss53
* master # 带* 号的是当前分支, 即HEAD 指向的那个
  testing

列出所有分支, 且显示最后一次提交

$ git branch -v

  iss53   93b412c fix javascript issue
* master  7a98805 Merge branch 'iss53'
  testing 782fd34 add scott to the author list in the readmes

列出已经合并到当前分支的分支

$ git branch --merged

  iss53 # 由于已经合并完毕, 可以删掉了 git branch -d iss53 
* master

列出还未合并过的分支

$ git branch --no-merged

  testing

删除还未合并过的分支会提示失败, 也会提示强制删除的姿势

$ git branch -d testing

error: The branch 'testing' is not fully merged.
If you are sure you want to delete it, run 'git branch -D testing'.