I've found several simple examples using both filter-branch and subtree, but they always are just moving 1 directory around. I'd like to take the following repo:
/ Project1.sln Project2.sln Source/ CommonLib.Data/ CommonLib.Web/ Project1.Data/ Project1.Web/ Project1.Other/ Project2.Data/ Project2.Web/ And move things out to their own repos, with the following structure:
# CommonRepo / CommonLib.Data/ CommonLib.Web/ # Project1Repo / Project1.sln Project1.Data/ Project1.Web/ Project1.Other/ # Project2Repo / Project2.sln Project2.Data/ Project2.Web/ While maintaining the entire history. To complicate things, there are 1 or more branches of the original repo that correspond to each project, and thus the version of CommonLib the other projects referred to may be slightly different.
I'd like to use git subtree add to add a reference back to the CommonLib in each of the new repos at the correct tag/revision, but first I need a way to split several directories at once off into their own location.
git subtree split -P seems to only want 1 directory, and I haven't been able to get filter-branch to grab the multiples, either. I'm on a windows box so don't have all the scripting niceties set up to make this easier.
Any advice?