Skip to main content

How can I remove a submodule from a Git repository?

10 Aug 2013 - git

  1. Delete the relevant section from the .gitmodules file.
  2. Delete the relevant section from .git/config.
  3. Run git rm --cached subproject-path (no trailing slash).
  4. Commit and delete the now untracked submodule files.

References