In the precise case of the bug and typo, you should probably use git commit --amend.
Anyhow, generically, while your changes are local, rewrite history to your hearts content. Have it tell a development story that makes sense. The real important part is: you can rewrite history only while it is private. When you push the commits, never ever rewrite history.
Namely, rebasing is not a replacement for merging.