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

2
  • could you paste your address of your repository where would find the problem? Commented Jul 19, 2016 at 1:08
  • github.com/basicmachines/statistics Commented Jul 19, 2016 at 1:28

2 Answers 2

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

Sign up to request clarification or add additional context in comments.

1 Comment

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.
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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.