6

I have a git repository which has several commits into different sub-directories and I want to cut the repository in two in the following way:

/
  sub1/
  sub2/
  sub3/

->

/
  sub1/

The individual subs have evolved to a point where sub1 should be an independent repository. Also there isn't a single commit that touches more than one sub.

So, I'd like to somehow extract a new repository that only takes commits made into sub1 while leaving all other stuff out. But I want to keep the history (but not have the commits related to sub2 nor sub3).

Note: I vaguely remember there to be some command to do this, but I never used it myself and don't remember what it was called, so I cannot search for it.

bitmask
  • 32,434
  • 14
  • 99
  • 159
  • Additional duplicate: [Split large Git repository into many smaller ones](http://stackoverflow.com/q/3910412/430766). – bitmask Oct 25 '13 at 16:25

0 Answers0