Reputation: 1678
I have a directory "ui-kit" that shows up on github as a grey folder. It's not clickable.
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:
Why is the icon grey on github? How do I keep track of the content?
Upvotes: 8
Views: 9053
Reputation: 5823
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.
Upvotes: 4
Reputation: 4822
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.
Upvotes: 0
Reputation: 1678
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
Upvotes: 21
Reputation: 2493
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..
Upvotes: 5