I'm in an interactive rebase and have marked the commits on which I need to have a closer look with edit
(e
) now while looking into the commits I realize that some of the commits need to be dropped/removed. Which is the correct commit to do that within the interactive mode?
Currently I perform the following commands:
$ git reset HEAD^
$ git checkout -- <File> # <- here I list all of the files that need to be reset
$ git rebase --continue # this complains that I have to perform git commit --allow-empty or git reset
# since I don't want the empty commit I do …
$ git reset
$ git rebase --continue
This is very lengthy. So I tried
$ git reset --hard HEAD^
$ git rebase --continue
But that produces a merge conflict.
So what is the easiest way to drop the current commit, when beeing in the edit mode of an interactive rebase?