I only found answers on how to use git subtrees to split up a repository. However, I explicitly want submodules.
It's a Java maven project. Currently, everything is in one maven project and one repository. My goal is to achieve something like this:
The root repository should contain the main pom.xml, system documentation, etc Then there should be a few submodules, one for a utility library, one for the main application, and so on. The submodules are their own maven project, referenced from the main maven project in the root repository. The root repository will not contain any source code.
I could create everything new from current HEAD, but it is important to me that the commit history is kept as complete as possible.
git submodule add ...
for each extracted subtree? – Chromatolysis