Just add to this: The --author option mentioned in the accepted answer will only override the author, not the commit information about the commit.
In most cases, this is the correct behavior, but if for some reason you need to manually override the information <commander , use the GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL environment variables (there is GIT_COMMITTER_DATE ). See Git-Internals-Environment-Variables
$ GIT_COMMITTER_NAME="New Name" GIT_COMMITTER_EMAIL="name@email.com" git commit --author="New Name <name@email.com>"
This will make the commit appear as if it were the author and committed by the specified user.
friederbluemle May 19 '15 at 20:48 2015-05-19 20:48
source share