Nested GIT Repository mistake method to remove it?
A gray folder on GitHub looks like a submodule.
See for instance:
- "What is this grey git icon?"
- "What does a grey icon in remote GitHub mean"
Try a git rm --cached sub-directory
(no trailing slash).
Check if you have a .gitmodules
file at the root of your main repo, with that same sub-directory in it.
See more at "Cannot remove submodule from Git repo"
git rm --cached submodule-name # no trailing slash: not submodule-name/
git commit -m "Remove submodule entry"
git push
Note the --cached option here: we don't want to remove the sub-folder, only the special entry in the index which marks it as a submodule.