When I do an interactive rebase, e.g.
git rebase -i HEAD~3
the rebase interactive editor (vim in my case) opens to let me edit the commits
Just delete all the lines that are not comments from the file. Then save it to the default supplied path and exit the editor.
As a result git will just do nothing in this rebase.
To delete all lines in vim you can use
:%d|x
Then save and quit.
delete all lines of file in Vim
How to exit the Vim editor?
VIM - multiple commands on same line