我是git的初学者,我有新项目的以下文件夹结构,所以我做的是我去了visual studio,我做了空项目,它有这个文件夹结构:
project: (Repo)
folder1 (sub1)
folder2 (sub2)
Run Code Online (Sandbox Code Playgroud)
我在本地使用git.
我使用sourcetree为项目创建了一个repo,
现在我无法添加任何子模块,我不知道为什么.
每当我尝试时,在powershell中:
PS E:\Projects\Project> git submodule add ./sub1
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
sub1 already exists in the index
Run Code Online (Sandbox Code Playgroud)
然后删除sub1 git rm -r sub1,然后我git submodule add再次重复,我得到了这个新错误:
sub1 already exists and is not a valid git repo
Run Code Online (Sandbox Code Playgroud)
那么我做错了什么?