Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Add submodules to a git repo for every directory in the current directory
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
You can’t perform that action at this time.