A directory like ~/.vim with a sub directory like ~/.vim/bundle with many git repos. "Is there any way of just recursively going through and adding all submodules?" -- Stackoverflow
Last active
August 29, 2015 14:01
-
-
Save guyhughes/4dcf3c30828c7d717b3c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://stackoverflow.com/questions/10606101/automatically-add-all-submodules-to-a-repo | |
for i in $(ls -d bundle/*); do if [ -d "$i"/.git ]; then git submodule add $(cd $i && git remote show origin | grep Fetch | awk '{print $3}') ./$i; fi; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment