Quick tip on how to remove Git submodule.
- Remove the relevant line from the .gitmodules file
- Delete the relevant section from .git/config (if any)
git rm --cached path_to_submodule
(without trailing slash)
- Commit and delete the now untracked submodule files.
According to the msysgit wiki on GitHub and the related fix this error, Filename too long, comes from a Windows API limitation of file paths having 260 characters or fewer.
To resolve this issue, run the following command from GitBash or the Git CMD prompt (as administrator):
git config --system core.longpaths true
This will allow file paths of 4096 characters.