Search code examples
gitgit-commitauthorgit-amend

fatal: --author 'First Last example@example.com' is not 'Name <email>' and matches no existing author


I ran into this error when trying to amend a commit to change the author.

git commit --amend --author="First Last example@example.com"
fatal: --author 'First Last example@example.com' is not 'Name <email>' and matches no existing author

It is similar to an issue described in this post, but the error message is different, making that solution difficult to find.

How can I resolve this?


Solution

  • In my case, the problem was not putting angle brackets around my email address. Changing the command to

    git commit --amend --author="First Last <example@example.com>"
    

    resolved the error.