Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在不创建工作树的情况下在 git bare repo 中获取列表子模块?
(使用低级库 libgit2 或 git 控制台)?
由于信息存储在.gitmodulesrepo 的根目录中,最简单的方法是检查该文件而不检查它:
.gitmodules
git show HEAD:.gitmodules
我刚刚测试过,这个命令可以在一个裸仓库中工作,就像在普通沙箱中一样。