-
1.git log获取commit信息
-
2.git rebase -i (commit-id)
-
commit-id 为要删除的commit的下一个commit号
-
3.编辑文件,将要删除的commit之前的单词改为drop,退出保存 :wq
-
-
4.保存文件退出大功告成
git rebase -i HEAD~1 (对最近1次 commit 进行 rebase)
git rebase -i 9fbf10(对 commit id 前几位为 9fbf10 的 commit 之后的 commit 进行 rebase)