Created
April 9, 2012 21:10
-
-
Save abrookins/2346563 to your computer and use it in GitHub Desktop.
Add submodules to a git repo for every directory in the current directory
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
for dir in *; do cd $dir && git remote show origin -n | grep Fetch | awk '{split($0,array," ")} END{print array[3]}' | xargs -I {} git submodule add {} $dir && cd ..; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment