8

I have a directory "ui-kit" that shows up on github as a grey folder. It's not clickable.

Github screenshot

Here is the whole content of .gitignore:

# Fleetwit docs uploads/* .env *.prj *.pui # Logs logs *.log #Node node_modules # ========================= # Operating System Files # ========================= # OSX # ========================= .DS_Store .AppleDouble .LSOverride # Thumbnails ._* # Files that might appear on external disk .Spotlight-V100 .Trashes # Directories potentially created on remote AFP share .AppleDB .AppleDesktop Network Trash Folder Temporary Items .apdisk # Windows # ========================= # Windows image file caches Thumbs.db ehthumbs.db # Folder config file Desktop.ini # Recycle Bin used on file shares $RECYCLE.BIN/ # Windows Installer files *.cab *.msi *.msm *.msp # Windows shortcuts *.lnk 

I tried to check why it's being ignored using git check-ignore --verbose ui-kit but it doesn't return anything. I tried various syntaxes of git add without success.

The directory used to be its own repository, but was moved inside the current project and all the original git files and directories removed.

Here is the content of that directory:

enter image description here

Why is the icon grey on github? How do I keep track of the content?

4 Answers 4

21

Thanks to @Msp for giving me the piece of info I needed: the fact that it's called a sub-module.

After googling, it turns out it was just the git cache that needed to be reset.

git rm --cached ui-kit 

For people looking to fix a similar issue, you can get mode details on the following thread: un-submodule a git submodule

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

Comments

5

Because, you've created a sub-module. Usually, sub-modules appears as green. But I'm assuming it's greyed out in your case because the sub-module was incorrectly configured. Since .gitmodules is not present in your repo, it must have been deleted, leaving a sub-module without a remote information.

Read this answer for more details..

Comments

4

This can also happen when you have .git directory inside that subdirectory. In your case, you may want to check if your ui-kit directory has it. Remove that .git directory, remove your main .git directory as well and then reinitiate (git init) the project if possible. This worked for me.

Comments

0

this can also happen if you initialised git inside this folder. To fix change directory into this folder and delete .git then add commit and push again.

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.