I have a huge Git repo with some 50 Maven modules (a Maven reactor build). How can I move some of those modules into a new Git repo?
I tried git subtree
but those commands always move the code to the root of the new repo plus I can't say "I want a/
, b/
and c/d/
in my new repo" - instead I have to move each individual tree and afterwards, I have to rename the files to move then from the root into their old place (relatively speaking).
How do I export/copy/move a set of changesets filtered by path from one Git repo to another without making any changes to them? Kind of: How do I repeat history with Git?
Notes: I want to move the data. The new repos shouldn't be linked by Git in any way; Maven already does that for me. No subtree
magic necessary to push changes upstream or things like that. I want the world to look as if we had had two repos to begin with.