I prefer to use git rebase -i
for this job, because a nice list pops up where I can choose the commits to get rid of. It might not be as direct as some other answers here, but it just feels "right"feels right.
Choose how many commits you want to list, then invoke like this (to enlist last three)
git rebase -i HEAD~3
Sample list
pick aa28ba7 Sanity check for RtmpSrv port
pick c26c541 RtmpSrv version option
pick 58d6909 Better URL decoding support
Then git will remove commits for any line that you remove.
I prefer to use git rebase
for this job, because a nice list pops up where I can choose the commits to get rid of. It might not be as direct as some other answers here, but it just feels "right".
Choose how many commits you want to list, then invoke like this
git rebase -i HEAD~3
Sample list
pick aa28ba7 Sanity check for RtmpSrv port
pick c26c541 RtmpSrv version option
pick 58d6909 Better URL decoding support
Then git will remove commits for any line that you remove.
I prefer to use git rebase -i
for this job, because a nice list pops up where I can choose the commits to get rid of. It might not be as direct as some other answers here, but it just feels right.
Choose how many commits you want to list, then invoke like this (to enlist last three)
git rebase -i HEAD~3
Sample list
pick aa28ba7 Sanity check for RtmpSrv port
pick c26c541 RtmpSrv version option
pick 58d6909 Better URL decoding support
Then git will remove commits for any line that you remove.