{"thread":{"id":"55412","subject":"git submodule problem","startedAt":"2021-03-30T09:10:58Z","lastAt":"2021-03-30T09:10:58Z","messageCount":1,"participants":["Erik Claij"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"420565","messageId":"dab7128d-5ea7-5d7c-1ae1-1d71be316326@gmail.com","threadId":"55412","inReplyTo":null,"subject":"git submodule problem","fromName":"Erik Claij","fromEmail":"klimclay@gmail.com","sentAt":"2021-03-30T09:09:55Z","receivedAt":"2021-03-30T09:10:58Z","isPatch":false,"sender":{"key":"klimclay@gmail.com","avatar":null},"body":"Dear git,\n\nChanging branch with\n\n     git checkout --recurse-submodules <branch>\n\ndoes not work when the branch does contain a new submodule.\n\nCloning a repo without submodules in master but submodules in the \n<branch> will reproduce this problem.\n\nError\n\n     fatal: not a git repository: \n../../.git/modules/module/esp32_peripherals\n     fatal: could not reset submodule index\n\nThe alternative way does work\n\n     git checkout <branch>\n     git submodule update --init --recurse\n     git clean -ffd\n\nBest,\n\nErik Claij\n\n"}]}