How to split a git repository while preserving subdirectories?

Posted by Thomas on Stack Overflow See other posts from Stack Overflow or by Thomas
Published on 2010-05-09T09:30:47Z Indexed on 2010/05/09 9:38 UTC
Read the original article Hit count: 342

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about git

Related posts about git-filter-branch