mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 15:36:21 -04:00
12 lines
395 B
Bash
Executable file
12 lines
395 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test -z $1 && echo "submodule required" && exit 1
|
|
test ! -f .gitmodules && echo ".gitmodules file not found" && exit 2
|
|
|
|
NAME=$(echo $1 | sed 's/\/$//g')
|
|
test -z $(git config --file=.gitmodules submodule.$NAME.url) && echo "submodule not found" && exit 3
|
|
|
|
git config --remove-section submodule.$NAME
|
|
git config --file=.gitmodules --remove-section submodule.$NAME
|
|
git rm --cached $NAME
|