Friday, April 19, 2013

Remove a git sub-module (How to)

How to remove a submodule (Excerpt from https://git.wiki.kernel.org/index.php/GitSubmoduleTutorial#Removal)
1. Delete the relevant line from the .gitmodules file.
2. Delete the relevant section from .git/config.
3. Run git rm --cached path_to_submodule (no trailing slash).
4. Commit the superproject.
5. Delete the now untracked submodule files.