Created
December 11, 2012 03:00
-
-
Save MasWag/4255594 to your computer and use it in GitHub Desktop.
removing git 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/sh | |
#This script removes a submodule of git. | |
#All you have to do is to put this script to a pathed directiry, and type `git submodule-rm <submodule>` | |
#(You may have to type `chmod +x git-submodule-rm`) :P | |
if [ $# -ne 1 ] ; then | |
echo "usage: git submodule-rm <submodule>"; | |
echo "No submodule specified, no submodule removed." 1>&2; | |
exit 1; | |
fi | |
git config --remove-section submodule.$1 | |
git config --file .gitmodule --remove-section submodule.$1 | |
git rm --cached $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment