什么流程导致Github提交被“创作”?一个用户但“已提交”另一个? [英] What flow causes Github commits that are "authored" by one user but "committed" by another?
问题描述
例如,)。作者是编写特定代码的人员-提交者是将这些更改放入git历史的人员。
通常两者都是相同的(
使两者指向不同的人可以在重新设置,编辑提交(例如修改),代表他人进行提交(例如,通过指定 --author ),应用补丁( git是),挤压(例如,在合并或重新设置)或樱桃摘。
For example, this commit is claimed to be authored by mattcaswell and committed by richsalz
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?
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.
这篇关于什么流程导致Github提交被“创作”?一个用户但“已提交”另一个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!