Changing the commit author

Posted by Jon Bullen on 2020-10-14
Estimated Reading Time 1 Minutes
Words 102 In Total

So, you made some commits and then realise you used the wrong author and email address. No problem, use the following command to update them all and then you can push with consistent happiness.

This assumes you are doing this in PowerShell, if in bash you may need to escape the quotes differently.

The GIT commit id is the one before the commits with the wrong author. For the Author use the format name <>


git rebase --onto 6b4b751 --exec "git commit --amend --author='Fred Smith <>'" 6b4b751

If you like this blog or find it useful for you, you are welcome to comment on it. You are also welcome to share this blog, so that more people can participate in it. If the images used in the blog infringe your copyright, please contact the author to delete them. Thank you!