I need to add a co-author to my last commit and I tried using git commit --amend --author="name <name@email.com>"
but change --author
to --co-authored-by
. I thought this would be an easily google-able fix but everything is only for authors and not co-authors.
"Co-author" is not a git concept. It is a convention in commit messages used by some services, including GitHub. So, the solution is to edit the actual commit message with git commit --amend
and add a line to the end:
Co-Authored-By: Name <name@email.com>