I have two git repositories: main
and package_1
. I want to merge package_1
into main
and put it inside a folder, say package_1
. By doing this I am ok rewriting the history of main
so that I achieve interleaved commits from the two repositories, of course ordered chronologically.
I have tried solutions using git subtree add --prefix=package_1 package_1/master
or for simply git merge package_1/master
.
In the end I end up with a folder with no history at all. I have been searching how to do this but haven't yet found a solution for exactly what I am trying to achieve.