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
Green shows file is in git repository and committed with latest changes.
That would mean the folder (locally) is a nested Git repository, whose tree SHA1 is recorded as a “gitlink” (gray folder with straight white arrow)
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With