{"thread":{"id":"56650","subject":"add/init all git submodules that are referenced in .gitmodules","startedAt":"2021-10-05T23:52:17Z","lastAt":"2021-10-06T19:28:38Z","messageCount":2,"participants":["Alexander Mills","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"438015","messageId":"CA+KyZp75fjj9T0LjkpEjLMVf5KNguNZ1Ycxbb26ZnCGrK5zLAQ@mail.gmail.com","threadId":"56650","inReplyTo":null,"subject":"add/init all git submodules that are referenced in .gitmodules","fromName":"Alexander Mills","fromEmail":"alexander.d.mills@gmail.com","sentAt":"2021-10-05T23:52:00Z","receivedAt":"2021-10-05T23:52:17Z","isPatch":false,"sender":{"key":"alexander.d.mills@gmail.com","avatar":"https://gravatar.com/avatar/8accf19b85aa1020f85582e1f001860f853ce55767c226545a0825a2fcd99f04?d=mp&s=160"},"body":"I am looking for this feature:\n\nhttps://stackoverflow.com/a/69458406/1223975\n\nit is really confusing as to why it doesn't exist\n\n-- \nAlexander D. Mills\nNew cell phone # (415)730-1805\nlinkedin.com/in/alexanderdmills\n\nSender notified by\nMailtrack 10/05/21, 04:51:40 PM\nRemove\n"},{"id":"438090","messageId":"YV3444Bvvfzp37Di@coredump.intra.peff.net","threadId":"56650","inReplyTo":"CA+KyZp75fjj9T0LjkpEjLMVf5KNguNZ1Ycxbb26ZnCGrK5zLAQ@mail.gmail.com","subject":"Re: add/init all git submodules that are referenced in .gitmodules","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2021-10-06T19:28:35Z","receivedAt":"2021-10-06T19:28:38Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Oct 05, 2021 at 04:52:00PM -0700, Alexander Mills wrote:\n\n> I am looking for this feature:\n> \n> https://stackoverflow.com/a/69458406/1223975\n> \n> it is really confusing as to why it doesn't exist\n\nI'm not sure I understand what is being asked for.\n\nIf you just want to initialize and populate all of the modules in\n.gitmodules (which is what I thought your subject line was asking for),\nthen:\n\n  git submodule update --init\n\nwill do that (though of course if you are cloning anyway, you can just\nsay \"--recurse-submodules).\n\nBut reading the original SO question, it is about finding repositories\nin the current directory that _aren't_ submodules, and then adding them.\nBut those ones wouldn't be referenced in .gitmodules.\n\nFor that problem, no, I don't think there's an easy command, and you\nhave to dig for them (though \"git ls-files -o --exclude-standard\" is\nperhaps a good way to locate them). But it's also not something I'd\nexpect to be a very common operation, which is why there's not an\nexisting command to do it.\n\n-Peff\n"}]}