I have just realised I ran a \'git init\' command from a sub-directory by mistake and then created a master repo at the root of my project.
This was a mistake,
I had created a submodule by mistake by using the git init command in both the parent and the subfolder. Just remove the .git directory and start over with one git init command in the proper directory that you want as the top directory.
A gray folder on GitHub looks like a submodule.
See for instance:
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.