我有一个目录“ui-kit”,它在 github 上显示为灰色文件夹。它不可点击。
这是 .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
我尝试使用 git check-ignore --verbose ui-kit
检查它被忽略的原因,但它没有返回任何内容。
我尝试了 git add
的各种语法但没有成功。
该目录曾经是它自己的仓库,但被移动到当前项目中,并删除了所有原始的 git 文件和目录。
这是该目录的内容:
为什么github上的图标是灰色的? 我如何跟踪内容?
最佳答案
感谢@Msp 为我提供了我需要的信息:它被称为子模块这一事实。
谷歌搜索后,原来只是需要重置的 git 缓存。
git rm --cached ui-kit
对于希望解决类似问题的人,您可以在以下线程中获取模式详细信息: un-submodule a git submodule
关于git - 目录在 github 上显示为灰色文件夹,但未跟踪其内容。为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35140715/