git status  | 显示当前仓库的状态,包括工作区和暂存区的文件变化状态(如 新增、修改、删除) | 
|---|
git add <file>  | 将文件添加到暂存区(staging area) | 
|---|
git diff <file>  | 对比工作区(working directory)和暂存区(staging area)的不同 | 
|---|
git diff --staged <file>  | 对比和暂存区(staging area)的不同 | 
|---|
git checkout -- <file>  | 抛弃工作区的变化 | 
|---|
| git reset <file> | 重置仓库历史 | 
|---|
| git commit -m "<message>" | 将暂存区(staging area)的变化提交到仓库 | 
|---|
| git rm <file> | 将文件从工作区(working directory)和暂存区(staging area)删除 | 
|---|
| git stash | 将工作区变化临时存储(stash)起来,  供以后使用 | 
|---|
| git stash pop | 将stash的内容应用到工作区(working directory), 并从stash 中删除 | 
|---|
| git stash apply | 将stash的内容应用到工作区(working directory), stash 依然保留 | 
|---|
| git stash drop | 将stash的内容清除掉 | 
|---|