我在git中进行提交,只更改了一个文件,并且只插入一个

时间:2015-09-29 01:02:22

标签: git bitbucket

我不知道为什么,但它不会将文件添加到我想要添加的文件夹中。

这是我得到的

$ 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://pablo-r4001@bitbucket.org': 
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'

不知道该怎么做。这些子模块真的是必要的吗?我只是想在克隆的repo中添加一个文件夹。

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

1 个答案:

答案 0 :(得分:2)

issp必须是嵌套式回购:添加和提交会创建 gitlink (a special entry in the index)。请参阅" Git repository in a git repository"。

但它不是子模块。

issrep是一个子模块(在{{1>}索引中注册为gitlink)

因此,请检查您要添加和提交的文件夹(.gitmodules)是否已包含issp文件夹:这将使其成为嵌套回购。

相关问题