Git rebase interactive drop vs deleting the commit line

What is the difference from drop in the Git interactive rebase and just deleting the line of the commit?


There is no difference by default; it's just another way to say the same thing.

But, if you set rebase.missingCommitsCheck to warn or error, then removing a line will trigger a warning (useful for detecting a messed-up cut-and-paste).

Then setting the line to drop explicitly tells Git that you want to drop that commit, and no warning is shown for it.


There is in fact another small difference:

You can explicitly "drop" all commits. The effect will be the same as a reset.

However if you just delete all lines, then git will tell you "Nothing to do".

Usually you would not use rebase anyway in that case. I learned the difference only when I tried to explain removing a commit with rebase to a co-worker using a dummy commit.