1、首先找到此次提交之前的一次提交的commit 7753f40d892a8e0d14176a42f6e12ae0179a3210
2、执行如下命令
git rebase -i (commit-id)
commit-id 为要删除的commit的下一个commit号
git rebase -i7753f40
弹出如下界面
3、编辑文件,将要删除的commit之前的单词改为drop ,然后按照提示保存退出
1、首先找到此次提交之前的一次提交的commit 7753f40d892a8e0d14176a42f6e12ae0179a3210
2、执行如下命令
git rebase -i (commit-id)
commit-id 为要删除的commit的下一个commit号
git rebase -i7753f40
弹出如下界面
3、编辑文件,将要删除的commit之前的单词改为drop ,然后按照提示保存退出
本文标题:git删除中间commit
本文链接:https://www.haomeiwen.com/subject/azhcvrtx.html
网友评论