Files
30-seconds-of-code/blog_posts/github-co-authors.md
Isabelle Viktoria Maciohsek 9482b077ec Bake dates into articles
2021-06-13 19:52:48 +03:00

904 B

title, type, tags, authors, cover, excerpt, firstSeen, lastUpdated
title type tags authors cover excerpt firstSeen lastUpdated
Tip: How to add multiple authors to a commit tip git,github,programming,webdev chalarangelo blog_images/book-chair.jpg Learn how to add multiple authors to a git commit with this quick and easy tip. 2020-08-18T12:14:24+03:00 2021-06-12T19:30:41+03:00

You can add multiple authors to a git commit, by adding one or more Co-authored-by trailers to the commit's message:

$ git commit -m "Refactor usability tests.
>
>
Co-authored-by: name <name@example.com>
Co-authored-by: another-name <another-name@example.com>"

Notes:

  • To correctly attribute a commit to a co-author, you must use the email associated with their GitHub account.
  • If a person's email is private, you can use their GitHub-provided no-reply email.
  • Leave one or preferably two empty lines before any Co-authored-by trailers.