1. 创建本地分支
git branch xxx
2.创建新分支并切换到此分支
git branch -b xxx
3.切换分支
git checkout xxx
4.删除本地分支
git branch -D xxx
5.删除远程分支
git push origin --delete xxx
6.查看分支
git branch -a
7.添加remote
git remote add 别名 地址
8. reset
git reset --hard
原文:http://www.cnblogs.com/gogolee/p/6362088.html