7

I'm working with a friend on a little project hosted at github.

What is special about this project is that we would like to use lots of orphan branches. But it seems we can't do pull request for such branches!?

Github complains that the branches don't have a common history (which of course is true).

So the question is: How do I 'copy/pull' a complete orphan branch from one repository to another?

Jens Schauder
  • 77,657
  • 34
  • 181
  • 348
  • Github probably does that so people don't start cramming their entire companies set of repositories into a single repository. In principle, there is nothing preventing Git from merging two orphan branches, as you have seen from using the command line. A shared ancestry just helps Git sort out complex merges. – Jacob Groundwater Jan 28 '13 at 17:46

1 Answers1

2

I don't see how a pull request could work, but here is what you can do:

  • Clone the target repository to your local computer.

  • create and checkout a new orphan branch

  • merge the remote branch orphan branch into the local orphan branch

  • push it to the target repository.

Jens Schauder
  • 77,657
  • 34
  • 181
  • 348