查看本地分支
git branch
查看远程分支
git branch -r
查看所有分支
git branch -a
查看状态
git status
git status -s 紧凑版本
查看日志
git log
git log -p
git log -2
查看本地clone的代码库
git remote
git remote -v
查看本地clone版本origin库的所有分支
git remote show origin
diff
work和staged之间 (工作目录中和暂存区快照之间差异)
git diff
staged和history之间 (暂存区和仓库版本比较)
git diff --cached
git diff --staged
work和history之间
git diff HEAD
work和remote之间
git diff HEAD~
staged和remote之间
git diff --cached HEAD~