Git does not have a integral mechanism to have multiple authors per Git commit. A Git coauthor notation convention has become accepted by some major services.
- Github: supported
- GitLab: supported
- Bitbucket: not supported
The Git coauthor convention is placing plaintext in the commit message body. To track commits on GitHub or other services, the email address cited must match a registered email with that service. The email can be a working public email or the “fake” noreply email provided by the Git service. Multiple coauthors each use the same syntax on the same Git commit.
added foo function to bar.py Co-authored-by: David <email@example.com>
On GitHub, a coauthor commit looks like:
Currently, the coauthored commit doesn’t count on the user’s GitHub contribution calendar. I suppose the coauthor commits don’t count toward the contribution calendar to avoid stuffing / inflating contribution count of users.
The coauthor commits do show up in GitHub search under “Commits”.
As with regular Git commits, there is no authentication to avoid someone masquerading as someone else with Git coauthor commits. Git coauthor commits cannot be GPG signed for each coauthor, only the primary Git committer can GPG sign as usual.