I have a git repository with several branches, and I would like to split it in two repositories.
Imagine that I list all commits made to that repository, and the result is something like:
Commit #1 to branch master
Commit #2 to branch master
Commit #3 to branch fixing_bugs
Commit #4 to branch master
Commit #5 to branch fixing_bugs
Commit #6 to branch master
Commit #7 to branch adding_sexy_french_girls_to_the_code
Commit #8 to branch adding_sexy_french_girls_to_the_code
Commit #9 to branch master
So in total, this repository has 3 branches: master, fixing_bugs and adding_sexy_french_girls_to_the_code.
Now I want to split this repository in two, using commit #6. So I would have two repositories like the following:
Repository 1
Commit #1 to branch master
Commit #2 to branch master
Commit #3 to branch fixing_bugs
Commit #4 to branch master
Commit #5 to branch fixing_bugs
Having branches master, fixing_bugs.
Repository 2
Commit #6 to branch master
Commit #7 to branch adding_sexy_french_girls_to_the_code
Commit #8 to branch adding_sexy_french_girls_to_the_code
Commit #9 to branch master
Having branches master, adding_sexy_french_girls_to_the_code.
I understand this may be technically challenging, but I believe it is not impossible to do with Git (le hope).
How can I do this?
Thank you.