我需要合并一个项目作为当前运行项目的一部分 . 其中我遵循以下步骤

git remote add tmpmerge <giturl>
git fetch tmpmerge
git merge tmpmerge/branch --allow-unrelated-histories

通过执行上述步骤,在本地检出分支 .

下面是我期望实现它的树结构

master
   module1
   module2
   pom.xml
   Dockerfile

destination
   module1
   module2
   pom.xml
   Dockerfile

destination
   source
      module1
      module2
      pom.xml
      Dockerfile
   module1
   module2
   pom.xml
   Dockerfile

我想将源repo模块合并到目标模块,如上所述结构,因为虽然将内容合并为父目录,但会覆盖当前项目中可用的一些现有文件,如pom.xml,docker file等 . 合并到当前项目父目录的瞬间我想写为子目录 . 提前致谢