git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Option for "git submodule foreach" to also run on the parent git?

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 9, 2026, 15:15 UTC
Message-ID
<xmqqsea9591f.fsf@gitster.g>
In-Reply-To
<032a7767-2350-4312-a7b1-75080519c72a@nutanix.com>
Florian Schmidt <flosch@nutanix.com> writes:
> would there be an appetite for a new option to "git submodule foreach" 
> to run the foreach command on the parent git repo as well?

Not from me. After all, the top-level superproject is not a submodule from the point of view of the tree, is it? If it were "git submodule-and-superproject foreach", then perhaps, but at that point, wouldn't it be simpler to explain what you are doing as

    do-this . ;# do it here
    git submodule foreach do-this ;# do it there all over
instead?
Previous: Florian SchmidtNext: Florian Schmidt
Message 2 of 6 in “Option for "git submodule foreach" to also run on the parent git?”
  1. Florian SchmidtMar 9, 2026
  2. Junio C HamanoMar 9, 2026
  3. Florian SchmidtMar 9, 2026
  4. Jeff KingMar 9, 2026
  5. brian m. carlsonMar 9, 2026
  6. D. Ben KnobleMar 9, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.