Skip to content

Instantly share code, notes, and snippets.

@eLod
eLod / gist:1384566
Created November 22, 2011 01:09
Add submodules from .gitmodules when the submodules are not committed to the repo (just the .gitmodules file, leading to git submodule init/update doing nothing).
for i in `git config -f .gitmodules --get-regexp path | cut -d" " -f2` ; do git submodule add $(git config -f .gitmodules --get submodule."$i".url) $i ; done