I often forget to reference issues or documentation in commit messages, how to fix them?
To fix the latest commit message run
1 $ git commit --amend
edit and save the buffer. Done.
Want to edit an old commit message?
If you find a mistake in an older commit, but still one that you have not
published yet to origin, you use git rebase interactive mode, with
rebase -i marking the change that requires correction with edit.