我在 git 中提交,只更改了一个文件并插入了一个文件
I make a commit in git and get only one file changed and one insertion
我不知道为什么,但它不会在我尝试添加的文件夹中添加文件。
这是我得到的
$ 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'
不知道该怎么办。这些子模块真的有必要吗?我只是想在克隆的仓库中添加一个文件夹。
我很绝望,非常感谢任何帮助。
issp
必须是嵌套回购:添加和提交将创建一个 gitlink (a special entry in the index). See more at "Git repository in a git repository".
但它不是子模块。
issrep
是一个子模块(在索引 和 .gitmodules
中的 中注册为 gitlink)
因此请检查您要添加和提交的文件夹 (issp
) 是否尚未包含 .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://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'
不知道该怎么办。这些子模块真的有必要吗?我只是想在克隆的仓库中添加一个文件夹。
我很绝望,非常感谢任何帮助。
issp
必须是嵌套回购:添加和提交将创建一个 gitlink (a special entry in the index). See more at "Git repository in a git repository".
但它不是子模块。
issrep
是一个子模块(在索引 和 .gitmodules
中的 中注册为 gitlink)
因此请检查您要添加和提交的文件夹 (issp
) 是否尚未包含 .git
文件夹:这将使它成为一个嵌套的存储库。