Git submodules are the way to implement dependencies between projects.
Let's say you have a common libray 'mylib' shared between apps 'myapp1' and 'myapp2' then you will keep only 3 repositories (1 for each of them).
Both 'myapp1' and 'myapp2' will have 'mylib' declared as a submodule, which is cloned from / pushed to its own repository. And the repository of each parent app will only keep a reference to the commit to use from the submodule repository.
Nested Git submodules
Extending the same principle, 'mylib' could as well be dependant on 'somebaselib', declared as a submodule and hosted elsewhere.
git clone ... --recursive git submodule update --recursive
Adding nested submodules: the problem
cd ~/mylib git submodule add git@someurl/somebaselib baselib
You may think the same would to add the nested submodules to the superproject:
cd ~/myapp git submodule add git@someurl/mylib lib
Adding nested submodules: the solution
The workaround is to manually clone the nested submodules into the subfolder with the --recursive option, before doing the 'submodule add'
cd ~/myapp git clone git@someurl/mylib lib --recursive git submodule add git@someurl/mylib lib