git rebase -i @~9 # Show the last 9 commits in a text editor
# Here you can change the one you want to change from `pick` to `e` or `edit`
# After that you can either ammend it to change the message:
git commit --amend # or you can reset the changes and commit it again: `git reset @~`
# When all the changes are made, rebase it
git rebase --continue