Re:Git Commands You Probably Do Not Need
by u801e on Monday January 23, 2023 @08:36AM
(#34488551)
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.
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.