If I clone a git repository and the repository has a .gitmodules file, then git submodule init successfully init submodules and git submodule update downloads submodules to local directories. But if I manually download the same project, but without the .git directory(because the repository isn't cloned), and the project still has a .gitmodules file, I create a new git repository using the command git init and init submodules using the command git submodules init, but in this case the command prints nothing, and git submodule update does nothing. Why? How can I download submodules in just created local repository?
.gitmodules
git submodule init
git submodule update
.git
git init
git submodules init
1.4m articles
1.4m replys
5 comments
57.0k users