Add GitHub multiple authors tip
This commit is contained in:
BIN
blog_images/book-chair.jpg
Normal file
BIN
blog_images/book-chair.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 607 KiB |
26
blog_posts/github-co-authors.md
Normal file
26
blog_posts/github-co-authors.md
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
title: How can I add multiple authors to a commit?
|
||||
type: question
|
||||
tags: git,github,programming,webdev
|
||||
authors: chalarangelo
|
||||
cover: blog_images/book-chair.jpg
|
||||
excerpt: Learn how to add multiple authors to a git commit with this quick and easy tip.
|
||||
---
|
||||
|
||||
You can add multiple authors to a git commit, by adding one or more `Co-authored-by` trailers to the commit's message:
|
||||
|
||||
```sh
|
||||
$ 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 preferrably two empty lines before any `Co-authored-by` trailers.
|
||||
|
||||
**Image credit:** [Taylor Simpson](https://unsplash.com/@taylorgsimpson?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/code?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
|
||||
Reference in New Issue
Block a user