6

I have a large Git project which I would like to dissect into subprojects with their own repositories. Git's subtrees are ideal for this task: You first

  • create a branch with the contents of only one subfolder

    git subtree split -P <name-of-folder> -b <name-of-new-branch>
    

    and then

  • pull this branch into another repository.

For a transitional phase, I would like to have the subprojects read-only and sync them from master. For every commit to master, I could of course perform the above procedure repeatedly for all subprojects, but this seems less then ideal since it does all the work all over again.

Is there a way to merge master into the subtree branches?

Community
  • 1
  • 1
Nico Schlömer
  • 53,797
  • 27
  • 201
  • 249
  • 1
    No there is no way to merge them. I would recommend doing the splits on a memory backed filesystem in order to speed them up (e.g. `/dev/shm`). I haven't benchmarked them recently, but I think the `git filter-branch` equivalent of `git subtree split` is faster. – onionjake Jun 20 '15 at 08:09

0 Answers0