modified: fig1.py
[GalaxyCodeBases.git] / bash / rmgitsubmodule.sh
blobdc5b79ac5a594275a14560e6e1fc9a0319f1af8a
1 #!/bin/sh
3 # http://stackoverflow.com/questions/1260748/how-do-i-remove-a-git-submodule
5 if [ x"$1" = x"" ]; then
6 echo "Usage: $0 <git submodule name>"
7 exit 1
8 else
9 echo "Removing submodule [$1] ..."
12 git submodule deinit $1
13 git rm $1
15 # Note: [asubmodule] (no trailing slash)
16 # or, if you want to leave it in your working tree
17 #git rm --cached $1
19 echo Cleanup [.git/modules/$1]
20 rm -rf .git/modules/$1