6

Can anyone explain why a commit in GitHub would display the following information : 'Contributor-A' committed with 'Contributor-B' on 15 Feb.

Does it mean that 'Contributor-A' is the author (who does not have the push access to the master) and 'Contributor-B' is the committer/maintainer?

Then why isn't there a PR created for merging this commit? Or does it mean that there was a closed PR about this commit, but the maintainer did not merge it via web interface but performed rebase or cherry-picking to include it?

Many thanks!

osowskit
  • 5,904
  • 2
  • 29
  • 38
  • Can you include a sample of what you are seeing and how you think something is wrong? – osowskit Apr 28 '16 at 18:28
  • Sorry I did not say it clearly. I did not find anything is wrong. I just don't fully understand the information on GitHub commit page. And I cannot find the answer via Google. I've added a figure to illustrate my question. – Xiaoyuan Xie Apr 29 '16 at 08:24
  • It is difficult to fully answer your question without seeing a GitHub link to the repository or the Git repo itself. – osowskit Apr 29 '16 at 23:49

2 Answers2

2

...maintainer did not merge it via web interface but performed rebase or cherry-picking to include it?

I was able to get this by cherry-picking a commit from another branch and directly pushing to the current branch - an example on GitHub.

A Pull Request is not required to push code between branches. A Pull Request is a method that allows developers to collaborate on changes prior to merging between branches.

osowskit
  • 5,904
  • 2
  • 29
  • 38
  • Many thanks for your example. I should have tried it by myself...I am aware that PR is not compulsory to push code. I just thought the workflow is a relatively strict rule that devs should follow. But now I know that this rule is kind of flexible. Thank you very much. – Xiaoyuan Xie Apr 30 '16 at 03:41
  • Sidenote: When using the checkboxes in the integrated commit interface in Xcode (7.3.2) you also get the effect of 'A' committed with 'A' on Github. So it's essentially cherry-picking under the hood. – Sebastián Barschkis Jun 15 '16 at 09:37
1

For sure, it happens when the pull request was merged by "Rebase and Merge" strategy via the web interface, but I'm not sure if this is the unique case.

Contributor-A committed with Contributor-B on 15 Feb.

Contributor-A submitted the pull request and Contributor-B effectively merged it.

It might happen in other scenarios as described here: how to apply a git patch as if the author committed to my repo?

Community
  • 1
  • 1
Juliano ENS
  • 785
  • 8
  • 14