Quick Tip: How to remove a Git Submodule

I love working with git, since I started toying around with it a few months back, and find it to be a far superior version control system to subversion

Anyhow, working with submodules, it's quite easy to add, init and sync, so you keep your sub-projects in-tact and up-to-date. But what if you want to remove a submodule? I found that it isn't exactly an elegant process, but after some googling, this is what you should do:

  1. In your project's root path, nano .gitmodules and delete any references to that sub-module.
  2. nano .git/config and do the same.
  3. Run git rm --cached /LOCATION/SUB_MODULE_FOLDER 
  4. Run git commit to commit any untracked stuff.
Doron KatzGit