我有一个包罗万象的仓库来跟踪我的笔记。但在笔记旁边,经常有一些我不想跟踪的git存储库。
下面是我的gitignore的设置:
*.*
!*.kts
!*.org
!*.md
!*.txt
!*.sc它工作得非常好,以至于我可以简单地做git add .,除了前面提到的嵌套存储库的情况。目前,我必须手动将它们添加到gitignore中-如果我不这样做,就会发生这种情况:
❯ 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配置为总是简单地忽略嵌入式存储库?
发布于 2020-11-06 18:04:10
尝试:
git配置submodule..active错误
https://stackoverflow.com/questions/64712385
复制相似问题