I happened to change a name of a directory within my local repository and then proceeded to push this change up to my github repository. In effect, it caused this repository to turn into a git submodule which is displayed as a green icon on github and there is no way to drill down further in to the directory to view individual files.
How do I remove the submodule from github?
Remove the directory as file.
git rm --cached path/to/directory
Note that you don't use a trailing slash. This will delete the special file that point to the commmit in the subrepository.
Remove the .git folder inside the /path/to/directory before re-adding the directory into the index.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.