Skip to content

Instantly share code, notes, and snippets.

@eLod
Created November 22, 2011 01:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eLod/1384566 to your computer and use it in GitHub Desktop.
Save eLod/1384566 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment