什么流程导致Github提交被“创作”?一个用户但“已提交”另一个? [英] What flow causes Github commits that are "authored" by one user but "committed" by another?

查看:126
本文介绍了什么流程导致Github提交被“创作”?一个用户但“已提交”另一个?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,)。作者是编写特定代码的人员-提交者是将这些更改放入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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆