恢复IDEA误删除的git提交,提交被删除,尝试恢复提交

2024-03-07 10:20

本文主要是介绍恢复IDEA误删除的git提交,提交被删除,尝试恢复提交,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

 ​​​​​​

dgq@DESKTOP-JRQ5NMD MINGW64 /f/IdeaProjects/workspace/spzx-parent ((8bb112e...))
$ git reflog
8bb112e (HEAD, origin/master, master) HEAD@{0}: checkout: moving from master to 8bb112e5ac18dfe4bbd64adfd06363e46b609f21
8bb112e (HEAD, origin/master, master) HEAD@{1}: rebase (finish): returning to refs/heads/master
8bb112e (HEAD, origin/master, master) HEAD@{2}: rebase (start): checkout 8bb112e5ac18dfe4bbd64adfd06363e46b609f21
f422295 HEAD@{3}: commit: day11-240115-用户端后端搭建&网关&redis缓存
8bb112e (HEAD, origin/master, master) HEAD@{4}: commit: day10-订单统计&操作日志&aop
790fa87 HEAD@{5}: commit: day09-商品管理&Echarts
94c3973 HEAD@{6}: commit: day08-品牌管理&分类品牌管理&规格参数管理
2c6fe50 HEAD@{7}: commit: day07-分类管理&导入导出&品牌管理
e024dde HEAD@{8}: commit: day06-菜单管理&角色管理&动态菜单
472da13 HEAD@{9}: commit (amend): day05-文件上传删除&角色分配
c447f3a HEAD@{10}: rebase (finish): returning to refs/heads/master
c447f3a HEAD@{11}: rebase (continue): day04-角色管理&用户管理
45ea26e HEAD@{12}: rebase (start): checkout origin/master
743deb1 HEAD@{13}: commit (amend): day04-角色管理&用户管理
45ea26e HEAD@{14}: rebase (finish): returning to refs/heads/master
45ea26e HEAD@{15}: rebase (start): checkout origin/master
e7c8ab2 HEAD@{16}: commit (amend): day03-登录校验&Apifox
45ea26e HEAD@{17}: commit (amend): day03-登录校验&Apifox
57b8502 HEAD@{18}: rebase (finish): returning to refs/heads/master
:...skipping...
8bb112e (HEAD, origin/master, master) HEAD@{0}: checkout: moving from master to 8bb112e5ac18dfe4bbd64adfd06363e46b609f21
8bb112e (HEAD, origin/master, master) HEAD@{1}: rebase (finish): returning to refs/heads/master
8bb112e (HEAD, origin/master, master) HEAD@{2}: rebase (start): checkout 8bb112e5ac18dfe4bbd64adfd06363e46b609f21
f422295 HEAD@{3}: commit: day11-240115-用户端后端搭建&网关&redis缓存
8bb112e (HEAD, origin/master, master) HEAD@{4}: commit: day10-订单统计&操作日志&aop
790fa87 HEAD@{5}: commit: day09-商品管理&Echarts
94c3973 HEAD@{6}: commit: day08-品牌管理&分类品牌管理&规格参数管理
2c6fe50 HEAD@{7}: commit: day07-分类管理&导入导出&品牌管理
e024dde HEAD@{8}: commit: day06-菜单管理&角色管理&动态菜单
472da13 HEAD@{9}: commit (amend): day05-文件上传删除&角色分配
c447f3a HEAD@{10}: rebase (finish): returning to refs/heads/master
c447f3a HEAD@{11}: rebase (continue): day04-角色管理&用户管理
45ea26e HEAD@{12}: rebase (start): checkout origin/master
743deb1 HEAD@{13}: commit (amend): day04-角色管理&用户管理
45ea26e HEAD@{14}: rebase (finish): returning to refs/heads/master
45ea26e HEAD@{15}: rebase (start): checkout origin/master
e7c8ab2 HEAD@{16}: commit (amend): day03-登录校验&Apifox
45ea26e HEAD@{17}: commit (amend): day03-登录校验&Apifox
57b8502 HEAD@{18}: rebase (finish): returning to refs/heads/master
57b8502 HEAD@{19}: rebase (continue): day03-登录校验&Apifox
8385e3f HEAD@{20}: rebase (start): checkout origin/master
8a5316f HEAD@{21}: commit (amend): day03-登录校验&Apifox
9f8c7ca HEAD@{22}: rebase (abort): returning to refs/heads/master
8385e3f HEAD@{23}: rebase (start): checkout origin/master
9f8c7ca HEAD@{24}: commit (amend): day03-登录校验&Apifox
d0d6b6b HEAD@{25}: commit (amend): day03-登录校验&Apifox
e367044 HEAD@{26}: rebase (abort): returning to refs/heads/master
8385e3f HEAD@{27}: rebase (start): checkout origin/master
e367044 HEAD@{28}: commit (amend): day03-登录校验&Apifox
f9977c7 HEAD@{29}: rebase (abort): returning to refs/heads/master
8385e3f HEAD@{30}: rebase (start): checkout origin/master
:
8bb112e (HEAD, origin/master, master) HEAD@{0}: checkout: moving from master to 8bb112e5ac18dfe4bbd64adfd06363e46b609f21
8bb112e (HEAD, origin/master, master) HEAD@{1}: rebase (finish): returning to refs/heads/master
8bb112e (HEAD, origin/master, master) HEAD@{2}: rebase (start): checkout 8bb112e5ac18dfe4bbd64adfd06363e46b609f21
f422295 HEAD@{3}: commit: day11-240115-用户端后端搭建&网关&redis缓存
8bb112e (HEAD, origin/master, master) HEAD@{4}: commit: day10-订单统计&操作日志&aop
790fa87 HEAD@{5}: commit: day09-商品管理&Echarts
94c3973 HEAD@{6}: commit: day08-品牌管理&分类品牌管理&规格参数管理
2c6fe50 HEAD@{7}: commit: day07-分类管理&导入导出&品牌管理
e024dde HEAD@{8}: commit: day06-菜单管理&角色管理&动态菜单
472da13 HEAD@{9}: commit (amend): day05-文件上传删除&角色分配
c447f3a HEAD@{10}: rebase (finish): returning to refs/heads/master
c447f3a HEAD@{11}: rebase (continue): day04-角色管理&用户管理
45ea26e HEAD@{12}: rebase (start): checkout origin/master
743deb1 HEAD@{13}: commit (amend): day04-角色管理&用户管理
45ea26e HEAD@{14}: rebase (finish): returning to refs/heads/master
45ea26e HEAD@{15}: rebase (start): checkout origin/master
e7c8ab2 HEAD@{16}: commit (amend): day03-登录校验&Apifox
45ea26e HEAD@{17}: commit (amend): day03-登录校验&Apifox
57b8502 HEAD@{18}: rebase (finish): returning to refs/heads/master
57b8502 HEAD@{19}: rebase (continue): day03-登录校验&Apifox
8385e3f HEAD@{20}: rebase (start): checkout origin/master
8a5316f HEAD@{21}: commit (amend): day03-登录校验&Apifox
9f8c7ca HEAD@{22}: rebase (abort): returning to refs/heads/master
8385e3f HEAD@{23}: rebase (start): checkout origin/master
9f8c7ca HEAD@{24}: commit (amend): day03-登录校验&Apifox
d0d6b6b HEAD@{25}: commit (amend): day03-登录校验&Apifox
e367044 HEAD@{26}: rebase (abort): returning to refs/heads/master
8385e3f HEAD@{27}: rebase (start): checkout origin/master
e367044 HEAD@{28}: commit (amend): day03-登录校验&Apifox
f9977c7 HEAD@{29}: rebase (abort): returning to refs/heads/master
8385e3f HEAD@{30}: rebase (start): checkout origin/master
:
8bb112e (HEAD, origin/master, master) HEAD@{0}: checkout: moving from master to 8bb112e5ac18dfe4bbd64adfd06363e46b609f21
8bb112e (HEAD, origin/master, master) HEAD@{1}: rebase (finish): returning to refs/heads/master
8bb112e (HEAD, origin/master, master) HEAD@{2}: rebase (start): checkout 8bb112e5ac18dfe4bbd64adfd06363e46b609f21
f422295 HEAD@{3}: commit: day11-240115-用户端后端搭建&网关&redis缓存
8bb112e (HEAD, origin/master, master) HEAD@{4}: commit: day10-订单统计&操作日志&aop
790fa87 HEAD@{5}: commit: day09-商品管理&Echarts
94c3973 HEAD@{6}: commit: day08-品牌管理&分类品牌管理&规格参数管理
2c6fe50 HEAD@{7}: commit: day07-分类管理&导入导出&品牌管理
e024dde HEAD@{8}: commit: day06-菜单管理&角色管理&动态菜单
472da13 HEAD@{9}: commit (amend): day05-文件上传删除&角色分配
c447f3a HEAD@{10}: rebase (finish): returning to refs/heads/master
c447f3a HEAD@{11}: rebase (continue): day04-角色管理&用户管理
45ea26e HEAD@{12}: rebase (start): checkout origin/master
743deb1 HEAD@{13}: commit (amend): day04-角色管理&用户管理
45ea26e HEAD@{14}: rebase (finish): returning to refs/heads/master
45ea26e HEAD@{15}: rebase (start): checkout origin/master
e7c8ab2 HEAD@{16}: commit (amend): day03-登录校验&Apifox
45ea26e HEAD@{17}: commit (amend): day03-登录校验&Apifox
57b8502 HEAD@{18}: rebase (finish): returning to refs/heads/master
57b8502 HEAD@{19}: rebase (continue): day03-登录校验&Apifox
8385e3f HEAD@{20}: rebase (start): checkout origin/master
8a5316f HEAD@{21}: commit (amend): day03-登录校验&Apifox
9f8c7ca HEAD@{22}: rebase (abort): returning to refs/heads/master
8385e3f HEAD@{23}: rebase (start): checkout origin/master
9f8c7ca HEAD@{24}: commit (amend): day03-登录校验&Apifox
d0d6b6b HEAD@{25}: commit (amend): day03-登录校验&Apifox
e367044 HEAD@{26}: rebase (abort): returning to refs/heads/master
8385e3f HEAD@{27}: rebase (start): checkout origin/master
e367044 HEAD@{28}: commit (amend): day03-登录校验&Apifox
f9977c7 HEAD@{29}: rebase (abort): returning to refs/heads/master
8385e3f HEAD@{30}: rebase (start): checkout origin/master
u
dgq@DESKTOP-JRQ5NMD MINGW64 /f/IdeaProjects/workspace/spzx-parent ((8bb112e...))
$ git cherry-pick f422295
[detached HEAD 5a3d9e8] day11-240115-用户端后端搭建&网关&redis缓存Date: Tue Mar 5 21:23:26 2024 +080033 files changed, 692 insertions(+), 6 deletions(-)create mode 100644 spzx-common/common-service/src/main/java/com/atguigu/spzx/common/handler/config/RedisConfig.javacreate mode 100644 spzx-model/src/main/java/com/atguigu/spzx/model/dto/h5/ProductSkuSearchDto.javacreate mode 100644 spzx-model/src/main/java/com/atguigu/spzx/model/vo/h5/IndexVo.javacreate mode 100644 spzx-server-gateway/pom.xmlcreate mode 100644 spzx-server-gateway/src/main/java/com/atguigu/spzx/gateway/SpzxGatewayApplication.javacreate mode 100644 spzx-server-gateway/src/main/java/com/atguigu/spzx/gateway/config/SpzxGatewayConfig.javacreate mode 100644 spzx-server-gateway/src/main/resources/application-dev.ymlcreate mode 100644 spzx-server-gateway/src/main/resources/application.ymlcreate mode 100644 spzx-service/pom.xmlcreate mode 100644 spzx-service/service-product/pom.xmlcreate mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/SpzxProductApplication.javacreate mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/controller/CategoryController.javacreate mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/controller/IndexController.javacreate mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/controller/ProductController.javacreate mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/mapper/CategoryMapper.javacreate mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/mapper/ProductSkuMapper.javacreate mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/service/CategoryService.javacreate mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/service/IndexService.javacreate mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/service/ProductSkuService.javacreate mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/service/impl/CategoryServiceImpl.javacreate mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/service/impl/IndexServiceImpl.javacreate mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/service/impl/ProductSkuServiceImpl.javacreate mode 100644 spzx-service/service-product/src/main/resources/application-dev.ymlcreate mode 100644 spzx-service/service-product/src/main/resources/application.ymlcreate mode 100644 spzx-service/service-product/src/main/resources/mapper/ProductSkuMapper.xmldgq@DESKTOP-JRQ5NMD MINGW64 /f/IdeaProjects/workspace/spzx-parent ((5a3d9e8...))
$
  1. 使用 Git Reflog
    在项目文件夹中打开命令行,然后输入 git reflog 命令。这个命令会显示你的 Git 引用日志,包括你执行过的所有 Git 命令,尤其是那些更改了 HEAD 的命令。在输出中找到你误删提交的哈希值。

  2. 恢复提交
    如果你找到了误删提交的哈希值,你可以使用 git cherry-pick <commit-hash> 命令来恢复这个提交。将 <commit-hash> 替换为你找到的提交哈希值。

这篇关于恢复IDEA误删除的git提交,提交被删除,尝试恢复提交的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/783191

相关文章

Python脚本实现自动删除C盘临时文件夹

《Python脚本实现自动删除C盘临时文件夹》在日常使用电脑的过程中,临时文件夹往往会积累大量的无用数据,占用宝贵的磁盘空间,下面我们就来看看Python如何通过脚本实现自动删除C盘临时文件夹吧... 目录一、准备工作二、python脚本编写三、脚本解析四、运行脚本五、案例演示六、注意事项七、总结在日常使用

Git中恢复已删除分支的几种方法

《Git中恢复已删除分支的几种方法》:本文主要介绍在Git中恢复已删除分支的几种方法,包括查找提交记录、恢复分支、推送恢复的分支等步骤,文中通过代码介绍的非常详细,需要的朋友可以参考下... 目录1. 恢复本地删除的分支场景方法2. 恢复远程删除的分支场景方法3. 恢复未推送的本地删除分支场景方法4. 恢复

使用Python实现在Word中添加或删除超链接

《使用Python实现在Word中添加或删除超链接》在Word文档中,超链接是一种将文本或图像连接到其他文档、网页或同一文档中不同部分的功能,本文将为大家介绍一下Python如何实现在Word中添加或... 在Word文档中,超链接是一种将文本或图像连接到其他文档、网页或同一文档中不同部分的功能。通过添加超

Python MySQL如何通过Binlog获取变更记录恢复数据

《PythonMySQL如何通过Binlog获取变更记录恢复数据》本文介绍了如何使用Python和pymysqlreplication库通过MySQL的二进制日志(Binlog)获取数据库的变更记录... 目录python mysql通过Binlog获取变更记录恢复数据1.安装pymysqlreplicat

IDEA如何切换数据库版本mysql5或mysql8

《IDEA如何切换数据库版本mysql5或mysql8》本文介绍了如何将IntelliJIDEA从MySQL5切换到MySQL8的详细步骤,包括下载MySQL8、安装、配置、停止旧服务、启动新服务以及... 目录问题描述解决方案第一步第二步第三步第四步第五步总结问题描述最近想开发一个新应用,想使用mysq

IDEA如何将String类型转json格式

《IDEA如何将String类型转json格式》在Java中,字符串字面量中的转义字符会被自动转换,但通过网络获取的字符串可能不会自动转换,为了解决IDEA无法识别JSON字符串的问题,可以在本地对字... 目录问题描述问题原因解决方案总结问题描述最近做项目需要使用Ai生成json,可生成String类型

Oracle数据库使用 listagg去重删除重复数据的方法汇总

《Oracle数据库使用listagg去重删除重复数据的方法汇总》文章介绍了在Oracle数据库中使用LISTAGG和XMLAGG函数进行字符串聚合并去重的方法,包括去重聚合、使用XML解析和CLO... 目录案例表第一种:使用wm_concat() + distinct去重聚合第二种:使用listagg,

Idea调用WebService的关键步骤和注意事项

《Idea调用WebService的关键步骤和注意事项》:本文主要介绍如何在Idea中调用WebService,包括理解WebService的基本概念、获取WSDL文件、阅读和理解WSDL文件、选... 目录前言一、理解WebService的基本概念二、获取WSDL文件三、阅读和理解WSDL文件四、选择对接

idea如何开启菜单栏

《idea如何开启菜单栏》文章介绍了如何通过修改IntelliJIDEA的样式文件`ui.lnf.xml`来重新显示被关闭的菜单栏,并分享了解决问题的步骤... 目录ijsdea开启菜单栏第一步第二步总结idea开启菜单栏手贱关闭了idea的js菜单栏,花费了半个小时终于解决,记录并分享一下第一步找

使用IntelliJ IDEA创建简单的Java Web项目完整步骤

《使用IntelliJIDEA创建简单的JavaWeb项目完整步骤》:本文主要介绍如何使用IntelliJIDEA创建一个简单的JavaWeb项目,实现登录、注册和查看用户列表功能,使用Se... 目录前置准备项目功能实现步骤1. 创建项目2. 配置 Tomcat3. 项目文件结构4. 创建数据库和表5.