Merge repository into a folder of an other repository

I want to merge a repository into a folder of an other repository.

Currently, it looks like this :

I have multiple repositories like A, B, C,…

-> A 
   .git
-> B
   .git
-> C
   .git

And then I have only one repository for example called R which contains folder A,B,C (which are not git repositories but only folder which contains almost the same stuff than the previous A,B,C git repositories) :

-> R
   .git
   A
   B
   C

I want to merge A repository with the A folder in R repository, B repository with the B folder in R repository, etc.

What would be the best solution ?

Have you looked into submodules? These allow you to have repositories inside of repositories. You can replace the A folder in the R repository with a submodule for A, etc.

Didn’t knew about “submodules”, will look into it tomorrow, thanks :slight_smile: . But I don’t think this really what I want, will tell you later.