I have list of submodules in .gitmodules. I want to download a specific submodule i.e grpc only if there is some option enabled as true in config file. Since grpc is not required at times for my build. All submodules are in third-party directory. So .gitmodules is like:
[submodule "third-party/libzip"]
path = third-party/libzip
url = https://github.com/nih-at/libzip.git
[submodule "third-party/sqlite"]
path = third-party/sqlite
url = https://github.com/mackyle/sqlite.git
branch = sqlite-3.23.1
[submodule "third-party/grpc"]
path = third-party/grpc
url = https://github.com/grpc/grpc.git
Also is there a way to exclude the submodule specifically while executing command:
git submodule update --init --recursive
I would like to exclude grpc and submodules in grpc while submodule update. Something like:
git submodule update --init --recursive "exclude third-party/grpc"