Created
February 4, 2017 12:30
-
-
Save jonathanstowe/c0b5be2abb2f45d5b1018984f7dcf6ae to your computer and use it in GitHub Desktop.
Remove unwanted submodules
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 | |
if [ -d $DIR ] | |
then | |
if [ -f $DIR/.gitmodules ] | |
then | |
pushd $DIR | |
git status | |
MOD=`cat .gitmodules | awk '/path = / { print $3 }'` | |
git reset HEAD | |
rm -rf $MOD | |
rm .gitmodules | |
popd | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment