0

I have a project in GitHub with a master, branch-A and branch-B. I have a file, foo.txt in the master and both branches. branch-A and branch-b are both derived directly from master.

Master - foo.txt contains 'hello' Branch B - foo.txt was changed by adding 'world' , committed and pushed, now containing 'hello world'

I then cherry picked the commit from Branch B to Branch A and pushed Branch A.

I modify master and add 'world!'.

I modify Branch-A and add a new line with 'goodbye world' on it and run git push for both master and Branch-A.

In GitHub, I submit a pull request to merge base: master .. base: Branch-A and the diff shows that 'world!' is not in master.

Master - foo.txt is now 'hello world!' Branch-A - foo.txt is now 'hello world\ngoodbye world'

but pull request shows

enter image description here

I see no ! in there either.

Why is 'hello world!' not seen on the left while it exists in master at the time of the pull request? What's going on underneath with the cherry pick that causes this?

Dave Brunkow
  • 352
  • 6
  • 20
  • I replicated on github.com; https://github.com/dbrunkow/cherry-pick-hell/compare/Branch-A?diff=split&expand=1&name=Branch-A – Dave Brunkow Jun 29 '16 at 14:35
  • Associated with http://stackoverflow.com/questions/38066345/git-cherry-pick-from-pr) – Dave Brunkow Jul 06 '16 at 20:13
  • GitHub uses tripple dot diffing; git diff Branch-A...Branch-B vs the two dot diffing; git diff Branch-A..Branch-B to display the differences when you perform pull requests. There's no way in GitHub to perform just a flat diff of files on the tip of the two branches. – Dave Brunkow Jul 08 '16 at 18:44

0 Answers0