How to split a git repository while preserving subdirectories?
- by Thomas
What I want is similar to this question. However, I want the directory that is split into a separate repo to remain a subdirectory in that repo:
I have this:
foo/
.git/
bar/
baz/
qux/
And I want:
foo/
.git/
bar/
baz/
quux/
.git/
qux/ # Note: still a subdirectory
How to do this in git?
I could use the method from this answer if there is some way to move all the new repo's contents into a subdirectory, throughout history.