Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

enter image description here

What usage flow could have caused this? Suppose I want a commit which is authored by someone else and committed by me to appear in a repo where I'm a contributor - how would I have that?

like image 591
sharptooth Avatar asked Aug 15 '14 13:08

sharptooth


People also ask

What does authored and commited mean in GitHub?

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).

Why are my commits linked to the wrong user?

GitHub uses the email address in the commit header to link the commit to a GitHub user. If your commits are being linked to another user, or not linked to a user at all, you may need to change your local Git configuration settings, add an email address to your account email settings, or do both.

What is author and committer in git?

The author is the person who originally wrote the code. The committer, on the other hand, is assumed to be the person who committed the code on behalf of the original author. This is important in Git because Git allows you to rewrite history, or apply patches on behalf of another person.


1 Answers

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.

like image 131
MrTux Avatar answered Nov 10 '22 23:11

MrTux