Skip to content

Instantly share code, notes, and snippets.

@b23prodtm
Last active September 3, 2019 06:39
Show Gist options
  • Save b23prodtm/f285017729204b8c7cefb58cf5bdd304 to your computer and use it in GitHub Desktop.
Save b23prodtm/f285017729204b8c7cefb58cf5bdd304 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
usage="--- https://gist.github.com/b23prodtm/f285017729204b8c7cefb58cf5bdd304
Usage: $0 git-rm-submodule <path_to_submodule"
[ "$#" -lt 1 ] && echo -e $usage && exit 1
path=$1
git rm -r --cached $path
git commit -m "Removed submodule "
rm -rf .git/modules/$path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment