Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add a co-author to latest pushed git commit?

I need to add a co-author to my last commit and I tried using git commit --amend --author="name <[email protected]>" 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.

like image 889
GabbyJ Avatar asked Jan 25 '23 16:01

GabbyJ


1 Answers

"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 <[email protected]>
like image 87
1615903 Avatar answered Jan 27 '23 05:01

1615903