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

相关推荐
badhope4 小时前
Mobile-Skills:移动端技能可视化的创新实践
开发语言·人工智能·git·智能手机·github
zhangfeng11336 小时前
Windows 的 Git Bash 中使用 md5sum 命令非常简单 md5做文件完整性检测 WinRAR 可以计算文件的 MD5 值
人工智能·windows·git·bash
csdn_aspnet14 小时前
Git灾难级误操作抢救手册:从reset到reflog的终极救援
git·恢复·误删
2401_8916558116 小时前
Git + 云原生:如何管理K8s配置版本?
git·云原生·kubernetes
m0_5281744517 小时前
Git对象存储原理(blob/tree/commit) 引用日志(reflog)
大数据·git·elasticsearch·全文检索
无限进步_17 小时前
【C++】单词反转算法详解:原地操作与边界处理
java·开发语言·c++·git·算法·github·visual studio
Wzx19801220 小时前
Git分布式版本控制工具
git
whale fall1 天前
git add、git commit、git push 的区别和联系
git
倾云鹤1 天前
Git同时推送多个远程仓库
git
sdm0704272 天前
基础开发工具git,gdb
git