How do I `git rebase -i` and prevent “You asked to amend the most recent commit, but doing so would make it empty.”?
问题 I want to run a git rebase -i some-hash . When I run it, I get the error: You asked to amend the most recent commit, but doing so would make it empty. You can repeat your command with --allow-empty, or you can remove the commit entirely with "git reset HEAD^". [...] Could not apply [...] That error seems specific to a single commit, as --allow-empty isn't an option I can pass to rebase. Apparently --keep-empty IS an option I can pass to git rebase , but it doesn't seem to fix the problem. How