Ben Huri
Ben Huri

Reputation: 13

Github grey folder

I have a school exercise about github. This is the first exercise and i have a problem. We should clone a folder first, and i did it right, then we should make "web app" with this instructions https://github.com/jce-il-ex/angular2-first-time-benhuri. in this URL you can see i have the folder "my-app" but i can't really reach it because its grey. I tried to read everything here and in web about grey folder, but i can't fix it. I don't know what to do... It's almost 4 hours since i tried everything.

I will really appreciate any help from you. Thanks.

Upvotes: 0

Views: 113

Answers (1)

Schwern
Schwern

Reputation: 164919

I dug through your commit history and I'm guessing because you didn't use real commit messages that you created a git submodule called my-app but didn't check in the .gitmodules part which says where that submodule is to be found.

When a project that uses submodules is cloned, the submodules will appear as an empty directory. Github is showing that empty directory as greyed out. You have to explicitly init and update the submodule with git submodule init and git submodule update. But your repository is lacking its .gitmodules file which says where the submodule is located.

You can read more about how this works in the Pro Git chapter on Submodules, but I'd recommend you stay away from submodules until you learn Git basics... like writing informative commit messages. :P

Upvotes: 2

Related Questions