I have one git repository which is included within another git repository; how can I merge the inner one into the outer one permanently while keeping its commit history? For a more illustrative explanation, here's my directory structure:
[dev]
> [ext]
...
> [libs]
...
> [tools]
...
The dev
is the root directory of my git repository A, which excludes everything from the ext
directory through a .gitignore rule. The ext
, in turn, is the root directory of my git repository B. I would like to only keep the repository A going forward, and for it to include everything under dev
, including the contents of ext
, while merging the commit history of B into A -- so that I have just the one repository containing all of the contents and also all of the history of A and B both.
There are no submodules involved; the separation of the repositories is done just through the exclusion rule on the outer repository.
What's the best way to do this?