0

I have a project that started as a dependency of another project. As such, the coding effort started from within the git repository of the parent project. We should have used a submodule, but it is in the past and can't be helped. Now, this project stands on its own and no longer has dependencies to the parent project. For many reasons, now we want this standalone project on its own repo without references to the original parent project. It is desirable to keep (most) of the commit history. We want to remove all the folders of the parent project and all commits that touched them, but preserve the history and commits of everything of the new standalone project. Is this possible to do? If so, how?

cloudraven
  • 2,484
  • 1
  • 24
  • 49
  • 1
    See `git-subtree`, specifically the `split` sub-command. – torek May 01 '18 at 16:38
  • 1
    I should add: if you need more than one option for a subtree split, you'll either need to modify the subtree script, or use `git filter-branch`. – torek May 01 '18 at 16:47
  • I will try the answers in the other question (git filter-branch). If it works for my case, I will delete my question by the end of the day. If not, I will clarify why it is different. Thanks! – cloudraven May 01 '18 at 17:51
  • 1
    There's no need to *delete* duplicate questions, they serve as alternative search terms. See https://meta.stackexchange.com/questions/10841/how-should-duplicate-questions-be-handled – torek May 01 '18 at 18:12

0 Answers0