Ignoring or skipping certain commits on Git
This question already has an answer here:
You can run git rebase -i hash_to_your_7th_commit
and delete commits 8 and 10 but you are most likely going to get lots of conflicts.
Another option is git checkout -b 7th_commit
and cherry-pick
commits 9 and from 10 to 15. Keep in mind that if you give a range 10..15 cherry-pick
will start at 11.
I would recommend though to just revert
these two commits because you may change your mind about pushing it someday.
上一篇: 如何删除推送提交并恢复到旧提交?
下一篇: 忽略或跳过Git上的某些提交