Remove a Submodule

How to remove a submodule from a git repository:

  1. git rm <path-to-submodule>
  2. rm -rf .git/modules/<path-to-submodule>
  3. git config --remove-section submodule.<path-to-submodule>

See the full context in this Stack Overflow answer.


Date
May 19, 2024