So I have been working on a project which deals with multiple git repos, and until now it's just existed on my local filesystem:
/workspace
/repo1 <- git repo
/repo2 <- git repo
I would like to convert the workspace directory to a git repo, with the contained directories as submodules, like so:
/workspace <- git repo
/repo1 <- submodule
/repo2 <- submodule
So I understand that with git submodules, I can add a module like so:
git submodule add <repo1 url>
git submodule add <repo2 url>
But my assumption is that this will clone these repos to my system, possibly over-writing the local versions.
Is there a way to tell git: "this directory is already a git repo: turn it into a submodule"?