I have one requirement How to remove submodule from .gitmodules file using command ?
Can anybody assist on this?
There is no command to do that, you need to do it manually, as the tutorial suggests:
To remove a submodule you need to:
- Delete the relevant line from the .gitmodules file.
- Delete the relevant section from .git/config.
- Run git rm --cached path_to_submodule (no trailing slash).
- Commit the superproject.
- Delete the now untracked submodule files.
However, you could also just issue git submodule deinit
on the submodule - but it doesn't remove it from .gitmodules.