Last active
September 13, 2018 06:27
-
-
Save json2d/192be45b3451c22300225881ca835489 to your computer and use it in GitHub Desktop.
removing a git submodule binding properly w/o deleting files https://stackoverflow.com/questions/1260748/how-do-i-remove-a-submodule
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
#!/bin/bash | |
mv $1 $1_tmp | |
git submodule deinit -f -- $1 | |
rm -rf .git/modules/$1 | |
git rm -f $1 | |
# Note: a/submodule (no trailing slash) | |
# or, if you want to leave it in your working tree and have done step 0 | |
git rm --cached $1 | |
mv $1_tmp $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment