This way is recommended for private development.
If you are in team, use more appropriate way.
Have you experienced that your commit is not related to your account on GitHub haven't u?
Yes it's me.
So, I've wrote down here how to solve it.
1. Use filter-branch command
You'd like to change all history(all branches)
$ git filter-branch -f --env-filter "GIT_AUTHOR_NAME='new.name';GIT_COMMITTER_NAME='new.name';GIT_AUTHOR_EMAIL='new.email@mail.com';GIT_COMMITTER_EMAIL='new.email@mail.com'" -- --all
2. Use the force
You need push after modified.
git push -f
Refs