git reset [--soft | --mixed | --hard] [HEAD]
表格版
|--------|--------|--------|---------|---------|---------|-------------------|---------|---------|--------|
| 原始内容 ||| reset前 ||| reset命令 | reset后 |||
| 本地工作区 | 暂存区 | 本地仓库 | 本地工作区 | 暂存区 | 本地仓库 | reset命令 | 本地工作区 | 暂存区 | 本地仓库 |
| README | README | README | README | README | README | --soft HEAD | README | README | README |
| | | | a.txt | | | --soft HEAD | a.txt | | |
| | | | b.txt | b.txt | | --soft HEAD | b.txt | b.txt | |
| | | | c.txt | c.txt | c.txt | --soft HEAD | c.txt | c.txt | c.txt |
| README | README | README | README | README | README | --mixed HEAD | README | README | README |
| | | | 1.txt | | | --mixed HEAD | 1.txt | | |
| | | | 2.txt | 2.txt | | --mixed HEAD | 2.txt | | |
| | | | 3.txt | 3.txt | 3.txt | --mixed HEAD | 3.txt | 3.txt | 3.txt |
| README | README | README | README | README | README | --hard HEAD | README | README | README |
| | | | x.txt | | | --hard HEAD | x.txt | | |
| | | | y.txt | y.txt | | --hard HEAD | | | |
| | | | z.txt | z.txt | z.txt | --hard HEAD | z.txt | z.txt | z.txt |
| README | README | README | README | README | README | --soft HEAD^ | README | README | README |
| | | | 111.txt | | | --soft HEAD^ | 111.txt | | |
| | | | 222.txt | 222.txt | | --soft HEAD^ | 222.txt | 222.txt | |
| | | | 333.txt | 333.txt | 333.txt | --soft HEAD^ | 333.txt | 333.txt | |
| README | README | README | README | README | README | --hard HEAD^ | README | README | README |
| | | | xxx.txt | | | --hard HEAD^ | xxx.txt | | |
| | | | yyy.txt | yyy.txt | | --hard HEAD^ | | | |
| | | | zzz.txt | zzz.txt | zzz.txt | --hard HEAD^ | | | |
图片版
查看暂时区git ls-files --stage