To fetch Git modules, you can use the following command:
git submodule update --init --recursive
This command will initialize and update any submodules defined in the Git repository. It will clone the submodules if they have not already been cloned, or update them to the latest commit if they have already been cloned.
If the repository has nested submodules, you may need to use the --recursive option to ensure that all submodules are updated.
You can also use the git submodule foreach command to execute Git commands on each submodule. For example, to pull the latest changes for all submodules, you can use the following command:
git submodule foreach git pull origin master
This will execute the git pull origin master command on each submodule, pulling the latest changes from the master branch of the remote repository.
When you created a new git repo
Push an existing repo from the cli