Bill
Bill

Reputation: 11623

GitHub repository folder icon is black and not click-able

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

Upvotes: 0

Views: 1481

Answers (2)

Bill
Bill

Reputation: 11623

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

Upvotes: 0

Demon Coldmist
Demon Coldmist

Reputation: 2670

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

Upvotes: 2

Related Questions