Skip to content

Instantly share code, notes, and snippets.

@cdated
Created September 10, 2015 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cdated/c43a80a56d5931e09bd2 to your computer and use it in GitHub Desktop.
Save cdated/c43a80a56d5931e09bd2 to your computer and use it in GitHub Desktop.
Remove git submodules
Remove config entries:
git config -f .git/config --remove-section submodule.$submodulepath
git config -f .gitmodules --remove-section submodule.$submodulepath
Remove directory from index:
git rm --cached $submodulepath
Commit
Delete unused files:
rm -rf $submodulepath
rm -rf .git/modules/$submodulepath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment