简体   繁体   中英

Merge bare git repositories into one

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM