如何解决Git忽略嵌入式存储库
我有一个全面的资料库来跟踪我的笔记。但是在笔记旁边,经常有我不想跟踪的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,使其始终简单地忽略嵌入式存储库?
解决方法
尝试:
git config子模块..active false
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。