3 ms·
I make empty commits when I want to update the commit message without changing anything in the referenced tree. I do this by prefixing the title of the commit
by u801e 4y ago
I make empty commits when I want to update the commit message without changing anything in the referenced tree. I do this by prefixing the title of the commit I message I want to update with squash!. Then, when run an interactive rebase with the --keep-empty flag, git will open my editor and I can just delete the original commit message and leave the new commit message I made with the squash! prefixed commit and then continue with the rebase.
This allows me to essentially show how I would change a commit message without having to run rebase or amend a commit in a code review, which hides the original commit.