2015-09-29 48 views
2

我不知道为什么,但它不会将文件添加到我试图添加的文件夹中。我在git中进行了一次提交,并且只获得了一个文件更改和一个插入

这里就是我得到

$ git commit -m 'come on' 
[master (root-commit) fed7d44] come on 
1 file changed, 1 insertion(+) 
create mode 160000 issp 

还有许多多个文件我要上传。

我曾试图以添加的一切,我试过以下之前:

it rm -f --cached issp 

的结果是什么,我仍然得到同样的错误。

我也尝试下面的命令:

git submodule update --init 

然后尝试使用下面的命令

git clone --recursive my-repo-or-whatever 

再次进行克隆,并得到了下面的输出都

No submodule mapping found in .gitmodules for path 'issp' 

和:

Cloning into 'issrep'... 
Password for 'https://[email protected]': 
remote: Counting objects: 2, done. 
remote: Total 2 (delta 0), reused 0 (delta 0) 
Unpacking objects: 100% (2/2), done. 
Checking connectivity... done. 
No submodule mapping found in .gitmodules for path 'issp' 

不知道该怎么做。这些子模块真的需要吗?我只是试图添加一个文件夹克隆回购。

我很绝望,任何帮助都很多,非常感谢。

回答

2

issp必须是嵌套回购:添加和提交将创建一个gitlink(一个special entry in the index)。详情请参阅“Git repository in a git repository”。

但它不是子模块。

issrep是一个子模块

因此,检查,如果你想添加并提交(issp)的文件夹(在索引.gitmodules注册既作为gitlink)已经不包括在.git文件夹它:这将使它成为一个嵌套回购。

+0

这听起来像是一种合理的可能性 –

+0

这正是我所需要的。非常感谢。 –

相关问题