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

相关推荐
1379003408 小时前
Git 设置代理
git
xiaodunmeng15 小时前
sourcetree gitee 详细使用
git
LostSpeed16 小时前
git,gitea - tool - creat Gitea Empty Rep Dir
git·gitea
前端郭德纲18 小时前
vscode默认终端怎么设置成git bash
git·vscode·bash
近听水无声4771 天前
git 学习(基于Ubuntu和gitee)
git
2401_826097622 天前
同步&异步日志系统-日志落地模块的实现
c++·git·vim
半旧夜夏2 天前
阿里云IOT消息处理
java·ide·git·物联网·spring·阿里云
我们的五年2 天前
【Git版本控制器】第三弹——版本回退,撤销修改,删除文件
大数据·linux·git
一名嵌入式糕手2 天前
Git从基础到进阶
git
不cong明的亚子2 天前
github用户名密码登陆失效了
git·github