Before you can add a co-author to a commit, you must know the appropriate email to use for each co-author. For the co-author's commit to count as a contribution, you must use the email associated with their account on your GitHub Enterprise Server instance.
Type your commit message and a short, meaningful description of your changes. After your commit description, instead of a closing quotation, add two empty lines.
$ git commit -m "Refactor usability tests. > >
Tip: If you're using a text editor on the command line to type your commit message, ensure there are two newlines between the end of your commit description and the
On the next line of the commit message, type
Co-authored-by: name <email@example.com>with specific information for each co-author. After the co-author information, add a closing quotation mark.
If you're adding multiple co-authors, give each co-author their own line and
$ git commit -m "Refactor usability tests. > > Co-authored-by: NAME <NAME@EXAMPLE.COM> Co-authored-by: AUTHOR-NAME <ANOTHER-NAME@EXAMPLE.COM>"
The new commit and message will appear on your GitHub Enterprise Server instance the next time you push. For more information, see "Pushing changes to a remote repository."
After you've made changes in a file using the web editor on GitHub Enterprise Server, you can create a co-authored commit by adding a
Co-authored-by: trailer to the commit's message.
After making your changes together, at the bottom of the page, type a short, meaningful commit message that describes the changes you made.
In the text box below your commit message, add
Co-authored-by: name <firstname.lastname@example.org>with specific information for each co-author. If you're adding multiple co-authors, give each co-author their own line and
Click Commit changes or Propose changes.
The new commit and message will appear on your GitHub Enterprise Server instance.
- "Viewing contributions on your profile"
- "Why are my contributions not showing up on my profile?"
- "Viewing a project's contributors"
- "Changing a commit message"
- "Committing and reviewing changes to your project" in the GitHub Desktop documentation