extract multiple directories using git-filter-branch

后端 未结 4 1659
隐瞒了意图╮
隐瞒了意图╮ 2020-12-02 07:55

I have a big repository which currently contains multiple projects in top level subfolders, say /a, /b, /c, and /d.

4条回答
  •  -上瘾入骨i
    2020-12-02 08:32

    I'm not aware of any better way than tree-filter for this. So you already have all the information you need. Now just do it!

    Start by creating your two branches:

    git branch br1
    git branch br2
    

    Now for each branch, check it out, then filter it using the tree-filter.

    You could then split them out to separate directories either by pushing them out, or by cloning or pulling them in.

提交回复
热议问题