What flow causes Github commits that are “authored” by one user but “committed” by another?

不想你离开。 提交于 2019-11-28 21:09:32

Git distinguishes between authors and committers (see Difference between author and committer in Git?). Authors are the people who wrote a specific piece of code - committers are the people who put these changes into the git "history".

Normally both are the same (and doesn't change on merging, cloning, pushing or pulling).

Causing the two to point to different people can happen on rebasing, editing a commit (e.g. amending), doing a commit on behalf of someone else (e.g. by specifying --author), applying patches (git am), squashing (e.g., on merge or rebase), or cherry-picking.

Since March 2019 (5 years after the OP's question), there is another scenario where a commit authored by one person, and committed by another, especially in the context of the organization github.com/openssl used in the question.

Creating a commit on behalf of an organization

Developers can indicate their intent to contribute to a project on behalf of an organization.
This can help minimize confusion over ownership, for example, when contributing to a third-party project on behalf of your employer.

For a given commit to be associated with an organization:

  • The committer must add an On-behalf-of commit trailer to the commit, in the form of: On-behalf-of: @ORG <ORG CONTACT EMAIL>,
  • The committer must be a member of the organization,
  • The commit must be committed with an email in the organization’s verified domain, and
  • The commit must be signed.

Support for the On-behalf-of commit trailer is currently in public beta.
For more information, see creating a commit on behalf of an organization.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!