git 撤回reset
时间: 2023-08-17 12:12:22 浏览: 88
要撤回git reset命令,可以使用git reflog命令来查看操作日志,找到之前的commit号,然后使用git reset --hard <commit号>来回滚到该commit。这样可以恢复到reset之前的状态。
#### 引用[.reference_title]
- *1* *2* [【git撤销操作】git reset详解](https://blog.csdn.net/qq_38987146/article/details/125149888)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [git reset 撤销](https://blog.csdn.net/m0_50668851/article/details/108651112)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文