git revert多个提交
时间: 2023-08-28 19:23:14 浏览: 118
git 提交信息规范文档
如果你想要撤销多个提交,你可以使用git revert命令,并指定需要撤销的提交范围。按照引用的第二步,你可以先切换至需要进行撤销的分支,然后执行git revert命令并指定需要撤销的提交范围。例如,如果你要撤销从commit1到commit2之间的多个提交,你可以执行以下命令:git revert -n commit1..commit2。这样,这些提交就会被撤销,并且不会被自动提交。你可以在撤销完所有提交后再手动执行一次提交。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [三分钟教你学Git(二十六) revert多个提交](https://blog.csdn.net/hongchangfirst/article/details/80986597)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Git 的 revert 命令撤销多次提交](https://blog.csdn.net/sinat_30735061/article/details/95006311)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文