How to `git submodule add` Existing sub Repository?
What went wrong Where you went wrong is doing the $ git add . That adds everything, so also foo/bar, to the index of the current repository (ready to be committed thus). Correct way If you just don’t do that and continue with $ git submodule add https://github.com/CarloWood/XYZ.git foo/bar then that should work; this would … Read more