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

git submodule problem

From
ECErik Claij <klimclay@gmail.com>
Date
Mar 30, 2021, 09:09 UTC
Message-ID
<dab7128d-5ea7-5d7c-1ae1-1d71be316326@gmail.com>
Dear git,
Changing branch with
     git checkout --recurse-submodules <branch>
does not work when the branch does contain a new submodule.

Cloning a repo without submodules in master but submodules in the <branch> will reproduce this problem.

Error
     fatal: not a git repository: 
../../.git/modules/module/esp32_peripherals
     fatal: could not reset submodule index
The alternative way does work
     git checkout <branch>
     git submodule update --init --recurse
     git clean -ffd
Best,
Erik Claij
Message 1 of 1 in “git submodule problem”
  1. Erik ClaijMar 30, 2021

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.