I have a git repository in the parent folder. Lets call this folder "root". Then there is a sub directory in the folder, lets call it "child". What I want to do is clone a remote repository as a submodule into "child":
git submodule add git@github.com:username/repopath child/
git submodule add git@github.com:username/repopath ./child/
Both the above give me the error:
child already exists in the index
I tried removing the directory from being tracked:
git rm --cached .\child\*
git submodule add git@github.com:username/repopath child/
Then i get this error:
'child' already exists and is not a valid git repo
Any help would be most appreciated
Thanks