1. git branch -l 查看本地branch
2. git reset --hard 回滚所有改动
3. git status 查看本地改动
4. git pull 更新代码
5. git commit -a 提交代码
6. git push 提交到服务器
7. git fetch origin xxxxxx 把服务器拉下某个branch
8. git checkout xxxxx 将xxxxx设为工作目录
原文地址:http://blog.csdn.net/lianchen/article/details/40051853