Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 23 lines (21 sloc) 0.688 kb
#!/bin/sh
# This came from Greg V's dotfiles:
# https://github.com/myfreeweb/dotfiles
# Feel free to steal it, but attribution is nice
#
# thanks:
# https://medium.com/@porteneuve/mastering-git-submodules-34c65e940407
if [ -e "$(pwd)/.gitmodules" ]; then
if [ "$#" -eq 0 ]; then
echo 'Usage: git submodulerm <path ...>'
else
for submodulepath in "$@"; do
# git config -f .git/config --remove-section "submodule.$submodulepath"
# git config -f .gitmodules --remove-section "submodule.$submodulepath"
git submodule deinit "$submodulepath"
git rm --cached "$submodulepath"
done
fi
else
echo 'Run this from the root of your repo (which must have .gitmodules)'
fi
Jump to Line
Something went wrong with that request. Please try again.