0

I am new to GitHub and finding it incredibly hard to learn. I am following the instructions here to create new repositories from an existing directory containing the project and typing git init ... etc.

However I created a repository in the wrong place and then deleted it by going into Settings at github.com. Then, when I tried to re-push the files the way I wanted it, one of the subfolders is now black (the one I had just deleted the repository for) and now not clickable - i.e. does not appear to be there. See statistics_project1 in screenshot below.

It's very hard to troubleshoot a problem like this. There is no error message or explanatory text when you hover over the black sub-folder.

This post seems similar but I don't know. The solution looks complicated. Cannot remove submodule from Git repo

Could someone please tell me what a black 'unclickable' folder means in a github repository?enter image description here

Community
  • 1
  • 1
Bill
  • 10,323
  • 10
  • 62
  • 85

2 Answers2

2

Cannot remove submodule from Git repo [duplicate] had give the answers and steps to do if you have git installed.

"Via the page Git Submodule Tutorial:

To remove a submodule you need to:

  1. Delete the relevant section from the .gitmodules file.

  2. Stage the .gitmodules changes git add .gitmodules

  3. Delete the relevant section from .git/config.

  4. Run git rm --cached path_to_submodule (no trailing slash).

  5. Run rm -rf .git/modules/path_to_submodule

  6. Commit git commit -m "Removed submodule "

  7. Delete the now untracked submodule files :rm -rf path_to_submodule"

copy from remove a submodule

Community
  • 1
  • 1
Demon Coldmist
  • 2,560
  • 2
  • 13
  • 21
  • This sounds complicated. Thanks but not sure I know enough about this to implement these instructions. For example. I don't understand what "Stage the .gitmodules changes git add .gitmodules" means. – Bill Jul 19 '16 at 16:10
0

In fact the solution was a lot simpler. The 'blackened' folder is in fact the old repo that was not properly removed locally. As recommended by the author of the minimal tutorial I mentioned above, I simply removed the .git subdirectory which contains all git info and then re-pushed the repository to github.com and now everything is back to normal.

enter image description here

Bill
  • 10,323
  • 10
  • 62
  • 85