Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git repository from github empty green folder

Tags:

git

github

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

like image 919
Ahmed Avatar asked Jun 19 '12 11:06

Ahmed


People also ask

What does green mean in git?

Green shows file is in git repository and committed with latest changes.

What does a folder with an arrow mean in GitHub?

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)


1 Answers

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.

like image 75
patthoyts Avatar answered Oct 07 '22 01:10

patthoyts