Git: How to remove submodule reference without removing the submodule repository

Viewed 97

As the title says I want to remove just a reference to other repository from my main repository without removing the files from that repository. As I can see all commands from git removes the repository files and I do not want to do this.

1 Answers

You should try with:

git submodule deinit {{SUBMODULE_PATH}}
rm -rf .git/modules/{{SUBMODULE_PATH}}
Related