When you want to change the last commit you can use git --amend to change the commit message or the files included. When you want to update the user information, you have to use it directly in the call.

git commit --amend --author="Name <name@domain.tld>"