Skip to content

Instantly share code, notes, and snippets.

@antmd
Last active December 18, 2019 14:56
Show Gist options
  • Save antmd/3bb5a1e63e96657b0d780f349a7d873e to your computer and use it in GitHub Desktop.
Save antmd/3bb5a1e63e96657b0d780f349a7d873e to your computer and use it in GitHub Desktop.
submodule="path/to/submodule"
git rm "$submodule"
rm -rf ".git/modules/$submodule"
git config -f ".git/config" --remove-section "submodule.$submodule" 2> /dev/null
# Commit the change
git commit -m "Remove submodule $submodule"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment