0

I have three repositories with a large git branching model each and I want to join the complete history of all branches of each repository into one of them.

The purpose of this task is to move one repository to Github and to have all the respective history of branches into one bare repository .

Thanks in advance

EDIT: this question [How do you merge two Git repositories? but I've checked the question and: a- Submodules scheme is not what we are looking for. b- Subtree scheme dows not bring the complete history of branches to one unified origin.

The question answer of Andresch Serj is in the path I believe to what I need. However with this solution I cannot as far I know all the remote branches from one origin into the other if I don't checkout each and then push to the other origin repo. I need, if it is possible, an automated way of doing that.

Community
  • 1
  • 1
  • Possible duplicate of [How do you merge two git repositories?](http://stackoverflow.com/questions/1425892/how-do-you-merge-two-git-repositories) – George Hilliard Nov 11 '15 at 19:16
  • You're going to need to describe what the relationships between the existing repositories are, and what files/directories exist where, and what you want the final output to look like. As it is, this question is not at all clear. – ams Nov 16 '15 at 13:49

1 Answers1

0

Use Reposurgeon; it's a great tool doing this type of thing. The best thing about it is that you will usually create a script file with the commands needed to perform your particular surgery, allowing you to tweak and rerun it during development.

db48x
  • 3,108
  • 24
  • 16