首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Git忽略嵌入式存储库

Git忽略嵌入式存储库
EN

Stack Overflow用户
提问于 2020-11-06 17:55:56
回答 1查看 156关注 0票数 3

我有一个包罗万象的仓库来跟踪我的笔记。但在笔记旁边,经常有一些我不想跟踪的git存储库。

下面是我的gitignore的设置:

代码语言:javascript
复制
*.*
!*.kts
!*.org
!*.md
!*.txt
!*.sc

它工作得非常好,以至于我可以简单地做git add .,除了前面提到的嵌套存储库的情况。目前,我必须手动将它们添加到gitignore中-如果我不这样做,就会发生这种情况:

代码语言:javascript
复制
❯ g add 1-projects
warning: adding embedded git repository: 1-projects/mixxx/mixxx-manual
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint: 
hint:   git submodule add <url> 1-projects/mixxx/mixxx-manual
hint: 
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint: 
hint:   git rm --cached 1-projects/mixxx/mixxx-manual
hint: 
hint: See "git help submodule" for more information.
warning: adding embedded git repository: 1-projects/mixxx/mixxx
warning: adding embedded git repository: 1-projects/mixxx/website                                                                                                                                                                                           

这就是我想要避免的。有没有办法将git或我的gitignore配置为总是简单地忽略嵌入式存储库?

EN

回答 1

Stack Overflow用户

发布于 2020-11-06 18:04:10

尝试:

git配置submodule..active错误

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64712385

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档