## 添加配置
git config [--local | --global | --system] user.name 'Your name'
git config [--local | --global | --system] user.email 'Your email'
## 查看配置
git config --list [--local | --global | --system]
## 编辑配置
git config -e [--local | --global | --system]
## 区别
local:区域为本仓库
global: 当前用户的所有仓库
system: 本系统的所有用户
git配置文件存放位置:local的在.git/config里面;global的在个人home目录下的.gitconfig里面;system应该在git安装目录的下
##工作区-暂存区
##diff
1.1 比较工作区与暂存区
git diff 不加参数即默认比较工作区与暂存区
1.2 比较暂存区与最新本地版本库(本地库中最近一次commit的内容)
git diff --cached [<path>...]
1.3 比较工作区与最新本地版本库
git diff HEAD [<path>...] 如果HEAD指向的是master分支,那么HEAD还可以换成master
1.4 比较工作区与指定commit-id的差异
git diff commit-id [<path>...]
1.5 比较暂存区与指定commit-id的差异
git diff --cached [<commit-id>] [<path>...]
1.6 比较两个commit-id之间的差异
git diff [<commit-id>] [<commit-id>]
##查看操作记录
git reflog