3

I have a git repository with several submodules which i would like to convert into one single repository containing all the history. Is this possible?

The closest solution I've found is to merge the submodules into the parent repo as described in these questions:
un-submodule a git submodule
Git merge submodule into parent tree cleanly and preserving commit history

But as far as I understand this does not change the history of the parent repository.

Note that this repository is not public and thus I have no problem with changing the history.

Community
  • 1
  • 1
juppman
  • 163
  • 1
  • 8
  • Does the second part of the answer in a question you linked here not answer your question? http://stackoverflow.com/a/1789374/1394473 "If you also want to preserve the history of the submodule, you can do a small trick..." – tom Nov 06 '15 at 15:32
  • It is close to what I seek but not exactly what I am after, at least from my understanding. As I understand that will still cause the history of the main repository to contain references to the submodules. I would like to flatten the repository structure, i.e. change the history of the main repository so that it includes the history of the submodules. – juppman Nov 09 '15 at 06:23
  • Possible duplicate of [Convert Git submodule to subtree](https://stackoverflow.com/questions/28215244/convert-git-submodule-to-subtree) – kenorb Dec 06 '17 at 21:25

0 Answers0