简体   繁体   English

git存储库中缺少文件

[英]missing files in git repository

I created a repository in github, and in my computer I created a folder cloned the repository and in that folder I added another folder with some files and after adding and commiting I pushed them to repository. 我在github中创建了一个存储库,并在我的计算机中创建了一个克隆存储库的文件夹,并在该文件夹中添加了一个包含一些文件的文件夹,并在添加并提交后将它们推到存储库中。 but in the repository in my folder there is nothing. 但是在我的文件夹中的存储库中什么也没有。 It should have a html-css folder and inside asset folder and index.html file. 它应该有一个html-css文件夹,以及资产文件夹和index.html文件。

this is my repository 这是我的仓库

After checking your github repository, I find that html-css folder was created as a submodule. 检查您的github存储库后,我发现html-css文件夹已创建为子模块。 The reason is because html-css has a .git folder and that causes github to add html-css as a submodule instead. 原因是因为html-css有一个.git文件夹,这导致github改为将html-css添加为子模块。

What you should have done was to clean up the folder by removing remnant .git folder within subfolders before pushing. 您应该做的是通过在推入之前删除子文件夹中的残留.git文件夹来清理文件夹。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM