maiermic
maiermic

Reputation: 4984

Git doesn't clone all directories

I try to clone antlr4dart repository

git clone https://github.com/tiagomazzutti/antlr4dart

but subdirectory antlr4dart/antlr4dart-runtime stays empty. All other files are cloned as I expected. What have I done wrong?

Thanks, Michael

Upvotes: 1

Views: 5420

Answers (3)

uki
uki

Reputation: 45

keep in mind that folders preceded by a . don't show up. you can still access them by the cd command.

Upvotes: 0

user2391174
user2391174

Reputation: 138

After the cloning, you have to jump into the directory:

cd antlr4dart

To get all the submodules of a directory cloned, do:

git submodule update --init

With version 1.6.5 of Git and later, you can use:

git clone --recursive git://github.com/foo/bar.git

Upvotes: 5

VonC
VonC

Reputation: 1324757

You need to add (after the git clone):

cd antlr4dart
git submodule update --init

That gray "antlr4dart-runtime" folder in the GitHub repo is a submodule, with a gitlink entry referring to the SHA1 1f4b2b6 of that submodule repo.

Upvotes: 5

Related Questions