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

Re: problem w/recursive, submodules?

From
Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Date
Apr 4, 2025, 14:59 UTC
Message-ID
<9274ED7A-0267-43E3-9AE1-DC0BBEC81E69@gmail.com>
In-Reply-To
<PH0PR20MB6183E53678E814C2B473BE8B92AE2@PH0PR20MB6183.namprd20.prod.outlook.com>
> $ git clone -v -b master --recursive ssh://git@<internal>/nyfix/OpenMAMA-omnm.git

It's harder to understand the problem without being able to reproduce it. Do you have another example with public repositories?

> The commit hash from the recursive clone is the hash of a different (more recent) commit:

If I understood it correctly, it looks to me that it's another case of one of the most common misconceptions about submodules: they always reference a specific commit instead of branch or the latest commit.

If you want your repository to reference other commit of your submodule, you'll need to manually change this and commit this change. One way you can do that:

cd <submodule> git checkout <new commit of the submodule> cd - git add <submodule> git commit

Note that you'll need to do that every time you want you want your repository to reference other commit of the submodule.

Previous: Torpey, BillNext: Torpey, Bill
Message 2 of 4 in “problem w/recursive, submodules?”
  1. Torpey, BillApr 3, 2025
  2. Lucas Seiki OshiroApr 4, 2025
  3. Torpey, BillApr 4, 2025
  4. Lucas Seiki OshiroApr 4, 2025

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.