Git Rebase Drop Removes Commits | Generated by AI

Home 2025.10

Yes — exactly.

When you use drop during an interactive git rebase -i, it means “remove this commit entirely from the history.”

Here’s what happens:

Example:

git rebase -i HEAD~4

You might see something like:

pick a1b2c3d Fix typo
pick b2c3d4e Add README
pick c3d4e5f Implement login
pick d4e5f6g Add debug log

If you change the last line to:

drop d4e5f6g Add debug log

then after saving and closing the editor, Git will rebase the branch and exclude that commit.

So yes — “drop” = delete the commit from the branch history.

Would you like me to explain how that differs from revert (which undoes a commit but keeps a record of it)?


Back

openai/gpt-5

Donate