Which thread causes Github to commit what the "author" of one user has done, but "done" of another?

For example, this fixation is claimed to be authored by mattcaswell and committed by richsalz

enter image description here

What use flow could cause this? Suppose I want to make a commit that was authored by someone else and committed by me to appear in the repo where I am the author - how would I have it?

+26
source share
2 answers

Git distinguishes between authors and committers (see The difference between author and commit in Git? ). Authors are people who wrote a specific piece of code, and committers are people who make these changes to git's “history”.

Usually both are the same (and do not change when merging, cloning, pushing or pulling).

The reason that they point to different people can occur when you rebase , edit a commit (for example, make changes ), commit on behalf of someone else (for example, by specifying --author ), apply patches ( git am ), squash (for example, to combine or relocate ), or picking cherries .

+25
source

Starting in March 2019 (5 years after the OP question), there is another scenario where a commit is created by one person and commited by another, especially in the context of the github.com/openssl organization used in this matter.

Create a commit on behalf of the organization

Developers can indicate their intention to contribute to the project on behalf of the organization.
This can help minimize confusion regarding ownership, for example, when participating in a third-party project on behalf of your employer.

For this commit to be associated with the organization:

  • The committer must add the On-behalf-of trailer fixation to the fixation, in the form: On-name Organization: @ORG <ORG CONTACT EMAIL> ,
  • The participant must be a member of the organization,
  • To commit, you must send an email to 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 Create a commit on behalf of an organization .

https://help.github.com/assets/images/help/repository/write-commit-message-on-behalf-of-trailer.png

+3
source

Source: https://habr.com/ru/post/1200417/


All Articles