Skip to main content

Esta versão do GitHub Enterprise Server será descontinuada em 2026-08-25. Não há suporte para versões descontinuadas. Nenhum lançamento de patch será feito, mesmo para questões críticas de segurança. Para obter melhor desempenho, segurança aprimorada e novos recursos no GitHub Enterprise Server, consulte Overview do processo de atualização. Para obter ajuda com a atualização, entre em contato com o GitHub Enterprise Support.

Creating a commit with multiple authors or on behalf of an organization

Attribute commits to multiple authors or organizations using trailers in commit messages for better collaboration and transparency.

Creating a commit with multiple authors

Add one or more Co-authored-by trailers to a commit message to attribute a commit to multiple authors.

Required co-author information

Before adding a co-author, get the email address they want used in the trailer. For the commit to count as a contribution, use an email address associated with their account on sua instância do GitHub Enterprise Server.

If a co-author keeps their email address private, use their GitHub-provided no-reply email. See Configurar o endereço de e-mail do commit.

Creating co-authored commits using GitHub Desktop

You can use GitHub Desktop to create a commit with a co-author. See Realizar o commit e revisar as alterações no seu projeto no GitHub Desktop and GitHub Desktop.

Creating co-authored commits on the command line

  1. Colete o nome e o endereço de email de cada coautor.

  2. Type your commit message and a short, meaningful description of your changes. After your commit description, add an empty line instead of a closing quotation mark.

    $ git commit -m "Refactor usability tests.
    >
    >
    
  3. Add one Co-authored-by: name <name@example.com> line for each co-author, then add the closing quotation mark.

    $ git commit -m "Refactor usability tests.
    >
    > Co-authored-by: NAME <NAME@EXAMPLE.COM>
    > Co-authored-by: ANOTHER-NAME <ANOTHER-NAME@EXAMPLE.COM>"
    

The new commit and message appear on sua instância do GitHub Enterprise Server after you push. See Enviar commits para um repositório remoto.

Creating co-authored commits on GitHub

After you make changes in a file using the web editor on GitHub, add co-author trailers before you commit.

  1. Colete o nome e o endereço de email de cada coautor.
  2. Click Commit changes...
  3. In the "Commit message" field, type a short, meaningful commit message that describes the changes you made.
  4. In the text box below your commit message, add one Co-authored-by: name <name@example.com> line for each co-author.
  5. Click Commit changes or Propose changes.

The new commit and message appear on sua instância do GitHub Enterprise Server.

Creating a commit on behalf of an organization

Observação

Creating a commit on behalf of an organization is not available on GitHub Enterprise Server.

Add an on-behalf-of: trailer to a signed commit to attribute it to an organization. To use the trailer, you must be a member of the organization, and both your commit email and the organization email must be in a domain verified by the organization.

Creating commits with an on-behalf-of badge on the command line

  1. Type your commit message and a short, meaningful description of your changes. After your commit description, add two empty lines instead of a closing quotation mark.

    $ git commit -m "Refactor usability tests.
    >
    >
    
  2. Add on-behalf-of: @org <name@organization.com>, then add the closing quotation mark.

    $ git commit -m "Refactor usability tests.
    >
    >
    on-behalf-of: @ORG NAME@ORGANIZATION.COM"
    

The new commit, message, and badge appear on GitHub after you push. See Enviar commits para um repositório remoto.

Creating commits with an on-behalf-of badge on GitHub

After you make changes in a file using the web editor on GitHub, add the organization trailer before you commit.

  1. Click Commit changes...
  2. In the "Commit message" field, type a short, meaningful commit message that describes the changes you made.
  3. In the text box below your commit message, add on-behalf-of: @org <name@organization.com>.
  4. Click Commit changes or Propose changes.

The new commit, message, and badge appear on GitHub.

Further reading