Restore git submodules from .gitmodules
git submodule init only considers submodules that already are in the index (i.e. “staged”) for initialization. I would write a short script that parses .gitmodules, and for each url and path pair runs: git submodule add <url> <path> For example, you could use the following script: #!/bin/sh set -e git config -f .gitmodules –get-regexp ‘^submodule\..*\.path$’ … Read more