git - 如何使 git 子模块成为普通文件夹?

标签 git

我有一个包含许多子模块的项目,我试图让它们充当普通文件夹而不是 repos。我已删除 .git/每个文件夹,但它们仍然像子模块一样,当我运行 git status 时它们似乎没有显示为未跟踪的文件。

最佳答案

需要使用 git rm 删除子模块(这将从您的文件系统中删除子模块的文件)。然后,您可以将子模块的存储库克隆到您的存储库中(使用 git clone ),删除“子模块”目录中的 .git 目录和 git add !

关于git - 如何使 git 子模块成为普通文件夹?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40028431/

相关文章:

Git ref master 现在空了,如何恢复?

ios - git pull 后无法打开 xib 文件,元素名称无效

git - 为什么 git-pull 手册页显示 "You never do your own development on branches that appear on the right hand side of a <refspec> colon on Pull: lines"?

git - 从 Webstorm 发布到 Windows Azure 网站

linux - 无法 git 克隆

git - 我可以通过 ssh 将 ssh 用户名与提交与 git 相关联吗?

git - git-config(1) 说 "colors are used only when the output is to a terminal"是什么意思?

git - Mac : SSH doesn't work anymore without changing something

git - 在 U 盘上使用 GIT 获取 "travelling code"

git - 如何解决 "remote: You (@user) must accept the Terms of Service in order to perform this action."问题?