Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There is no option to just do reorganization of the existing repo and renaming - it will keep all the old references and versions of junk and keep adding to the size, which is uncouth.

Options

To split there are 2 choices, each *should* keep history properly if done right, but it should be easy to see why #1 is far easier given the piles of stuff in nds-labs,
which is 50MB - quite large given what's in there - some due to mistakes and some due to just piles of old junk.
By the way apictl is over 2/3 of the entire size, looks like the binary is the culprit.

...

  1.  Inclusive style - in a clean directory:
    1. Clone nds-labs to labs.1
    2. remove the origin from labs.1
    3. clone labs.1 to labs.2 and remove originn from labs.2
    4.  In labs.2, merge v2
    5. clone labs.2 to labs.3 and remove it's origin
    6. Arrange the subdirectory that you want to keep - ignore everything outside of the directory - it doesn't matter.
      1. Use git mv to move everything under the path you wish to keep
      2. git rm -f inside the new path - everything that you don't want but ignore anything not under the path - just make that folder nice.
      3. git commit
      4. Every time you make a major change you can clone again, in case you discover something down the line you can rm -r the broken clones and redo
        1. clone the next step: labs3 to labs4 and remove the origin from the new clone
        2. Keep arranging and commit
    7. When you're done arranging:   You should have some clone of clone of .clone of .... where you are on master and you have one subdirectory where you have
      the good stuff and no junk.....
    8. Make one more step-clone
    9. git filter-branch --prune-empty --subdirectory-filter <path to what you keep>
    10. Make the repo in git, bare (no readme or anything)
    11. git remote add origin <github url>
    12. git push origin master
  2. Exclusive style:
    1. Don't try it, it's rough and error prone
    2. But if you wish, it's a similar clone-change-commit/clone-change-commit/.... process as in inclusuve
      1. But you need to redact every file and directory that you wish to omit, and it's much easier to setup what you want and split - see Inclusive above.

Moderately complicated example:

The goal -  cut the developer-shell out of v2:devtools/Makefiles and v2:devtools/ndsdev into ndslabs-developer-shell

...