Search code examples
gitgit-rebase

git rebase -i --retain-empty-commits


By default, when you use git rebase -i it comments out empty commits and I have to uncomment them (they're helpful to me). Is there an option to the rebase command that will prevent this unwanted assumption that I don't want to preserve them?


Solution

  • Okay, that was easier than expected:

    git rebase -i --keep-empty
    

    Hopefully this post will speed up others Googling to find the answer.