Ahmed
Ahmed

Reputation: 15069

Git repository from github empty green folder

I am pulling a git repository from github. When I clone the repo there is one empty folder which should have contained a project. Since other projects are referring to this folder.

When I browse the repo on the github the folder shows in green color.

Is there something that I am missing ?

I am using

git clone https://github.com/TomTasche/Announcify.droid.git

The command works and it clones the repo successfully to my machine, but that green folder is empty , the rest of code is downloaded fine..

check this page of repo https://github.com/TomTasche/Announcify.droid

Upvotes: 6

Views: 3121

Answers (1)

patthoyts
patthoyts

Reputation: 33223

It is a submodule. In your checked out project do git submodule update --init and it should fix things.

In the latest versions of git the clone operation has a --recursive option to automatically initialize the submodules but I don't think most tools are using this yet.

git submodule init dirname and git submodule update --init are the normal commands to create the local copy.

See the git book for more about submodules.

Looking closely at the linked repository - I think you might need to contact the author and get them to commit the .gitmodules file in the toplevel folder as that is where the submodule initialization configuration is stored. Here is a link to another project that has a submodule (msysgit) for comparison. In that project, the git folder is a submodule.

Upvotes: 6

Related Questions