❯ git clone https://github.com/oxygine/oxygine-framework oxygine
For safety, don't change the original https://github.com/oxygine/oxygine-framework repository
git remote add oxygine-restructure [email protected]:oxygine-restructure/oxygine-framework.git
❯ git subtree split -P examples -b examples
Created branch 'examples'
1f6a6d8b480b0099986df96f06c03fe31acbce1e
~/study/c++/oxygine master 8s
❯ git checkout examples
Switched to branch 'examples'
~/study/c++/oxygine examples*
❯ git remote add examples [email protected]:oxygine-restructure/oxygine-examples.git
~/study/c++/oxygine examples*
❯ git push examples examples:master
Counting objects: 5675, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2364/2364), done.
Writing objects: 100% (5675/5675), 73.46 MiB | 2.82 MiB/s, done.
Total 5675 (delta 2972), reused 5371 (delta 2870)
To [email protected]:tony/oxygine-examples.git
* [new branch] examples -> master
https://github.com/oxygine-restructure/oxygine-examples now has the examples and all history preserved.
Now remove examples from the oxygine-framework repository itself, this vacuums out any space taken up by examples/
in history
~/study/c++/oxygine examples*
❯ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
~/study/c++/oxygine master
❯ git filter-branch --tree-filter "rm -rf examples" --prune-empty HEAD
Rewrite 1f37ee09955dca40255f1d4d194ddd1c117e86ff (200/486) (70 seconds passed, remaining 100 predicted)
Ref 'refs/heads/master' was rewritten
~/study/c++/oxygine master
❯ git subtree split -P 3rdPartyTools -b external-tools
Created branch 'external-tools'
8f2fa172d193ccb0482a98e107d46bd1c5261696
~/study/c++/oxygine master 10s
❯ git checkout external-tools
Switched to branch 'external-tools'
~/study/c++/oxygine external-tools*
❯ git remote add oxygine-restructure-external-tools [email protected]:oxygine-restructure/oxygine-external-tools.git
❯ git push oxygine-restructure-external-tools external-tools:master
Counting objects: 1084, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (715/715), done.
Writing objects: 100% (1084/1084), 35.23 MiB | 2.46 MiB/s, done.
Total 1084 (delta 353), reused 998 (delta 326)
To [email protected]:oxygine-restructure/oxygine-external-tools.git
* [new branch] external-tools -> master
See https://github.com/oxygine-restructure/oxygine-external-tools
~/study/c++/oxygine external-tools* 18s
❯ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'oxygine-restructure/master'.
~/study/c++/oxygine master
❯ git filter-branch -f --tree-filter "rm -rf 3rdPartyTools" --prune-empty HEAD
Rewrite dc9281bd60d86c6e97439e6c06b76cccd32d9dc3 (461/461) (87 seconds passed, remaining 0 predicted) `
Ref 'refs/heads/master' was rewritten
~/study/c++/oxygine master
❯ git subtree split -P doc -b doc
Created branch 'doc'
f6ab4af07da95370ea5ebdc6de9397d6548c06e1
~/study/c++/oxygine master
❯ git checkout doc
Switched to branch 'doc'
~/study/c++/oxygine doc*
❯ git remote add oxygine-restructure-doc [email protected]:oxygine-restructure/oxygine-doc.git
~/study/c++/oxygine doc*
❯ git push oxygine-restructure-doc doc:master
Counting objects: 118, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (84/84), done.
Writing objects: 100% (118/118), 21.15 MiB | 2.84 MiB/s, done.
Total 118 (delta 32), reused 103 (delta 32)
To [email protected]:oxygine-restructure/oxygine-doc.git
* [new branch] doc -> master
~/study/c++/oxygine doc* 13s
❯ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'oxygine-restructure/master'.
~/study/c++/oxygine master
❯ git filter-branch -f --tree-filter "rm -rf doc doc/* doc.zip" --prune-empty HEAD
Rewrite e57ed784991e6d5611ecda3e94c36a8dd421711a (457/458) (51 seconds passed, remaining 0 predicted)
Ref 'refs/heads/master' was rewritten
~/study/c++/oxygine master
❯ git subtree split -P oxygine/third_party -b third-party
Created branch 'third-party'
7a9bbca7c4d36055ea525412fd8c74939b312380
~/study/c++/oxygine master 9s
❯ git checkout third-party
Switched to branch 'third-party'
~/study/c++/oxygine third-party
❯ git remote add oxygine-restructure-third-party [email protected]:oxygine-restructure/oxygine-restructure-third-party.git
~/study/c++/oxygine third-party
❯ git push oxygine-restructure-third-party third-party:master
Counting objects: 1195, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (778/778), done.
Writing objects: 100% (1195/1195), 33.88 MiB | 2.83 MiB/s, done.
Total 1195 (delta 411), reused 1090 (delta 376)
To [email protected]:oxygine-restructure/oxygine-restructure-third-party.git
* [new branch] third-party -> master
~/study/c++/oxygine third-party 14s
❯ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'oxygine-restructure/master'.
~/study/c++/oxygine master
❯ git filter-branch -f --tree-filter "rm -rf oxygine/third_party" --prune-empty HEAD
Rewrite 21501e80dd67f416f4734085029b937b8e1cdd20 (455/456) (86 seconds passed, remaining 0 predicted)
Ref 'refs/heads/master' was rewritten
https://github.com/oxygine-restructure/oxygine-restructure-third-party
~/study/c++/oxygine master ⇣⇡ 51s
❯ git push --force oxygine-restructure master