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


     ​​​​​​

    1. dgq@DESKTOP-JRQ5NMD MINGW64 /f/IdeaProjects/workspace/spzx-parent ((8bb112e...))
    2. $ git reflog
    3. 8bb112e (HEAD, origin/master, master) HEAD@{0}: checkout: moving from master to 8bb112e5ac18dfe4bbd64adfd06363e46b609f21
    4. 8bb112e (HEAD, origin/master, master) HEAD@{1}: rebase (finish): returning to refs/heads/master
    5. 8bb112e (HEAD, origin/master, master) HEAD@{2}: rebase (start): checkout 8bb112e5ac18dfe4bbd64adfd06363e46b609f21
    6. f422295 HEAD@{3}: commit: day11-240115-用户端后端搭建&网关&redis缓存
    7. 8bb112e (HEAD, origin/master, master) HEAD@{4}: commit: day10-订单统计&操作日志&aop
    8. 790fa87 HEAD@{5}: commit: day09-商品管理&Echarts
    9. 94c3973 HEAD@{6}: commit: day08-品牌管理&分类品牌管理&规格参数管理
    10. 2c6fe50 HEAD@{7}: commit: day07-分类管理&导入导出&品牌管理
    11. e024dde HEAD@{8}: commit: day06-菜单管理&角色管理&动态菜单
    12. 472da13 HEAD@{9}: commit (amend): day05-文件上传删除&角色分配
    13. c447f3a HEAD@{10}: rebase (finish): returning to refs/heads/master
    14. c447f3a HEAD@{11}: rebase (continue): day04-角色管理&用户管理
    15. 45ea26e HEAD@{12}: rebase (start): checkout origin/master
    16. 743deb1 HEAD@{13}: commit (amend): day04-角色管理&用户管理
    17. 45ea26e HEAD@{14}: rebase (finish): returning to refs/heads/master
    18. 45ea26e HEAD@{15}: rebase (start): checkout origin/master
    19. e7c8ab2 HEAD@{16}: commit (amend): day03-登录校验&Apifox
    20. 45ea26e HEAD@{17}: commit (amend): day03-登录校验&Apifox
    21. 57b8502 HEAD@{18}: rebase (finish): returning to refs/heads/master
    22. :...skipping...
    23. 8bb112e (HEAD, origin/master, master) HEAD@{0}: checkout: moving from master to 8bb112e5ac18dfe4bbd64adfd06363e46b609f21
    24. 8bb112e (HEAD, origin/master, master) HEAD@{1}: rebase (finish): returning to refs/heads/master
    25. 8bb112e (HEAD, origin/master, master) HEAD@{2}: rebase (start): checkout 8bb112e5ac18dfe4bbd64adfd06363e46b609f21
    26. f422295 HEAD@{3}: commit: day11-240115-用户端后端搭建&网关&redis缓存
    27. 8bb112e (HEAD, origin/master, master) HEAD@{4}: commit: day10-订单统计&操作日志&aop
    28. 790fa87 HEAD@{5}: commit: day09-商品管理&Echarts
    29. 94c3973 HEAD@{6}: commit: day08-品牌管理&分类品牌管理&规格参数管理
    30. 2c6fe50 HEAD@{7}: commit: day07-分类管理&导入导出&品牌管理
    31. e024dde HEAD@{8}: commit: day06-菜单管理&角色管理&动态菜单
    32. 472da13 HEAD@{9}: commit (amend): day05-文件上传删除&角色分配
    33. c447f3a HEAD@{10}: rebase (finish): returning to refs/heads/master
    34. c447f3a HEAD@{11}: rebase (continue): day04-角色管理&用户管理
    35. 45ea26e HEAD@{12}: rebase (start): checkout origin/master
    36. 743deb1 HEAD@{13}: commit (amend): day04-角色管理&用户管理
    37. 45ea26e HEAD@{14}: rebase (finish): returning to refs/heads/master
    38. 45ea26e HEAD@{15}: rebase (start): checkout origin/master
    39. e7c8ab2 HEAD@{16}: commit (amend): day03-登录校验&Apifox
    40. 45ea26e HEAD@{17}: commit (amend): day03-登录校验&Apifox
    41. 57b8502 HEAD@{18}: rebase (finish): returning to refs/heads/master
    42. 57b8502 HEAD@{19}: rebase (continue): day03-登录校验&Apifox
    43. 8385e3f HEAD@{20}: rebase (start): checkout origin/master
    44. 8a5316f HEAD@{21}: commit (amend): day03-登录校验&Apifox
    45. 9f8c7ca HEAD@{22}: rebase (abort): returning to refs/heads/master
    46. 8385e3f HEAD@{23}: rebase (start): checkout origin/master
    47. 9f8c7ca HEAD@{24}: commit (amend): day03-登录校验&Apifox
    48. d0d6b6b HEAD@{25}: commit (amend): day03-登录校验&Apifox
    49. e367044 HEAD@{26}: rebase (abort): returning to refs/heads/master
    50. 8385e3f HEAD@{27}: rebase (start): checkout origin/master
    51. e367044 HEAD@{28}: commit (amend): day03-登录校验&Apifox
    52. f9977c7 HEAD@{29}: rebase (abort): returning to refs/heads/master
    53. 8385e3f HEAD@{30}: rebase (start): checkout origin/master
    54. :
    55. 8bb112e (HEAD, origin/master, master) HEAD@{0}: checkout: moving from master to 8bb112e5ac18dfe4bbd64adfd06363e46b609f21
    56. 8bb112e (HEAD, origin/master, master) HEAD@{1}: rebase (finish): returning to refs/heads/master
    57. 8bb112e (HEAD, origin/master, master) HEAD@{2}: rebase (start): checkout 8bb112e5ac18dfe4bbd64adfd06363e46b609f21
    58. f422295 HEAD@{3}: commit: day11-240115-用户端后端搭建&网关&redis缓存
    59. 8bb112e (HEAD, origin/master, master) HEAD@{4}: commit: day10-订单统计&操作日志&aop
    60. 790fa87 HEAD@{5}: commit: day09-商品管理&Echarts
    61. 94c3973 HEAD@{6}: commit: day08-品牌管理&分类品牌管理&规格参数管理
    62. 2c6fe50 HEAD@{7}: commit: day07-分类管理&导入导出&品牌管理
    63. e024dde HEAD@{8}: commit: day06-菜单管理&角色管理&动态菜单
    64. 472da13 HEAD@{9}: commit (amend): day05-文件上传删除&角色分配
    65. c447f3a HEAD@{10}: rebase (finish): returning to refs/heads/master
    66. c447f3a HEAD@{11}: rebase (continue): day04-角色管理&用户管理
    67. 45ea26e HEAD@{12}: rebase (start): checkout origin/master
    68. 743deb1 HEAD@{13}: commit (amend): day04-角色管理&用户管理
    69. 45ea26e HEAD@{14}: rebase (finish): returning to refs/heads/master
    70. 45ea26e HEAD@{15}: rebase (start): checkout origin/master
    71. e7c8ab2 HEAD@{16}: commit (amend): day03-登录校验&Apifox
    72. 45ea26e HEAD@{17}: commit (amend): day03-登录校验&Apifox
    73. 57b8502 HEAD@{18}: rebase (finish): returning to refs/heads/master
    74. 57b8502 HEAD@{19}: rebase (continue): day03-登录校验&Apifox
    75. 8385e3f HEAD@{20}: rebase (start): checkout origin/master
    76. 8a5316f HEAD@{21}: commit (amend): day03-登录校验&Apifox
    77. 9f8c7ca HEAD@{22}: rebase (abort): returning to refs/heads/master
    78. 8385e3f HEAD@{23}: rebase (start): checkout origin/master
    79. 9f8c7ca HEAD@{24}: commit (amend): day03-登录校验&Apifox
    80. d0d6b6b HEAD@{25}: commit (amend): day03-登录校验&Apifox
    81. e367044 HEAD@{26}: rebase (abort): returning to refs/heads/master
    82. 8385e3f HEAD@{27}: rebase (start): checkout origin/master
    83. e367044 HEAD@{28}: commit (amend): day03-登录校验&Apifox
    84. f9977c7 HEAD@{29}: rebase (abort): returning to refs/heads/master
    85. 8385e3f HEAD@{30}: rebase (start): checkout origin/master
    86. :
    87. 8bb112e (HEAD, origin/master, master) HEAD@{0}: checkout: moving from master to 8bb112e5ac18dfe4bbd64adfd06363e46b609f21
    88. 8bb112e (HEAD, origin/master, master) HEAD@{1}: rebase (finish): returning to refs/heads/master
    89. 8bb112e (HEAD, origin/master, master) HEAD@{2}: rebase (start): checkout 8bb112e5ac18dfe4bbd64adfd06363e46b609f21
    90. f422295 HEAD@{3}: commit: day11-240115-用户端后端搭建&网关&redis缓存
    91. 8bb112e (HEAD, origin/master, master) HEAD@{4}: commit: day10-订单统计&操作日志&aop
    92. 790fa87 HEAD@{5}: commit: day09-商品管理&Echarts
    93. 94c3973 HEAD@{6}: commit: day08-品牌管理&分类品牌管理&规格参数管理
    94. 2c6fe50 HEAD@{7}: commit: day07-分类管理&导入导出&品牌管理
    95. e024dde HEAD@{8}: commit: day06-菜单管理&角色管理&动态菜单
    96. 472da13 HEAD@{9}: commit (amend): day05-文件上传删除&角色分配
    97. c447f3a HEAD@{10}: rebase (finish): returning to refs/heads/master
    98. c447f3a HEAD@{11}: rebase (continue): day04-角色管理&用户管理
    99. 45ea26e HEAD@{12}: rebase (start): checkout origin/master
    100. 743deb1 HEAD@{13}: commit (amend): day04-角色管理&用户管理
    101. 45ea26e HEAD@{14}: rebase (finish): returning to refs/heads/master
    102. 45ea26e HEAD@{15}: rebase (start): checkout origin/master
    103. e7c8ab2 HEAD@{16}: commit (amend): day03-登录校验&Apifox
    104. 45ea26e HEAD@{17}: commit (amend): day03-登录校验&Apifox
    105. 57b8502 HEAD@{18}: rebase (finish): returning to refs/heads/master
    106. 57b8502 HEAD@{19}: rebase (continue): day03-登录校验&Apifox
    107. 8385e3f HEAD@{20}: rebase (start): checkout origin/master
    108. 8a5316f HEAD@{21}: commit (amend): day03-登录校验&Apifox
    109. 9f8c7ca HEAD@{22}: rebase (abort): returning to refs/heads/master
    110. 8385e3f HEAD@{23}: rebase (start): checkout origin/master
    111. 9f8c7ca HEAD@{24}: commit (amend): day03-登录校验&Apifox
    112. d0d6b6b HEAD@{25}: commit (amend): day03-登录校验&Apifox
    113. e367044 HEAD@{26}: rebase (abort): returning to refs/heads/master
    114. 8385e3f HEAD@{27}: rebase (start): checkout origin/master
    115. e367044 HEAD@{28}: commit (amend): day03-登录校验&Apifox
    116. f9977c7 HEAD@{29}: rebase (abort): returning to refs/heads/master
    117. 8385e3f HEAD@{30}: rebase (start): checkout origin/master
    118. u
    119. dgq@DESKTOP-JRQ5NMD MINGW64 /f/IdeaProjects/workspace/spzx-parent ((8bb112e...))
    120. $ git cherry-pick f422295
    121. [detached HEAD 5a3d9e8] day11-240115-用户端后端搭建&网关&redis缓存
    122. Date: Tue Mar 5 21:23:26 2024 +0800
    123. 33 files changed, 692 insertions(+), 6 deletions(-)
    124. create mode 100644 spzx-common/common-service/src/main/java/com/atguigu/spzx/common/handler/config/RedisConfig.java
    125. create mode 100644 spzx-model/src/main/java/com/atguigu/spzx/model/dto/h5/ProductSkuSearchDto.java
    126. create mode 100644 spzx-model/src/main/java/com/atguigu/spzx/model/vo/h5/IndexVo.java
    127. create mode 100644 spzx-server-gateway/pom.xml
    128. create mode 100644 spzx-server-gateway/src/main/java/com/atguigu/spzx/gateway/SpzxGatewayApplication.java
    129. create mode 100644 spzx-server-gateway/src/main/java/com/atguigu/spzx/gateway/config/SpzxGatewayConfig.java
    130. create mode 100644 spzx-server-gateway/src/main/resources/application-dev.yml
    131. create mode 100644 spzx-server-gateway/src/main/resources/application.yml
    132. create mode 100644 spzx-service/pom.xml
    133. create mode 100644 spzx-service/service-product/pom.xml
    134. create mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/SpzxProductApplication.java
    135. create mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/controller/CategoryController.java
    136. create mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/controller/IndexController.java
    137. create mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/controller/ProductController.java
    138. create mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/mapper/CategoryMapper.java
    139. create mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/mapper/ProductSkuMapper.java
    140. create mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/service/CategoryService.java
    141. create mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/service/IndexService.java
    142. create mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/service/ProductSkuService.java
    143. create mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/service/impl/CategoryServiceImpl.java
    144. create mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/service/impl/IndexServiceImpl.java
    145. create mode 100644 spzx-service/service-product/src/main/java/com/atguigu/spzx/product/service/impl/ProductSkuServiceImpl.java
    146. create mode 100644 spzx-service/service-product/src/main/resources/application-dev.yml
    147. create mode 100644 spzx-service/service-product/src/main/resources/application.yml
    148. create mode 100644 spzx-service/service-product/src/main/resources/mapper/ProductSkuMapper.xml
    149. dgq@DESKTOP-JRQ5NMD MINGW64 /f/IdeaProjects/workspace/spzx-parent ((5a3d9e8...))
    150. $
    1. 使用 Git Reflog
      在项目文件夹中打开命令行,然后输入 git reflog 命令。这个命令会显示你的 Git 引用日志,包括你执行过的所有 Git 命令,尤其是那些更改了 HEAD 的命令。在输出中找到你误删提交的哈希值。

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

  • 相关阅读:
    微信小程序-自定义组件checkbox
    Maven详解
    Qt | QListView、QListWidget、QTableView、QTableWidget的使用示例及区别
    java毕业设计大学生备考平台Mybatis+系统+数据库+调试部署
    最长回文子串 Golang leecode_5
    【Flink源码】从StreamExecutionEnvironment.execute看Flink提交过程
    第十五届蓝桥杯模拟赛(第一期)
    操作系统实验
    html中登录按钮添加回车键登录
    第三章:Java运算符
  • 原文地址:https://blog.csdn.net/m0_65152767/article/details/136495487