I have a project of which I am interested in breaking out portions as open-source. I've set up nested git repositories main, one, two and three:
main/
├── one
├── three
└── two
I thought that by going into "main" and doing
git add one
git add two
git add three
(note the lack of trailing slashes), I'd set up submodules with the sub-repositories and be good to go.
However, as noted in How to track untracked content?, this only creates gitlinks and not real submodules.
Unfortunately, that answer doesn't help, as it assumes that there is a "master" repository somewhere else for "main/one", "main/two", and "main/three". I'd like these sub-repo's to be the master repositories. I'm considering fake submodules (as per Git fake submodules), but that's not a particularly ideal situation for cloning.
Any other suggestions out there?
git submodule add ./one
, but got some error (I think complaining about a lack of remote). Your solutions work wonderfully. – Transcontinental