Reputation: 4139
I just realized that I left one word in the commit message of a previous commit (so I can't use git commit --amend) that makes the message mean completely the opposite of what I had intended.
The commit in question is HEAD~2 on my current branch, which is ahead of the branch base. How can I edit just the message on that commit?
Upvotes: 2
Views: 174
Reputation: 265845
Use interactive rebase and mark that commit with r
(reword):
git rebase -i HEAD~3
Don't use rebase if your history was already made public
Upvotes: 3