简体   繁体   English

如何合并git仓库和维护分支

[英]How to merge git repos and maintain branches

I have several git repos that I would like to merge into one. 我有几个git仓库,我想合并成一个。 Is there a way to do this and maintain the branches? 有办法做到这一点并维护分支机构吗? I don't want to merge just master branches. 我不想只合并主分支。

Thanks 谢谢

Merging repo can mean: 合并回购可能意味着:

  • git submodules : you keep them as separate repos, but one parent repo register a precise SHA1 reference for each one in their own respective subfolders git子模块 :您将它们保留为单独的存储库,但一个父存储库在其各自的子文件夹中为每个存储库精确注册了SHA1引用
  • git subtree merging : you have only one repo (and one master branch), even though each of the subrepos are in their own subfolders. git subtree merging:即使每个子存储库都在各自的子文件夹中,您也只有一个存储库(和一个master分支)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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