git - 目录在 github 上显示为灰色文件夹,但未跟踪其内容。为什么?

标签 git github

我有一个目录“ui-kit”,它在 github 上显示为灰色文件夹。它不可点击。

Github screenshot

这是 .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 文件和目录。

这是该目录的内容:

enter image description here

为什么github上的图标是灰色的? 我如何跟踪内容?

最佳答案

感谢@Msp 为我提供了我需要的信息:它被称为子模块这一事实。

谷歌搜索后,原来只是需要重置的 git 缓存。

git rm --cached ui-kit

对于希望解决类似问题的人,您可以在以下线程中获取模式详细信息: un-submodule a git submodule

关于git - 目录在 github 上显示为灰色文件夹,但未跟踪其内容。为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35140715/

相关文章:

git - 与 IntelliJ merge 提交

git - 为什么 git clean --dry-run 比 git status 显示更多未跟踪的文件?

java - 在一个 Github 存储库中拥有多个 eclipse 项目

git - 将设计文档提交到github是不是很粗鲁?

git - 在 Git 分支之间切换,删除另一个分支中的文件

Git 在上游 master 上重新设置我的 fork 分支

javascript - Ajax 请求中的 jQuery Ajax 请求不起作用

java - Eclipse 和 Git - 来自 GitHub 的存储库无法从“导入”菜单中使用(来自 Git 的项目可用)

git - 将 Git 树对象 check out 到工作目录中?

linux - 从 Git 安装 Theano