Git extra author
If someone else created some source code, but for whatever reason they aren’t the one adding it to the repository. You can still have their name/photo in the git commit.
Add an extra author
Just add the following to the commit message.
Co-authored-by: Name <email@domain.com>
You can add multiple
Co-authored-by
lines if needed and be sure to add an empty line before the firstCo-authored-by
line.
Add an extra author (no public email)
If the extra author doesn’t want his/her email to become public. Or you don’t know their email address. You can use a special email address. That way github will still connect the right user, but their email stays protected (or unknown).
Co-authored-by: Name <[userID]+[github_username]@users.noreply.github.com>
- Get the correct username
- Get the Github user ID try this page
- format the email like
[userID]+[github_username]@users.noreply.github.com
Or generate the Co-Authored text here.
Contribute code to me
So you want to contribute code to me? You need to include the following in your commit message (yes the empty line is required).
Co-authored-by: Stephan van Rooij <1292510+svrooij@users.noreply.github.com>