git reset

复制代码
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

相关推荐
全栈陈序员16 小时前
Git】从入门到精通(八)—— git log:查看提交历史
大数据·git·elasticsearch
71777720 小时前
Git自建用什么工具比较好:Gitea、Forgejo、GitLab CE与Gitee的选型对比
git·gitlab·gitea
lsc_blog2 天前
年底还在招的岗位,先确认缺口和到岗要求
git·缓存·ci/cd·职场和发展·github
全栈陈序员2 天前
【Git】从入门到精通(十一)—— git reset 三种模式详解
git·elasticsearch
全栈陈序员2 天前
【Git】从入门到精通(十)—— 撤销与恢复:git checkout与git restore
运维·网络·数据库·git
全栈陈序员2 天前
【Git】从入门到精通(五)—— git add:将文件加入暂存区
大数据·git·elasticsearch
全栈陈序员2 天前
【Git】从入门到精通(七)—— git status:查看仓库状态
大数据·git·elasticsearch
莫晓燚3 天前
Ansible 13 个常用模块---企业实战
git·github
无言听风雨丶3 天前
Kubernetes GitOps 持续交付实战:用 Argo CD 让 Git 成为集群事实源
git·elasticsearch·kubernetes
全栈陈序员3 天前
【Git】从入门到精通(六)—— git commit:提交到版本库
大数据·git·elasticsearch