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

sharptooth picture sharptooth · Aug 15, 2014 · Viewed 17.9k times · Source

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?

Answer

MrTux picture MrTux · Aug 15, 2014

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.