2015-12-26 66 views
2

嘿所以我推了一个新的文件夹到我的GitHub仓库,它很灰暗。为什么?GitHub仓库中的灰色文件夹?

我是新来的混帐,并可能做了一些事情,导致这个,所以我怎么能从新鲜开始?

这里是我的回购链接:https://github.com/ZoidinCode/ZoidinCode.github.io/tree/master/dist

我已经卸载的Git,然后重新安装了它,也发生了这种情况:(

混帐:

cd desktop/Artificial-Reason-1.4.6 
bash: cd: desktop/Artificial-Reason-1.4.6: No such file or directory 

XXXX~/desktop/Artificial-Reason-1.4.6 (master) 
$ git add dist/header_light_dark 

XXXX ~/desktop/Artificial-Reason-1.4.6 (master) 
$ git commit -m "First commit to GitHub" 
[master 0e2035b] First commit to GitHub 
1 file changed, 1 insertion(+) 
create mode 160000 dist/header_light_dark 

XXXX ~/desktop/Artificial-Reason-1.4.6 (master) 
$ git push origin master 
Counting objects: 1229, done. 
Delta compression using up to 2 threads. 
Compressing objects: 100% (1223/1223), done. 
Writing objects: 100% (1229/1229), 49.79 MiB | 443.00 KiB/s, done. 
Total 1229 (delta 848), reused 0 (delta 0) 
To https://github.com/ZoidinCode/ZoidinCode.github.io.git 
* [new branch]  master -> master 
+1

可能的重复[在远程GitHub中的灰色图标是什么意思](http://stackoverflow.com/questions/19584255/what-does-a-grey-icon-in-remote-github-mean) – Chris

+0

Still卡住了,因为我的git行事有趣,我什么都不能做,任何帮助? @Chris –

+0

“表演有趣”并不是一个非常有用的描述。你能详细说明吗?重复问题中的答案是否有帮助? – Chris

回答

4

灰色的文件夹在GitHub上看起来像一个submodule,正如我在以下提到的:

它不是一个子文件夹,但在the index一个special entry这标志着它作为一个子模块,等等。

如果没有.gitmodules文件在你的主仓库,特殊条目是典型的加入嵌套回购的:检查您的dist/文件夹中有本身.git/子文件夹。

要解决该问题,请尝试git rm --cached dist(无尾随斜线)。
多见于“Cannot remove submodule from Git repo

git rm --cached dist 
git commit -m "Remove submodule entry" 
rm -Rf dist/.git # delete the nested repo 
git add dist 
git commit -m "Add dist plain subfolder" 
git push 
+0

'git rm --cached dist'为我工作! –

0

看起来你已经初始化这个文件夹里面的git。要将更改目录修复到此文件夹并删除.git,然后再删除addcommitpush

相关问题