read

Added a git submodule by mistake, or with wrong path? The only way to go is
removing it manually. There is no built-in command to remove or fix that.

  • Remove the submodule reference from .gitmodules
  • Remove the submodule directory (git rm module-name)
  • Remove the directory .git/modules/module-name
  • Commit the changes

And you're done!

Blog Logo

Endel Dreyer

Full-stack developer. Loves Ruby and JavaScript.


Published

Image

bugfixer / @endel

About programming, tools and solving problems.

Back to Overview